[turbofan] Fix context chain extension for top-level code.
authormstarzinger <mstarzinger@chromium.org>
Wed, 10 Jun 2015 06:03:03 +0000 (23:03 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 10 Jun 2015 06:03:14 +0000 (06:03 +0000)
commiteb0593e1376f84bc058406ee0ca387d98858ba9d
tree879284b03eed17680b6a9a598ca3388ab3829049
parent472b147708ba585f07c0020434302d96867cbb61
[turbofan] Fix context chain extension for top-level code.

For top-level code the closure passed into context allocation methods
needs to be replaced with a sentinel to canonicalize is to the empty
function object.

R=bmeurer@chromium.org
TEST=mjsunit/regress/regress-4169
BUG=v8:4169
LOG=N

Review URL: https://codereview.chromium.org/1172013002

Cr-Commit-Position: refs/heads/master@{#28888}
src/compiler/ast-graph-builder.cc
src/compiler/ast-graph-builder.h
test/mjsunit/regress/regress-4169.js [new file with mode: 0644]