Reviewers: Lasse Reichstein, Kevin Millikin,

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 mode functions we always used StoreIC
instead of its strict counterpart.

http://codereview.chromium.org/6814012/diff/1/src/arm/lithium-codegen-arm.cc#newcode3076
src/arm/lithium-codegen-arm.cc:3076: Handle<Code> ic =
instr->strict_mode()
Second fix - the info_ does contain strict mode flag, but it belongs to
the optimized function. If we are inlining strict function in non-strict
or vice versa we need strict mode of the function being inlined.
Hydrogen stores the strict mode of the inlined function into the
instructions so we can use it here.

http://codereview.chromium.org/6814012/diff/1/src/ast.h
File src/ast.h (left):

http://codereview.chromium.org/6814012/diff/1/src/ast.h#oldcode1788
src/ast.h:1788: bool strict_mode_;
Unused :( I moved it to scope and didn't remove from here. Oops.

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:
Third fix. SharedFunctionInfo of lazy compiled functions is not fully
pupulated (since we haven't yet parsed) so here, after parse, we need to
remember more data on the shared info and CompilationInfo.

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

http://codereview.chromium.org/6814012/diff/1/src/runtime.cc#newcode7825
src/runtime.cc:7825:
Fourth fix. If eval is in scope, runtime call is used for assignment to
variables. If assignment should result in adding property to global
object, in strict mode we must throw.

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


Please review this at http://codereview.chromium.org/6814012/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/arm/lithium-arm.h
  M src/arm/lithium-codegen-arm.cc
  M src/ast.h
  M src/compiler.cc
  M src/hydrogen-instructions.h
  M src/hydrogen.h
  M src/hydrogen.cc
  M src/ia32/lithium-codegen-ia32.cc
  M src/ia32/lithium-ia32.h
  M src/runtime.cc
  M src/x64/lithium-codegen-x64.cc
  M src/x64/lithium-x64.h
  A test/mjsunit/strict-mode-opt.js
  M test/mjsunit/strict-mode.js


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to