Reviewers: Yang, Michael Starzinger, Paul Lind, v8-mips-ports_googlegroups.com,

Message:
Yang: Please do the overall review.
Michi: Please take a look at the TF changes.

MIPS people: Please port this to MIPS and MIPS64.

Description:
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

Please review this at https://codereview.chromium.org/1304633002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+651, -1517 lines):
  M src/arm/code-stubs-arm.cc
  M src/arm/interface-descriptors-arm.cc
  M src/arm/lithium-arm.h
  M src/arm/lithium-arm.cc
  M src/arm/lithium-codegen-arm.h
  M src/arm/lithium-codegen-arm.cc
  M src/arm/macro-assembler-arm.h
  M src/arm/macro-assembler-arm.cc
  M src/bailout-reason.h
  M src/builtins.h
  M src/code-factory.h
  M src/code-factory.cc
  M src/code-stubs.h
  M src/code-stubs.cc
  M src/compiler/js-generic-lowering.cc
  M src/full-codegen/arm/full-codegen-arm.cc
  M src/full-codegen/ia32/full-codegen-ia32.cc
  M src/full-codegen/x64/full-codegen-x64.cc
  M src/hydrogen.h
  M src/hydrogen.cc
  M src/hydrogen-instructions.h
  M src/hydrogen-instructions.cc
  M src/ia32/code-stubs-ia32.cc
  M src/ia32/interface-descriptors-ia32.cc
  M src/ia32/lithium-codegen-ia32.h
  M src/ia32/lithium-codegen-ia32.cc
  M src/ia32/lithium-ia32.h
  M src/ia32/lithium-ia32.cc
  M src/ia32/macro-assembler-ia32.h
  M src/ia32/macro-assembler-ia32.cc
  M src/interface-descriptors.h
  M src/interface-descriptors.cc
  M src/runtime.js
  M src/runtime/runtime.h
  M src/runtime/runtime-object.cc
  M src/v8natives.js
  M src/x64/code-stubs-x64.cc
  M src/x64/interface-descriptors-x64.cc
  M src/x64/lithium-codegen-x64.h
  M src/x64/lithium-codegen-x64.cc
  M src/x64/lithium-x64.h
  M src/x64/lithium-x64.cc
  M src/x64/macro-assembler-x64.h
  M src/x64/macro-assembler-x64.cc
  A test/mjsunit/regress/regress-4376-1.js
  A + test/mjsunit/regress/regress-4376-2.js
  A + test/mjsunit/regress/regress-4376-3.js
  M test/webkit/fast/js/object-prototype-properties-expected.txt


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to