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

Issue 1419003002: [Interpreter] Unify global and unallocated variable access. (Closed)

Created:
5 years, 2 months ago by rmcilroy
Modified:
5 years, 1 month ago
CC:
v8-reviews_googlegroups.com, ishell, mythria
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[Interpreter] Unify global and unallocated variable access. Unifies the global and unallocated variable type accesses given that --global_var_shortcuts is going away. Lda/StaGlobal is modified to use Load/StoreICs on the global object. The named LoadIC and StoreIC bytecodes are also modified so that they take a constant pool entry index for the name rather than a register, avoiding unecessary LdaConstant bytecodes to be emitted. BUG=v8:4280 LOG=N Committed: https://crrev.com/9a594e783add26ecabc74f611d7e31b9a549ee65 Cr-Commit-Position: refs/heads/master@{#31482}

Patch Set 1 #

Total comments: 7

Patch Set 2 : Rebased #

Total comments: 6

Patch Set 3 : Address review comments. #

Patch Set 4 : Fix unallocated variable error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+760 lines, -694 lines) Patch
M src/compiler/bytecode-graph-builder.cc View 1 1 chunk +24 lines, -0 lines 0 comments Download
M src/compiler/interpreter-assembler.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/interpreter-assembler.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-array-builder.h View 1 5 chunks +14 lines, -7 lines 0 comments Download
M src/interpreter/bytecode-array-builder.cc View 1 4 chunks +68 lines, -6 lines 0 comments Download
M src/interpreter/bytecode-generator.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-generator.cc View 1 2 3 16 chunks +75 lines, -93 lines 0 comments Download
M src/interpreter/bytecodes.h View 1 2 chunks +10 lines, -4 lines 0 comments Download
M src/interpreter/interpreter.h View 1 chunk +16 lines, -5 lines 0 comments Download
M src/interpreter/interpreter.cc View 1 2 7 chunks +151 lines, -30 lines 0 comments Download
M test/cctest/interpreter/test-bytecode-generator.cc View 1 25 chunks +357 lines, -527 lines 0 comments Download
M test/cctest/interpreter/test-interpreter.cc View 1 6 chunks +19 lines, -16 lines 0 comments Download
M test/unittests/interpreter/bytecode-array-builder-unittest.cc View 1 2 chunks +10 lines, -4 lines 0 comments Download
M test/unittests/interpreter/bytecode-array-iterator-unittest.cc View 3 chunks +4 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 24 (9 generated)
rmcilroy
Orion / Benedikt, please take a look. This change is due to the change in ...
5 years, 2 months ago (2015-10-22 09:17:28 UTC) #2
Igor Sheludko
https://codereview.chromium.org/1419003002/diff/1/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc (right): https://codereview.chromium.org/1419003002/diff/1/src/interpreter/bytecode-array-builder.cc#newcode926 src/interpreter/bytecode-array-builder.cc:926: Bytecode BytecodeArrayBuilder::BytecodeForLoadGlobal( It would be necessary to also propagate ...
5 years, 2 months ago (2015-10-22 09:58:36 UTC) #4
rmcilroy
https://codereview.chromium.org/1419003002/diff/1/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc (right): https://codereview.chromium.org/1419003002/diff/1/src/interpreter/bytecode-array-builder.cc#newcode926 src/interpreter/bytecode-array-builder.cc:926: Bytecode BytecodeArrayBuilder::BytecodeForLoadGlobal( On 2015/10/22 09:58:36, Igor Sheludko wrote: > ...
5 years, 2 months ago (2015-10-22 10:13:20 UTC) #5
oth
lgtm with minor comments. https://codereview.chromium.org/1419003002/diff/1/src/interpreter/bytecode-generator.cc File src/interpreter/bytecode-generator.cc (left): https://codereview.chromium.org/1419003002/diff/1/src/interpreter/bytecode-generator.cc#oldcode1197 src/interpreter/bytecode-generator.cc:1197: AccumulatorResultScope accumulator_execution_result(this); A comment here ...
5 years, 2 months ago (2015-10-22 10:54:30 UTC) #6
Benedikt Meurer
lgtm
5 years, 2 months ago (2015-10-22 11:11:15 UTC) #7
rmcilroy
https://codereview.chromium.org/1419003002/diff/1/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc (right): https://codereview.chromium.org/1419003002/diff/1/src/interpreter/bytecode-array-builder.cc#newcode926 src/interpreter/bytecode-array-builder.cc:926: Bytecode BytecodeArrayBuilder::BytecodeForLoadGlobal( On 2015/10/22 10:13:20, rmcilroy wrote: > On ...
5 years, 2 months ago (2015-10-22 13:27:48 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1419003002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1419003002/40001
5 years, 2 months ago (2015-10-22 13:29:02 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: v8_android_arm_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_android_arm_compile_rel/builds/9057) v8_linux_arm_rel on tryserver.v8 (JOB_FAILED, ...
5 years, 2 months ago (2015-10-22 13:30:37 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1419003002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1419003002/40001
5 years, 2 months ago (2015-10-22 13:57:45 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_gcc_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_gcc_compile_rel/builds/7580)
5 years, 2 months ago (2015-10-22 14:10:03 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1419003002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1419003002/60001
5 years, 2 months ago (2015-10-22 14:14:46 UTC) #20
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 2 months ago (2015-10-22 14:55:37 UTC) #21
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/9a594e783add26ecabc74f611d7e31b9a549ee65 Cr-Commit-Position: refs/heads/master@{#31482}
5 years, 2 months ago (2015-10-22 14:56:25 UTC) #22
Igor Sheludko
Forgot to publish my drafts. https://codereview.chromium.org/1419003002/diff/1/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc (right): https://codereview.chromium.org/1419003002/diff/1/src/interpreter/bytecode-array-builder.cc#newcode926 src/interpreter/bytecode-array-builder.cc:926: Bytecode BytecodeArrayBuilder::BytecodeForLoadGlobal( On 2015/10/22 ...
5 years, 1 month ago (2015-11-03 17:52:56 UTC) #23
rmcilroy
5 years, 1 month ago (2015-11-03 18:26:12 UTC) #24
Message was sent while issue was closed.
https://codereview.chromium.org/1419003002/diff/1/src/interpreter/bytecode-ar...
File src/interpreter/bytecode-array-builder.cc (right):

https://codereview.chromium.org/1419003002/diff/1/src/interpreter/bytecode-ar...
src/interpreter/bytecode-array-builder.cc:926: Bytecode
BytecodeArrayBuilder::BytecodeForLoadGlobal(
On 2015/11/03 17:52:56, Igor Sheludko wrote:
> On 2015/10/22 10:13:20, rmcilroy wrote:
> > On 2015/10/22 09:58:36, Igor Sheludko wrote:
> > > It would be necessary to also propagate a TypeofMode to the IC.
> > 
> > What does TypeofMode get used for, I can't see it used in the LoadICs? It's
> not
> > easy to propagate this information (we would need another 2 bytecodes for
> > LdaGlobalTypeOfSloppy / LdaGlobalTypeOfStrict if we need to call different
ICs
> > based on this info.
> 
> See LoadIC::ShoudlThrowReferenceError(). Referencing of non-existing variable
> should not throw if it is mentioned inside typeof. The LoadGlobalViaContext
> implementation also had a bug related to typeof use case.

Yeah, I figured this out and landed the fix in
http://codereview.chromium.org/1422443006/

Powered by Google App Engine
This is Rietveld 408576698