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

Side by Side Diff: src/interpreter/interpreter.cc

Issue 1456483002: [Interpreter] Add New, CallRuntime and CallJSRuntime support to BytecodeGraphBuilder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@rmcilroy-0001-globals
Patch Set: Rebase Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/interpreter/interpreter.h" 5 #include "src/interpreter/interpreter.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/compiler/interpreter-assembler.h" 9 #include "src/compiler/interpreter-assembler.h"
10 #include "src/factory.h" 10 #include "src/factory.h"
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 __ LoadObjectField(global, JSGlobalObject::kNativeContextOffset); 946 __ LoadObjectField(global, JSGlobalObject::kNativeContextOffset);
947 Node* function = __ LoadContextSlot(native_context, context_index); 947 Node* function = __ LoadContextSlot(native_context, context_index);
948 948
949 // Call the function. 949 // Call the function.
950 Node* result = __ CallJS(function, first_arg, args_count); 950 Node* result = __ CallJS(function, first_arg, args_count);
951 __ SetAccumulator(result); 951 __ SetAccumulator(result);
952 __ Dispatch(); 952 __ Dispatch();
953 } 953 }
954 954
955 955
956 // New <constructor> <arg_count> 956 // New <constructor> <first_arg> <arg_count>
957 // 957 //
958 // Call operator new with |constructor| and the first argument in 958 // Call operator new with |constructor| and the first argument in
959 // register |first_arg| and |arg_count| arguments in subsequent 959 // register |first_arg| and |arg_count| arguments in subsequent
960 // 960 //
961 void Interpreter::DoNew(compiler::InterpreterAssembler* assembler) { 961 void Interpreter::DoNew(compiler::InterpreterAssembler* assembler) {
962 Callable ic = CodeFactory::InterpreterPushArgsAndConstruct(isolate_); 962 Callable ic = CodeFactory::InterpreterPushArgsAndConstruct(isolate_);
963 Node* constructor_reg = __ BytecodeOperandReg(0); 963 Node* constructor_reg = __ BytecodeOperandReg(0);
964 Node* constructor = __ LoadRegister(constructor_reg); 964 Node* constructor = __ LoadRegister(constructor_reg);
965 Node* first_arg_reg = __ BytecodeOperandReg(1); 965 Node* first_arg_reg = __ BytecodeOperandReg(1);
966 Node* first_arg = __ RegisterLocation(first_arg_reg); 966 Node* first_arg = __ RegisterLocation(first_arg_reg);
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 Node* cache_length = __ LoadFixedArrayElement(for_in_state, 3); 1465 Node* cache_length = __ LoadFixedArrayElement(for_in_state, 3);
1466 Node* result = __ CallRuntime(Runtime::kForInDone, index, cache_length); 1466 Node* result = __ CallRuntime(Runtime::kForInDone, index, cache_length);
1467 __ SetAccumulator(result); 1467 __ SetAccumulator(result);
1468 __ Dispatch(); 1468 __ Dispatch();
1469 } 1469 }
1470 1470
1471 1471
1472 } // namespace interpreter 1472 } // namespace interpreter
1473 } // namespace internal 1473 } // namespace internal
1474 } // namespace v8 1474 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | test/cctest/compiler/test-run-bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698