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

Issue 6694044: Strict mode poison pills for function.caller and function.arguments (Closed)

Created:
9 years, 9 months ago by Martin Maly
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

3 patches in this CR to keep things a bit easier to follow. First patch is straight-up revert of Mads' revert of my original commit http://code.google.com/p/v8/source/detail?r=7168 Second patch is fix for the Kraken issue. It turns out that V8 temporarily sets function prototype as read only while builtins are being processed but later switches it back to read/write. I only did the first part for strict mode functions so now I am doing the second half as well. Third patch is series of renames Mads suggested. I went for the long names. Given how rarely they are actually used the more descriptive name seemed better. As for testing on Kraken ... I tested few of the Kraken tests manually on command line V8 (thanks, Mads, for the link) but also built Chrome with this change and ran the web Kraken test to make sure things are alright. Thank you! Martin

Patch Set 1 #

Patch Set 2 : Fix Kraken. #

Patch Set 3 : Renames per Mads' feedback. #

Total comments: 14

Patch Set 4 : CR Feedback. #

Total comments: 8

Patch Set 5 : Final touches. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+391 lines, -112 lines) Patch
M src/arm/codegen-arm.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M src/arm/full-codegen-arm.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/bootstrapper.cc View 1 2 3 4 9 chunks +224 lines, -83 lines 0 comments Download
M src/builtins.h View 1 chunk +4 lines, -1 line 0 comments Download
M src/builtins.cc View 1 chunk +18 lines, -0 lines 0 comments Download
M src/contexts.h View 1 2 2 chunks +8 lines, -0 lines 0 comments Download
M src/factory.h View 1 2 3 4 2 chunks +5 lines, -2 lines 0 comments Download
M src/factory.cc View 1 2 3 4 3 chunks +18 lines, -6 lines 0 comments Download
M src/handles.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/handles.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/messages.js View 1 chunk +2 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 1 chunk +12 lines, -3 lines 0 comments Download
M src/runtime.cc View 1 2 1 chunk +8 lines, -5 lines 0 comments Download
M src/x64/codegen-x64.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 chunk +2 lines, -1 line 0 comments Download
M test/mjsunit/strict-mode.js View 1 2 3 1 chunk +65 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Martin Maly
Trying again...
9 years, 9 months ago (2011-03-15 22:56:39 UTC) #1
Mads Ager (chromium)
http://codereview.chromium.org/6694044/diff/1023/src/bootstrapper.cc File src/bootstrapper.cc (right): http://codereview.chromium.org/6694044/diff/1023/src/bootstrapper.cc#newcode510 src/bootstrapper.cc:510: Handle<DescriptorArray> Genesis::ComputeStrictFunctionDescriptor( Keep the 'Instance' in the name? ComputeStrictFunctionInstanceDescriptor? ...
9 years, 9 months ago (2011-03-16 09:29:13 UTC) #2
Martin Maly
Thanks, Mads. Made the changes. martin http://codereview.chromium.org/6694044/diff/1023/src/bootstrapper.cc File src/bootstrapper.cc (right): http://codereview.chromium.org/6694044/diff/1023/src/bootstrapper.cc#newcode510 src/bootstrapper.cc:510: Handle<DescriptorArray> Genesis::ComputeStrictFunctionDescriptor( On ...
9 years, 9 months ago (2011-03-16 23:40:35 UTC) #3
Mads Ager (chromium)
LGTM http://codereview.chromium.org/6694044/diff/10001/src/bootstrapper.cc File src/bootstrapper.cc (right): http://codereview.chromium.org/6694044/diff/10001/src/bootstrapper.cc#newcode296 src/bootstrapper.cc:296: // Function instance maps. Funcion literal maps are ...
9 years, 9 months ago (2011-03-17 07:48:25 UTC) #4
Martin Maly
9 years, 9 months ago (2011-03-17 16:00:55 UTC) #5
Done with the final touches. Will now try to land.

http://codereview.chromium.org/6694044/diff/10001/src/bootstrapper.cc
File src/bootstrapper.cc (right):

http://codereview.chromium.org/6694044/diff/10001/src/bootstrapper.cc#newcode296
src/bootstrapper.cc:296: // Function instance maps. Funcion literal maps are
created initially with
On 2011/03/17 07:48:25, Mads Ager wrote:
> Funcion -> Function

Done.

http://codereview.chromium.org/6694044/diff/10001/src/bootstrapper.cc#newcode589
src/bootstrapper.cc:589: 
On 2011/03/17 07:48:25, Mads Ager wrote:
> Delete this line?

Done.

http://codereview.chromium.org/6694044/diff/10001/src/factory.cc
File src/factory.cc (right):

http://codereview.chromium.org/6694044/diff/10001/src/factory.cc#newcode834
src/factory.cc:834: Handle<JSFunction>
Factory::NewFunctionWithoutPrototypeStrictHelper(
On 2011/03/17 07:48:25, Mads Ager wrote:
> Instead of duplicating the code here, would it make sense to parameterize
> NewFunctionWithoutPrototype with a strict mode flag and then select the right
> map in NewFunctionWithoutPrototypeHelper? Or maybe have only one helper that
> takes a strict mode flags and uses that to select the map?

Done.

http://codereview.chromium.org/6694044/diff/10001/src/factory.cc#newcode845
src/factory.cc:845: Handle<JSFunction>
Factory::NewFunctionWithoutPrototypeStrict(
On 2011/03/17 07:48:25, Mads Ager wrote:
> NewStrictFunctionWithoutPrototype?

This function went away now that I removed the code duplication.

Powered by Google App Engine
This is Rietveld 408576698