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

Issue 6814012: Strict mode fixes. (Closed)

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

Description

Strict mode fixes. - mutual inlining strict and non-strict functions in crankshaft. - assignment to undefined variable with eval in scope. - propagation of strict mode through lazy compilation. BUG= TEST=test/mjsunit/strict-mode.js test/mjsunit/strict-mode-opt.js Committed: http://code.google.com/p/v8/source/detail?r=7561

Patch Set 1 #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+246 lines, -40 lines) Patch
M src/arm/lithium-arm.h View 3 chunks +3 lines, -0 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 3 chunks +5 lines, -3 lines 2 comments Download
M src/ast.h View 1 chunk +0 lines, -1 line 1 comment Download
M src/compiler.cc View 1 chunk +6 lines, -0 lines 3 comments Download
M src/hydrogen.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 4 chunks +20 lines, -4 lines 0 comments Download
M src/hydrogen-instructions.h View 9 chunks +19 lines, -5 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 3 chunks +5 lines, -3 lines 0 comments Download
M src/ia32/lithium-ia32.h View 4 chunks +4 lines, -0 lines 0 comments Download
M src/runtime.cc View 1 chunk +10 lines, -1 line 1 comment Download
M src/x64/lithium-codegen-x64.cc View 3 chunks +5 lines, -3 lines 0 comments Download
M src/x64/lithium-x64.h View 3 chunks +4 lines, -0 lines 0 comments Download
M test/mjsunit/strict-mode.js View 2 chunks +64 lines, -20 lines 0 comments Download
A test/mjsunit/strict-mode-opt.js View 1 chunk +98 lines, -0 lines 2 comments Download

Messages

Total messages: 4 (0 generated)
Martin Maly
http://codereview.chromium.org/6814012/diff/1/src/arm/lithium-codegen-arm.cc File src/arm/lithium-codegen-arm.cc (right): http://codereview.chromium.org/6814012/diff/1/src/arm/lithium-codegen-arm.cc#newcode2220 src/arm/lithium-codegen-arm.cc:2220: Handle<Code> ic = instr->strict_mode() First fix. When optimizing strict ...
9 years, 8 months ago (2011-04-07 10:07:07 UTC) #1
Lasse Reichstein
LGTM http://codereview.chromium.org/6814012/diff/1/src/compiler.cc File src/compiler.cc (right): http://codereview.chromium.org/6814012/diff/1/src/compiler.cc#newcode606 src/compiler.cc:606: The preparser should be able to detect this ...
9 years, 8 months ago (2011-04-08 12:54:18 UTC) #2
Lasse Reichstein
LGTM
9 years, 8 months ago (2011-04-08 12:54:19 UTC) #3
Martin Maly
9 years, 8 months ago (2011-04-08 14:27:39 UTC) #4
Thanks, Lasse.

http://codereview.chromium.org/6814012/diff/1/src/compiler.cc
File src/compiler.cc (right):

http://codereview.chromium.org/6814012/diff/1/src/compiler.cc#newcode606
src/compiler.cc:606: 
On 2011/04/08 12:54:18, Lasse Reichstein wrote:
> The preparser should be able to detect this and store it in the preparser data
> with the other data that are set for lazy functions.
> On the other hand, if this is sufficient, I guess it'll do. 

Preparser doesn't yet detect strict mode. Once it does (and it will have to for
early errors) I'll remove this.

http://codereview.chromium.org/6814012/diff/1/test/mjsunit/strict-mode-opt.js
File test/mjsunit/strict-mode-opt.js (right):

http://codereview.chromium.org/6814012/diff/1/test/mjsunit/strict-mode-opt.js...
test/mjsunit/strict-mode-opt.js:29: var MAX = 10000000;
On 2011/04/08 12:54:18, Lasse Reichstein wrote:
> That's a lot. Is it really necessary?
> Are there any flags you could use to make optimization more frequent so you
> don't need as big a loop?

Turns out we inline even with one zero removed so I am taking one zero out for
the landing

Powered by Google App Engine
This is Rietveld 408576698