|
Draft of throwing exception in strict mode when assigning to read only property.
All StoreICs and KeyedStoreICs propagate strict mode flag (previous change did it only for globals). The flag then flows into IC miss code and into runtime.
There are plenty of todos so I am mostly looking for quick feedback on the direction:
- Handle strict mode in SetElement (this needs to be done regardless but I believe it can be done safely after all below is handled, in another CL)
- Revert Runtime_SetProperty back to 3-4 arguments, merging the strict flag with PropertyAttributes (optional but I'd find it being cleaner - I used adding the extra argument as means to explicitly track down all places where strict flag needs to go. If I modified the enum directly they'd be hard to find). Ultimately the Strict would be similar to ABSENT flag in PropertyAttributes. Never stored but passed around.
- figure out global variables and constants. I am unclear about the overall design on const in V8 (it is not part of standard and V8 implements const differently than jsc/firefox). Lots of TODOs there.
- Handle all special cases of StoreIC and KeyedStoreIC to correctly propagate strict mode (or disable the particular specialization in strict mode)
BUG=
TEST=
Total comments: 14
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+864 lines, -423 lines) |
Patch |
|
M |
src/api.cc
|
View
|
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/arm/codegen-arm.cc
|
View
|
1
|
12 chunks |
+25 lines, -12 lines |
0 comments
|
Download
|
|
M |
src/arm/full-codegen-arm.cc
|
View
|
1
|
11 chunks |
+36 lines, -18 lines |
0 comments
|
Download
|
|
M |
src/arm/ic-arm.cc
|
View
|
1
|
7 chunks |
+18 lines, -8 lines |
0 comments
|
Download
|
|
M |
src/arm/lithium-codegen-arm.cc
|
View
|
1
|
2 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/arm/stub-cache-arm.cc
|
View
|
1
|
2 chunks |
+12 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/arm/virtual-frame-arm.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/arm/virtual-frame-arm.cc
|
View
|
|
2 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/builtins.h
|
View
|
|
1 chunk |
+10 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/builtins.cc
|
View
|
|
3 chunks |
+15 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/debug.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
src/handles.h
|
View
|
1
|
2 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/handles.cc
|
View
|
1
|
2 chunks |
+12 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/ia32/codegen-ia32.cc
|
View
|
1
|
8 chunks |
+17 lines, -8 lines |
0 comments
|
Download
|
|
M |
src/ia32/full-codegen-ia32.cc
|
View
|
1
|
11 chunks |
+30 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/ia32/ic-ia32.cc
|
View
|
1
|
7 chunks |
+16 lines, -10 lines |
0 comments
|
Download
|
|
M |
src/ia32/lithium-codegen-ia32.cc
|
View
|
1
|
2 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/ia32/stub-cache-ia32.cc
|
View
|
1
|
2 chunks |
+9 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/ia32/virtual-frame-ia32.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/ia32/virtual-frame-ia32.cc
|
View
|
|
3 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/ic.h
|
View
|
1
|
6 chunks |
+28 lines, -12 lines |
0 comments
|
Download
|
|
M |
src/ic.cc
|
View
|
1
|
24 chunks |
+81 lines, -38 lines |
0 comments
|
Download
|
|
M |
src/ic-inl.h
|
View
|
1
|
1 chunk |
+9 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/messages.js
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/objects.h
|
View
|
|
2 chunks |
+8 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/objects.cc
|
View
|
1
|
9 chunks |
+30 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/objects-inl.h
|
View
|
1
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/parser.cc
|
View
|
1
|
1 chunk |
+36 lines, -21 lines |
0 comments
|
Download
|
|
M |
src/runtime.h
|
View
|
1
|
3 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/runtime.cc
|
View
|
1
|
26 chunks |
+103 lines, -36 lines |
0 comments
|
Download
|
|
M |
src/stub-cache.h
|
View
|
1
|
5 chunks |
+21 lines, -12 lines |
0 comments
|
Download
|
|
M |
src/stub-cache.cc
|
View
|
1
|
15 chunks |
+47 lines, -33 lines |
0 comments
|
Download
|
|
M |
src/x64/codegen-x64.cc
|
View
|
1
|
8 chunks |
+16 lines, -8 lines |
0 comments
|
Download
|
|
M |
src/x64/full-codegen-x64.cc
|
View
|
1
|
10 chunks |
+27 lines, -10 lines |
0 comments
|
Download
|
|
M |
src/x64/ic-x64.cc
|
View
|
1
|
7 chunks |
+15 lines, -9 lines |
0 comments
|
Download
|
|
M |
src/x64/lithium-codegen-x64.cc
|
View
|
1
|
2 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/x64/stub-cache-x64.cc
|
View
|
1
|
2 chunks |
+8 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/x64/virtual-frame-x64.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/x64/virtual-frame-x64.cc
|
View
|
1
|
3 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
|
M |
test/cctest/test-api.cc
|
View
|
1
|
1 chunk |
+5 lines, -4 lines |
0 comments
|
Download
|
|
M |
test/cctest/test-compiler.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
test/cctest/test-debug.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
test/cctest/test-heap.cc
|
View
|
1
|
10 chunks |
+38 lines, -25 lines |
0 comments
|
Download
|
|
M |
test/cctest/test-mark-compact.cc
|
View
|
|
2 chunks |
+8 lines, -3 lines |
0 comments
|
Download
|
|
M |
test/es5conform/es5conform.status
|
View
|
|
1 chunk |
+0 lines, -66 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/strict-mode.js
|
View
|
1
|
1 chunk |
+115 lines, -0 lines |
0 comments
|
Download
|
Total messages: 3 (0 generated)
|