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

Unified Diff: src/interpreter/bytecode-array-builder.cc

Issue 1531693002: [Interpreter] Implement ForIn in bytecode graph builder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@oth-0009-phi
Patch Set: Fix missing comment. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/interpreter/bytecode-array-builder.cc
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
index 688ea0272d2e4b6e32df98598b6e70849922455b..009b6d02fc175e55bc142f87a1e614189327b221 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -856,21 +856,35 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::Return() {
}
-BytecodeArrayBuilder& BytecodeArrayBuilder::ForInPrepare(Register receiver) {
- Output(Bytecode::kForInPrepare, receiver.ToOperand());
+BytecodeArrayBuilder& BytecodeArrayBuilder::ForInPrepare(
+ Register receiver, Register cache_type, Register cache_array,
+ Register cache_length) {
+ Output(Bytecode::kForInPrepare, receiver.ToOperand(), cache_type.ToOperand(),
+ cache_array.ToOperand(), cache_length.ToOperand());
return *this;
}
-BytecodeArrayBuilder& BytecodeArrayBuilder::ForInNext(Register for_in_state,
+BytecodeArrayBuilder& BytecodeArrayBuilder::ForInNext(Register receiver,
+ Register cache_type,
+ Register cache_array,
Register index) {
- Output(Bytecode::kForInNext, for_in_state.ToOperand(), index.ToOperand());
+ Output(Bytecode::kForInNext, receiver.ToOperand(), cache_type.ToOperand(),
+ cache_array.ToOperand(), index.ToOperand());
return *this;
}
-BytecodeArrayBuilder& BytecodeArrayBuilder::ForInDone(Register for_in_state) {
- Output(Bytecode::kForInDone, for_in_state.ToOperand());
+BytecodeArrayBuilder& BytecodeArrayBuilder::ForInDone(Register index,
+ Register cache_length) {
+ Output(Bytecode::kForInDone, index.ToOperand(), cache_length.ToOperand());
+
+ return *this;
+}
+
+
+BytecodeArrayBuilder& BytecodeArrayBuilder::ForInStep(Register index) {
+ Output(Bytecode::kForInStep, index.ToOperand());
return *this;
}

Powered by Google App Engine
This is Rietveld 408576698