|
Support fast case for-in in Crankshaft.
Only JSObject enumerables with enum cache (fast case properties, no interceptors, no enumerable properties on the prototype) are supported.
HLoadKeyedGeneric with keys produced by for-in enumeration are recognized and rewritten into direct property load by index. For this enum-cache was extended to store property indices in a separate array (see handles.cc).
New hydrogen instructions:
- HForInPrepareMap: checks for-in fast case preconditions and returns map that contains enum-cache;
- HForInCacheArray: extracts enum-cache array from the map;
- HCheckMapValue: map check with HValue map instead of immediate;
- HLoadFieldByIndex: load fast property by it's index, positive indexes denote in-object properties, negative - out of object properties;
Changed hydrogen instructions:
- HLoadKeyedFastElement: added hole check suppression for loads from internal FixedArrays that are knows to have no holes inside.
R=fschneider@chromium.org
BUG=
TEST=
Committed: https://code.google.com/p/v8/source/detail?r=10794
Total comments: 8
Total comments: 5
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1298 lines, -168 lines) |
Patch |
|
M |
src/arm/full-codegen-arm.cc
|
View
|
1
|
7 chunks |
+7 lines, -45 lines |
0 comments
|
Download
|
|
M |
src/arm/lithium-arm.h
|
View
|
1
|
2 chunks |
+62 lines, -1 line |
1 comment
|
Download
|
|
M |
src/arm/lithium-arm.cc
|
View
|
1
|
1 chunk |
+28 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/arm/lithium-codegen-arm.cc
|
View
|
1
|
1 chunk |
+82 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/arm/macro-assembler-arm.h
|
View
|
1
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/arm/macro-assembler-arm.cc
|
View
|
1
|
1 chunk |
+46 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/ast.h
|
View
|
|
2 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/full-codegen.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/handles.cc
|
View
|
1
|
1 chunk |
+35 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/hydrogen.h
|
View
|
|
3 chunks |
+9 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/hydrogen.cc
|
View
|
1
|
6 chunks |
+117 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/hydrogen-instructions.h
|
View
|
1
|
6 chunks |
+150 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/hydrogen-instructions.cc
|
View
|
1
|
3 chunks |
+65 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/ia32/full-codegen-ia32.cc
|
View
|
1
|
8 chunks |
+11 lines, -50 lines |
0 comments
|
Download
|
|
M |
src/ia32/lithium-codegen-ia32.cc
|
View
|
1
|
1 chunk |
+78 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/ia32/lithium-ia32.h
|
View
|
1
|
2 chunks |
+63 lines, -1 line |
1 comment
|
Download
|
|
M |
src/ia32/lithium-ia32.cc
|
View
|
1
|
1 chunk |
+29 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/ia32/macro-assembler-ia32.h
|
View
|
1
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/ia32/macro-assembler-ia32.cc
|
View
|
1
|
1 chunk |
+40 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/objects.h
|
View
|
|
2 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/objects.cc
|
View
|
|
1 chunk |
+7 lines, -1 line |
0 comments
|
Download
|
|
M |
src/x64/full-codegen-x64.cc
|
View
|
1
|
7 chunks |
+7 lines, -44 lines |
0 comments
|
Download
|
|
M |
src/x64/lithium-codegen-x64.cc
|
View
|
1
|
1 chunk |
+82 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/x64/lithium-x64.h
|
View
|
1
|
2 chunks |
+61 lines, -1 line |
1 comment
|
Download
|
|
M |
src/x64/lithium-x64.cc
|
View
|
1
|
1 chunk |
+28 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/x64/macro-assembler-x64.h
|
View
|
1
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/x64/macro-assembler-x64.cc
|
View
|
1
|
1 chunk |
+46 lines, -0 lines |
0 comments
|
Download
|
|
A |
test/mjsunit/compiler/optimized-for-in.js
|
View
|
1
|
1 chunk |
+219 lines, -0 lines |
2 comments
|
Download
|
Total messages: 4 (0 generated)
|