Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Issue 2684033012: [es2015] Remove the @@hasInstance protector cell. (Closed)

Created:
3 years, 10 months ago by Benedikt Meurer
Modified:
3 years, 10 months ago
Reviewers:
Yang
CC:
v8-reviews_googlegroups.com, v8-mips-ports_googlegroups.com, v8-x87-ports_googlegroups.com, ulan, Hannes Payer (out of office), v8-ppc-ports_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[es2015] Remove the @@hasInstance protector cell. We cannot skip the @@hasInstance lookup in instanceof depending on a global protector cell, as the lookup of the property is observable via proxies or accessors. So remove the global protector and properly implement CSA::InstanceOf via GetPropertyStub, with an appropriate fast-path for Function.prototype[@@hasInstance] where we call the builtin code object directly if the function matches, skipping all the checks from the call sequence, and also avoid the redundant ToBoolean conversion on the result. R=yangguo@chromium.org TBR=ulan@chromium.org BUG=v8:5958 Review-Url: https://codereview.chromium.org/2684033012 Cr-Commit-Position: refs/heads/master@{#43137} Committed: https://chromium.googlesource.com/v8/v8/+/1a2362089ce2af3ed2241110deecfabe80abd28a

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fix copy&paste comment. #

Patch Set 3 : REBASE #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -45 lines) Patch
M src/builtins/builtins.h View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M src/code-stub-assembler.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M src/code-stub-assembler.cc View 2 chunks +81 lines, -20 lines 0 comments Download
M src/full-codegen/arm/full-codegen-arm.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen/arm64/full-codegen-arm64.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen/ia32/full-codegen-ia32.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen/mips/full-codegen-mips.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen/mips64/full-codegen-mips64.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen/ppc/full-codegen-ppc.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen/s390/full-codegen-s390.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen/x64/full-codegen-x64.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen/x87/full-codegen-x87.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/heap/heap.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M src/heap/heap.cc View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M src/isolate.h View 1 2 2 chunks +0 lines, -2 lines 0 comments Download
M src/isolate.cc View 1 2 1 chunk +0 lines, -9 lines 0 comments Download
M src/isolate-inl.h View 1 chunk +0 lines, -5 lines 0 comments Download
M src/lookup.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M src/runtime/runtime.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M src/runtime/runtime-internal.cc View 1 chunk +12 lines, -0 lines 0 comments Download
A test/mjsunit/regress/regress-v8-5958.js View 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (18 generated)
Benedikt Meurer
3 years, 10 months ago (2017-02-10 21:24:54 UTC) #1
Yang
https://codereview.chromium.org/2684033012/diff/1/src/builtins/builtins.h File src/builtins/builtins.h (right): https://codereview.chromium.org/2684033012/diff/1/src/builtins/builtins.h#newcode648 src/builtins/builtins.h:648: /* instanceof */ \ wrong comment?
3 years, 10 months ago (2017-02-10 22:38:49 UTC) #6
Benedikt Meurer
PTAL https://codereview.chromium.org/2684033012/diff/1/src/builtins/builtins.h File src/builtins/builtins.h (right): https://codereview.chromium.org/2684033012/diff/1/src/builtins/builtins.h#newcode648 src/builtins/builtins.h:648: /* instanceof */ \ Copy&paste
3 years, 10 months ago (2017-02-11 17:40:23 UTC) #9
Yang
On 2017/02/11 17:40:23, Benedikt Meurer wrote: > PTAL > > https://codereview.chromium.org/2684033012/diff/1/src/builtins/builtins.h > File src/builtins/builtins.h (right): ...
3 years, 10 months ago (2017-02-13 06:08:23 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2684033012/20001
3 years, 10 months ago (2017-02-13 06:10:42 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/34567)
3 years, 10 months ago (2017-02-13 06:13:53 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2684033012/20001
3 years, 10 months ago (2017-02-13 06:14:33 UTC) #19
commit-bot: I haz the power
Failed to apply patch for src/code-stub-assembler.h: While running git apply --index -p1; error: patch failed: ...
3 years, 10 months ago (2017-02-13 06:36:47 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2684033012/60001
3 years, 10 months ago (2017-02-13 06:51:26 UTC) #24
commit-bot: I haz the power
3 years, 10 months ago (2017-02-13 07:16:34 UTC) #28
Message was sent while issue was closed.
Committed patchset #3 (id:60001) as
https://chromium.googlesource.com/v8/v8/+/1a2362089ce2af3ed2241110deecfabe80a...

Powered by Google App Engine
This is Rietveld 408576698