|
|
Created:
4 years, 2 months ago by Leszek Swirski Modified:
4 years, 2 months ago Reviewers:
Michael Starzinger CC:
v8-reviews_googlegroups.com, rmcilroy Target Ref:
refs/pending/heads/master Project:
v8 Visibility:
Public. |
Description[ignition] Add lookup fast path to generated turbofan graph
Adds a fast-path test and branch for the turbofan graph generated by
BytecodeGraphBuilder for dynamic local lookups.
BUG=v8:5263
Committed: https://crrev.com/d8d964baa226881480e58c13d519b018697c4511
Cr-Commit-Position: refs/heads/master@{#39832}
Patch Set 1 #
Total comments: 1
Patch Set 2 : Add explanatory comment for context search #Messages
Total messages: 16 (8 generated)
The CQ bit was checked by leszeks@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
leszeks@chromium.org changed reviewers: + mstarzinger@chromium.org
https://codereview.chromium.org/2378653003/diff/1/src/compiler/bytecode-graph... File src/compiler/bytecode-graph-builder.cc (right): https://codereview.chromium.org/2378653003/diff/1/src/compiler/bytecode-graph... src/compiler/bytecode-graph-builder.cc:897: for (uint32_t d = 0; d < depth; d++) { Shouldn't this be "<=" here? IIUC we also want to do an extension check on the actual target context itself as well. Unless I am missing something. Also, is InterpreterAssembler::GotoIfHasContextExtensionUpToDepth suffering from the same problem?
On 2016/09/28 13:55:21, Michael Starzinger wrote: > https://codereview.chromium.org/2378653003/diff/1/src/compiler/bytecode-graph... > File src/compiler/bytecode-graph-builder.cc (right): > > https://codereview.chromium.org/2378653003/diff/1/src/compiler/bytecode-graph... > src/compiler/bytecode-graph-builder.cc:897: for (uint32_t d = 0; d < depth; d++) > { > Shouldn't this be "<=" here? IIUC we also want to do an extension check on the > actual target context itself as well. Unless I am missing something. > > Also, is InterpreterAssembler::GotoIfHasContextExtensionUpToDepth suffering from > the same problem? I'm glad you asked! In fact, I had the very same thought yesterday, but after talking to Adam Klein we decided (well, he decided) that it's impossible for an eval to shadow a local in the same scope, as logically any 'var' in the eval is hoisted up to the top of the function -- so, you never need to check the variable's own scope for context extensions which may shadow it.
On 2016/09/28 13:58:34, Leszek Swirski wrote: > On 2016/09/28 13:55:21, Michael Starzinger wrote: > > > https://codereview.chromium.org/2378653003/diff/1/src/compiler/bytecode-graph... > > File src/compiler/bytecode-graph-builder.cc (right): > > > > > https://codereview.chromium.org/2378653003/diff/1/src/compiler/bytecode-graph... > > src/compiler/bytecode-graph-builder.cc:897: for (uint32_t d = 0; d < depth; > d++) > > { > > Shouldn't this be "<=" here? IIUC we also want to do an extension check on the > > actual target context itself as well. Unless I am missing something. > > > > Also, is InterpreterAssembler::GotoIfHasContextExtensionUpToDepth suffering > from > > the same problem? > > I'm glad you asked! In fact, I had the very same thought yesterday, but after > talking to Adam Klein we decided (well, he decided) that it's impossible for an > eval to shadow a local in the same scope, as logically any 'var' in the eval is > hoisted up to the top of the function -- so, you never need to check the > variable's own scope for context extensions which may shadow it. Ack, got it, thanks for the explanation. As discussed offline, lets leave a comment here in that regard to record our train of thought.
LGTM otherwise.
The CQ bit was checked by leszeks@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from mstarzinger@chromium.org Link to the patchset: https://codereview.chromium.org/2378653003/#ps20001 (title: "Add explanatory comment for context search")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== [ignition] Add lookup fast path to generated turbofan graph Adds a fast-path test and branch for the turbofan graph generated by BytecodeGraphBuilder for dynamic local lookups. BUG=v8:5263 ========== to ========== [ignition] Add lookup fast path to generated turbofan graph Adds a fast-path test and branch for the turbofan graph generated by BytecodeGraphBuilder for dynamic local lookups. BUG=v8:5263 Committed: https://crrev.com/d8d964baa226881480e58c13d519b018697c4511 Cr-Commit-Position: refs/heads/master@{#39832} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/d8d964baa226881480e58c13d519b018697c4511 Cr-Commit-Position: refs/heads/master@{#39832} |