Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Issue 7283006: Do not pass the global object as the receiver to strict-mode and (Closed)

Created:
9 years, 5 months ago by Mads Ager (chromium)
Modified:
9 years, 5 months ago
Reviewers:
Rico
CC:
v8-dev
Visibility:
Public.

Description

Do not pass the global object as the receiver to strict-mode and builtin replace and sort functions. R=ricow@chromium.org BUG=v8:1360 TEST=mjsunit/regress/regress-1360.js Committed: http://code.google.com/p/v8/source/detail?r=8488

Patch Set 1 #

Patch Set 2 : Port to ARM and x64. #

Total comments: 4

Patch Set 3 : Update sputnik status. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -16 lines) Patch
M src/arm/full-codegen-arm.cc View 1 2 1 chunk +33 lines, -0 lines 0 comments Download
M src/array.js View 5 chunks +8 lines, -7 lines 0 comments Download
M src/hydrogen.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 1 chunk +33 lines, -0 lines 0 comments Download
M src/runtime.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/string.js View 3 chunks +8 lines, -3 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 1 chunk +33 lines, -0 lines 0 comments Download
A test/mjsunit/regress/regress-1360.js View 1 chunk +39 lines, -0 lines 0 comments Download
M test/sputnik/sputnik.status View 1 2 1 chunk +0 lines, -5 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Mads Ager (chromium)
9 years, 5 months ago (2011-06-29 12:26:18 UTC) #1
Mads Ager (chromium)
Ported to ARM and x64. Ready for review.
9 years, 5 months ago (2011-06-29 14:31:58 UTC) #2
Rico
LGTM http://codereview.chromium.org/7283006/diff/2001/src/ia32/full-codegen-ia32.cc File src/ia32/full-codegen-ia32.cc (right): http://codereview.chromium.org/7283006/diff/2001/src/ia32/full-codegen-ia32.cc#newcode3550 src/ia32/full-codegen-ia32.cc:3550: __ mov(ecx, FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset)); I know that we ...
9 years, 5 months ago (2011-06-30 06:41:25 UTC) #3
Mads Ager (chromium)
9 years, 5 months ago (2011-06-30 12:28:10 UTC) #4
http://codereview.chromium.org/7283006/diff/2001/src/ia32/full-codegen-ia32.cc
File src/ia32/full-codegen-ia32.cc (right):

http://codereview.chromium.org/7283006/diff/2001/src/ia32/full-codegen-ia32.c...
src/ia32/full-codegen-ia32.cc:3550: __ mov(ecx, FieldOperand(eax,
JSFunction::kSharedFunctionInfoOffset));
On 2011/06/30 06:41:25, Rico wrote:
> I know that we explicitly check for this at the call sites (in array.js and
> string.js). But shouldn't we have a check for what we actually have in eax to
> guarantee that it is a JSFunction.

We explicitly have checks before. We will then go on and use %_CallFunction
which does not check either.

http://codereview.chromium.org/7283006/diff/2001/src/ia32/full-codegen-ia32.c...
src/ia32/full-codegen-ia32.cc:3558: __ j(not_equal, if_true);
On 2011/06/30 06:41:25, Rico wrote:
> You could consider having just one test instructions (non-byte version) with
(1
> << SharedFunctionInfo::kNative & 1 << SharedFunctionInfo::kStrictModeFunction)

We could. This code is similar to what we do in apply. I'll keep them the same
for now and we can see if it makes a performance difference. I don't think it
will.

Powered by Google App Engine
This is Rietveld 408576698