|
Correctify instanceof and make it optimizable.
The previous hack with HInstanceOfKnownGlobal was not only slower,
but also very brittle and required a lot of weird hacks to support it. And
what's even more important it wasn't even correct (because a map check
on the lhs is never enough for instanceof).
The new implementation provides a sane runtime implementation
for InstanceOf plus a fast case in the InstanceOfStub, combined with
a proper specialization in the case of a known global in CrankShaft,
which does only the prototype chain walk (coupled with a code
dependency on the known global).
As a drive-by-fix: Also fix the incorrect Object.prototype.isPrototypeOf
implementation.
BUG= v8:4376
LOG=y
Committed: https://crrev.com/5d875a57fa2e65c1a4a6b50aeb23c38299c3cfbc
Cr-Commit-Position: refs/heads/master@{#30342}
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1170 lines, -2974 lines) |
Patch |
|
M |
src/arm/code-stubs-arm.cc
|
View
|
1
2
3
|
1 chunk |
+95 lines, -196 lines |
0 comments
|
Download
|
|
M |
src/arm/interface-descriptors-arm.cc
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/arm/lithium-arm.h
|
View
|
|
3 chunks |
+13 lines, -29 lines |
0 comments
|
Download
|
|
M |
src/arm/lithium-arm.cc
|
View
|
|
2 chunks |
+10 lines, -19 lines |
0 comments
|
Download
|
|
M |
src/arm/lithium-codegen-arm.h
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/arm/lithium-codegen-arm.cc
|
View
|
|
2 chunks |
+35 lines, -148 lines |
0 comments
|
Download
|
|
M |
src/arm/macro-assembler-arm.h
|
View
|
|
2 chunks |
+2 lines, -13 lines |
0 comments
|
Download
|
|
M |
src/arm/macro-assembler-arm.cc
|
View
|
|
3 chunks |
+2 lines, -106 lines |
0 comments
|
Download
|
|
M |
src/arm64/code-stubs-arm64.cc
|
View
|
1
2
3
|
1 chunk |
+94 lines, -178 lines |
0 comments
|
Download
|
|
M |
src/arm64/interface-descriptors-arm64.cc
|
View
|
1
2
|
1 chunk |
+2 lines, -10 lines |
0 comments
|
Download
|
|
M |
src/arm64/lithium-arm64.h
|
View
|
1
|
3 chunks |
+16 lines, -27 lines |
0 comments
|
Download
|
|
M |
src/arm64/lithium-arm64.cc
|
View
|
1
|
2 chunks |
+11 lines, -18 lines |
0 comments
|
Download
|
|
M |
src/arm64/lithium-codegen-arm64.h
|
View
|
1
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
src/arm64/lithium-codegen-arm64.cc
|
View
|
1
|
1 chunk |
+26 lines, -122 lines |
0 comments
|
Download
|
|
M |
src/arm64/macro-assembler-arm64.h
|
View
|
1
|
2 chunks |
+2 lines, -21 lines |
0 comments
|
Download
|
|
M |
src/arm64/macro-assembler-arm64.cc
|
View
|
1
|
3 chunks |
+2 lines, -54 lines |
0 comments
|
Download
|
|
M |
src/bailout-reason.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/builtins.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
src/code-factory.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/code-factory.cc
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/code-stubs.h
|
View
|
1
2
3
4
|
2 chunks |
+6 lines, -39 lines |
0 comments
|
Download
|
|
M |
src/code-stubs.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -8 lines |
0 comments
|
Download
|
|
M |
src/compiler/js-generic-lowering.cc
|
View
|
|
1 chunk |
+1 line, -4 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/arm/full-codegen-arm.cc
|
View
|
1
2
|
1 chunk |
+6 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/arm64/full-codegen-arm64.cc
|
View
|
1
2
|
1 chunk |
+6 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/ia32/full-codegen-ia32.cc
|
View
|
1
2
|
1 chunk |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/mips/full-codegen-mips.cc
|
View
|
1
2
3
4
|
1 chunk |
+7 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/mips64/full-codegen-mips64.cc
|
View
|
1
2
3
4
|
1 chunk |
+7 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/full-codegen/x64/full-codegen-x64.cc
|
View
|
1
2
|
1 chunk |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/hydrogen.h
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/hydrogen.cc
|
View
|
1
2
3
4
|
2 chunks |
+25 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/hydrogen-instructions.h
|
View
|
|
2 chunks |
+17 lines, -19 lines |
0 comments
|
Download
|
|
M |
src/hydrogen-instructions.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/ia32/code-stubs-ia32.cc
|
View
|
1
2
3
|
1 chunk |
+95 lines, -220 lines |
0 comments
|
Download
|
|
M |
src/ia32/interface-descriptors-ia32.cc
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/ia32/lithium-codegen-ia32.h
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/ia32/lithium-codegen-ia32.cc
|
View
|
|
2 chunks |
+39 lines, -107 lines |
0 comments
|
Download
|
|
M |
src/ia32/lithium-ia32.h
|
View
|
|
3 chunks |
+16 lines, -27 lines |
0 comments
|
Download
|
|
M |
src/ia32/lithium-ia32.cc
|
View
|
|
2 chunks |
+11 lines, -19 lines |
0 comments
|
Download
|
|
M |
src/ia32/macro-assembler-ia32.h
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/ia32/macro-assembler-ia32.cc
|
View
|
|
2 chunks |
+3 lines, -37 lines |
0 comments
|
Download
|
|
M |
src/interface-descriptors.h
|
View
|
1
2
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/interface-descriptors.cc
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/mips/code-stubs-mips.cc
|
View
|
1
2
3
4
|
1 chunk |
+93 lines, -190 lines |
0 comments
|
Download
|
|
M |
src/mips/interface-descriptors-mips.cc
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/mips/lithium-codegen-mips.h
|
View
|
1
2
3
4
|
2 chunks |
+5 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/mips/lithium-codegen-mips.cc
|
View
|
1
2
3
4
|
2 chunks |
+38 lines, -136 lines |
0 comments
|
Download
|
|
M |
src/mips/lithium-mips.h
|
View
|
1
2
3
4
|
3 chunks |
+13 lines, -29 lines |
0 comments
|
Download
|
|
M |
src/mips/lithium-mips.cc
|
View
|
1
2
3
4
|
2 chunks |
+10 lines, -19 lines |
0 comments
|
Download
|
|
M |
src/mips/macro-assembler-mips.h
|
View
|
1
2
3
4
|
2 chunks |
+2 lines, -14 lines |
0 comments
|
Download
|
|
M |
src/mips/macro-assembler-mips.cc
|
View
|
1
2
3
4
|
3 chunks |
+2 lines, -96 lines |
0 comments
|
Download
|
|
M |
src/mips64/code-stubs-mips64.cc
|
View
|
1
2
3
4
|
1 chunk |
+93 lines, -190 lines |
0 comments
|
Download
|
|
M |
src/mips64/interface-descriptors-mips64.cc
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/mips64/lithium-codegen-mips64.h
|
View
|
1
2
3
4
|
2 chunks |
+5 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/mips64/lithium-codegen-mips64.cc
|
View
|
1
2
3
4
|
2 chunks |
+39 lines, -133 lines |
0 comments
|
Download
|
|
M |
src/mips64/lithium-mips64.h
|
View
|
1
2
3
4
|
3 chunks |
+13 lines, -29 lines |
0 comments
|
Download
|
|
M |
src/mips64/lithium-mips64.cc
|
View
|
1
2
3
4
|
2 chunks |
+10 lines, -19 lines |
0 comments
|
Download
|
|
M |
src/mips64/macro-assembler-mips64.h
|
View
|
1
2
3
4
|
2 chunks |
+2 lines, -14 lines |
0 comments
|
Download
|
|
M |
src/mips64/macro-assembler-mips64.cc
|
View
|
1
2
3
4
|
3 chunks |
+2 lines, -125 lines |
0 comments
|
Download
|
|
M |
src/objects.h
|
View
|
1
2
3
4
|
3 chunks |
+9 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/runtime.js
|
View
|
1
2
|
2 chunks |
+0 lines, -33 lines |
0 comments
|
Download
|
|
M |
src/runtime/runtime.h
|
View
|
1
2
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/runtime/runtime-object.cc
|
View
|
1
2
|
2 chunks |
+54 lines, -10 lines |
0 comments
|
Download
|
|
M |
src/v8natives.js
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/x64/code-stubs-x64.cc
|
View
|
1
2
3
|
1 chunk |
+98 lines, -210 lines |
0 comments
|
Download
|
|
M |
src/x64/interface-descriptors-x64.cc
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/x64/lithium-codegen-x64.h
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/x64/lithium-codegen-x64.cc
|
View
|
|
2 chunks |
+36 lines, -117 lines |
0 comments
|
Download
|
|
M |
src/x64/lithium-x64.h
|
View
|
|
3 chunks |
+10 lines, -26 lines |
0 comments
|
Download
|
|
M |
src/x64/lithium-x64.cc
|
View
|
|
2 chunks |
+10 lines, -18 lines |
0 comments
|
Download
|
|
M |
src/x64/macro-assembler-x64.h
|
View
|
|
1 chunk |
+1 line, -4 lines |
0 comments
|
Download
|
|
M |
src/x64/macro-assembler-x64.cc
|
View
|
|
2 chunks |
+2 lines, -38 lines |
0 comments
|
Download
|
|
A |
test/mjsunit/regress/regress-4376-1.js
|
View
|
|
1 chunk |
+12 lines, -0 lines |
0 comments
|
Download
|
|
A + |
test/mjsunit/regress/regress-4376-2.js
|
View
|
|
1 chunk |
+5 lines, -3 lines |
0 comments
|
Download
|
|
A + |
test/mjsunit/regress/regress-4376-3.js
|
View
|
|
1 chunk |
+6 lines, -3 lines |
0 comments
|
Download
|
|
M |
test/webkit/fast/js/object-prototype-properties-expected.txt
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 23 (12 generated)
|