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

Issue 2535753004: [turbofan] Add appropriate types to express Callable. (Closed)

Created:
4 years ago by Benedikt Meurer
Modified:
4 years ago
Reviewers:
Jarin
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[turbofan] Add appropriate types to express Callable. This introduces three new types OtherCallable, CallableProxy (and OtherProxy), and BoundFunction to make it possible to express Callable in the Type system. It also forces all undetectable receivers to be Callable, which matches the use case for undetectable, namely document.all (guarded by proper checks and tests). It also uses these new types to properly optimize instanceof (indirectly via OrdinaryHasInstance) based on the type of the constructor and the object. So we are able to constant-fold certain instanceof expressions based on types and completely avoid the builtin call. R=jarin@chromium.org BUG=v8:5267 Committed: https://crrev.com/777e142ca162dcbfb0bec7b76ae0595bb4597310 Cr-Commit-Position: refs/heads/master@{#41345}

Patch Set 1 #

Patch Set 2 : Add spec comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -22 lines) Patch
M src/api-natives.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M src/compiler/js-typed-lowering.cc View 1 1 chunk +19 lines, -0 lines 0 comments Download
M src/compiler/opcodes.h View 2 chunks +4 lines, -4 lines 0 comments Download
M src/compiler/typer.cc View 1 chunk +7 lines, -2 lines 0 comments Download
M src/compiler/types.h View 2 chunks +16 lines, -8 lines 0 comments Download
M src/compiler/types.cc View 2 chunks +17 lines, -3 lines 0 comments Download
M src/runtime/runtime-test.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M test/cctest/test-api.cc View 5 chunks +6 lines, -5 lines 0 comments Download
A test/mjsunit/compiler/instanceof-opt1.js View 1 chunk +18 lines, -0 lines 0 comments Download
A test/mjsunit/compiler/instanceof-opt2.js View 1 chunk +16 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 14 (8 generated)
Benedikt Meurer
4 years ago (2016-11-29 10:05:33 UTC) #1
Benedikt Meurer
Hey Jaro, Here's the CL for expressing Callable in the type system. This only uses ...
4 years ago (2016-11-29 10:07:25 UTC) #4
Jarin
lgtm
4 years ago (2016-11-29 10:19:56 UTC) #7
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/2535753004/20001
4 years ago (2016-11-29 10:20:23 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-11-29 10:47:57 UTC) #12
commit-bot: I haz the power
4 years ago (2016-11-29 10:48:23 UTC) #14
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/777e142ca162dcbfb0bec7b76ae0595bb4597310
Cr-Commit-Position: refs/heads/master@{#41345}

Powered by Google App Engine
This is Rietveld 408576698