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

Issue 1422033002: [Interpreter] Add support for for..in. (Closed)

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

Description

[Interpreter] Add support for for..in. For..in introduces 3 new bytecodes ForInPrepare, ForInNext, and ForInDone to start a for..in loop, get the next element, and check if the loop is done. For..in builds upon new LoopBuilder constructs for conditionally breaking and continuing during iteration: BreakIf{Null|Undefined} and ContinueIf{Null|Undefined}. New conditional jump bytecodes support this succinctly: JumpIfNull and JumpIfUndefined. Add missing check to BytecodeLabel that could allow multiple forward referencess to the same label which is not supported. BUG=v8:4280 LOG=N Committed: https://crrev.com/dcf757a16fa2f1292078f27114bdde0c8f9d5d10 Cr-Commit-Position: refs/heads/master@{#31651}

Patch Set 1 #

Patch Set 2 : Fixes for 32-bit. #

Total comments: 33

Patch Set 3 : Incorporate comments and fix a failure in test262. #

Patch Set 4 : Rebase only. #

Patch Set 5 : Add interpreter assembler test for LoadFixedArrayElement. #

Patch Set 6 : Update comments. #

Total comments: 19

Patch Set 7 : Incorporate review comments. #

Patch Set 8 : Comment nits. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+926 lines, -31 lines) Patch
M .gitignore View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/bytecode-graph-builder.cc View 1 2 3 3 chunks +48 lines, -0 lines 0 comments Download
M src/compiler/interpreter-assembler.h View 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/interpreter-assembler.cc View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
M src/compiler/raw-machine-assembler.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-array-builder.h View 1 2 3 4 5 6 4 chunks +9 lines, -1 line 0 comments Download
M src/interpreter/bytecode-array-builder.cc View 1 2 3 4 5 6 6 chunks +44 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-generator.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/interpreter/bytecode-generator.cc View 1 2 3 4 5 6 1 chunk +110 lines, -1 line 0 comments Download
M src/interpreter/bytecodes.h View 1 2 3 4 5 6 2 chunks +12 lines, -0 lines 0 comments Download
M src/interpreter/bytecodes.cc View 1 2 2 chunks +6 lines, -2 lines 0 comments Download
M src/interpreter/control-flow-builders.h View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M src/interpreter/control-flow-builders.cc View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
M src/interpreter/interpreter.cc View 1 2 3 4 5 6 7 3 chunks +118 lines, -0 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M src/runtime/runtime-interpreter.cc View 1 2 3 4 5 6 1 chunk +48 lines, -0 lines 0 comments Download
M test/cctest/interpreter/test-bytecode-generator.cc View 1 2 3 4 5 6 1 chunk +207 lines, -0 lines 0 comments Download
M test/cctest/interpreter/test-interpreter.cc View 1 2 3 4 5 6 3 chunks +237 lines, -11 lines 1 comment Download
M test/unittests/compiler/interpreter-assembler-unittest.cc View 1 2 3 4 2 chunks +30 lines, -13 lines 0 comments Download
M test/unittests/interpreter/bytecode-array-builder-unittest.cc View 1 2 3 4 5 6 3 chunks +10 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (5 generated)
oth
verwaest@chromium.org: Please review changes in runtime. Do you have any thoughts on the duplication of ...
5 years, 1 month ago (2015-10-26 12:10:50 UTC) #3
Benedikt Meurer
https://codereview.chromium.org/1422033002/diff/20001/src/runtime/runtime-interpreter.cc File src/runtime/runtime-interpreter.cc (right): https://codereview.chromium.org/1422033002/diff/20001/src/runtime/runtime-interpreter.cc#newcode176 src/runtime/runtime-interpreter.cc:176: RUNTIME_FUNCTION(Runtime_InterpreterForInPrepare) { Is this is a temporary thing? Because ...
5 years, 1 month ago (2015-10-26 12:17:37 UTC) #4
rmcilroy
Looks pretty good. A couple more comments. https://codereview.chromium.org/1422033002/diff/20001/src/compiler/interpreter-assembler.cc File src/compiler/interpreter-assembler.cc (right): https://codereview.chromium.org/1422033002/diff/20001/src/compiler/interpreter-assembler.cc#newcode294 src/compiler/interpreter-assembler.cc:294: Node* InterpreterAssembler::LoadFixedArrayElement(Node* ...
5 years, 1 month ago (2015-10-26 14:04:01 UTC) #5
oth
Thanks, comments incorporated. PTAL. https://codereview.chromium.org/1422033002/diff/20001/src/compiler/interpreter-assembler.cc File src/compiler/interpreter-assembler.cc (right): https://codereview.chromium.org/1422033002/diff/20001/src/compiler/interpreter-assembler.cc#newcode294 src/compiler/interpreter-assembler.cc:294: Node* InterpreterAssembler::LoadFixedArrayElement(Node* fixed_array, On 2015/10/26 ...
5 years, 1 month ago (2015-10-28 11:53:12 UTC) #6
Benedikt Meurer
LGTM for runtime-interpreter.cc and bytecode choice. https://codereview.chromium.org/1422033002/diff/20001/src/runtime/runtime-interpreter.cc File src/runtime/runtime-interpreter.cc (right): https://codereview.chromium.org/1422033002/diff/20001/src/runtime/runtime-interpreter.cc#newcode176 src/runtime/runtime-interpreter.cc:176: RUNTIME_FUNCTION(Runtime_InterpreterForInPrepare) { Ack. ...
5 years, 1 month ago (2015-10-28 12:03:31 UTC) #7
rmcilroy
lgtm once comments are addressed. https://codereview.chromium.org/1422033002/diff/100001/src/compiler/interpreter-assembler.h File src/compiler/interpreter-assembler.h (right): https://codereview.chromium.org/1422033002/diff/100001/src/compiler/interpreter-assembler.h#newcode83 src/compiler/interpreter-assembler.h:83: Node* UndefinedConstant(); nit - ...
5 years, 1 month ago (2015-10-28 13:46:23 UTC) #8
rmcilroy
On 2015/10/28 13:46:23, rmcilroy wrote: > lgtm once comments are addressed. > > https://codereview.chromium.org/1422033002/diff/100001/src/compiler/interpreter-assembler.h > ...
5 years, 1 month ago (2015-10-28 17:20:27 UTC) #9
oth
Thanks, comments incorporated. https://codereview.chromium.org/1422033002/diff/100001/src/compiler/interpreter-assembler.h File src/compiler/interpreter-assembler.h (right): https://codereview.chromium.org/1422033002/diff/100001/src/compiler/interpreter-assembler.h#newcode83 src/compiler/interpreter-assembler.h:83: Node* UndefinedConstant(); On 2015/10/28 13:46:22, rmcilroy ...
5 years, 1 month ago (2015-10-28 22:50:40 UTC) #11
oth
On 2015/10/28 22:50:40, oth wrote: > Thanks, comments incorporated. > > https://codereview.chromium.org/1422033002/diff/100001/src/compiler/interpreter-assembler.h > File src/compiler/interpreter-assembler.h ...
5 years, 1 month ago (2015-10-29 06:07:58 UTC) #12
rmcilroy
LGTM, thanks! https://codereview.chromium.org/1422033002/diff/100001/src/interpreter/bytecode-generator.cc File src/interpreter/bytecode-generator.cc (right): https://codereview.chromium.org/1422033002/diff/100001/src/interpreter/bytecode-generator.cc#newcode716 src/interpreter/bytecode-generator.cc:716: Visit(stmt->body()); On 2015/10/28 22:50:40, oth wrote: > ...
5 years, 1 month ago (2015-10-29 10:53:45 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1422033002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1422033002/140001
5 years, 1 month ago (2015-10-29 11:47:32 UTC) #16
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 1 month ago (2015-10-29 12:06:04 UTC) #17
commit-bot: I haz the power
5 years, 1 month ago (2015-10-29 12:06:32 UTC) #18
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/dcf757a16fa2f1292078f27114bdde0c8f9d5d10
Cr-Commit-Position: refs/heads/master@{#31651}

Powered by Google App Engine
This is Rietveld 408576698