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

Unified Diff: src/interpreter/interpreter.cc

Issue 1576093004: [Interpreter] Add ForInPrepare runtime function which returns a ObjectTriple. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment and variable name tweaks Created 4 years, 11 months 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/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 01e80583599c631276e5ae2f64d59c316cfa3c1c..355a2054acb1e631390b097ae6589bcd63fa1469 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -1698,14 +1698,16 @@ void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) {
// |cache_length| represent output parameters.
void Interpreter::DoForInPrepare(compiler::InterpreterAssembler* assembler) {
Node* object = __ GetAccumulator();
- Node* result = __ CallRuntime(Runtime::kInterpreterForInPrepare, object);
+ Node* result_triple = __ CallRuntime(Runtime::kForInPrepare, object);
+
+ // Set output registers:
+ // 0 == cache_type, 1 == cache_array, 2 == cache_length
for (int i = 0; i < 3; i++) {
- // 0 == cache_type, 1 == cache_array, 2 == cache_length
- Node* cache_info = __ LoadFixedArrayElement(result, i);
+ Node* cache_info = __ Projection(i, result_triple);
Node* cache_info_reg = __ BytecodeOperandReg(i);
__ StoreRegister(cache_info, cache_info_reg);
}
- __ SetAccumulator(result);
+
__ Dispatch();
}

Powered by Google App Engine
This is Rietveld 408576698