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

Unified Diff: src/compiler/raw-machine-assembler.cc

Issue 1300813005: [Interpreter] Add implementations of arithmetic binary op bytecodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@mstar_v8h
Patch Set: Created 5 years, 4 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/compiler/raw-machine-assembler.cc
diff --git a/src/compiler/raw-machine-assembler.cc b/src/compiler/raw-machine-assembler.cc
index ed5dd9dd1298057c8cb276e8ed67d0a400f382c0..2de412694adad54bd9114fb748b7766557aa7be1 100644
--- a/src/compiler/raw-machine-assembler.cc
+++ b/src/compiler/raw-machine-assembler.cc
@@ -131,8 +131,32 @@ Node* RawMachineAssembler::CallFunctionStub0(Node* function, Node* receiver,
}
-Node* RawMachineAssembler::CallJS0(Node* function, Node* receiver,
- Node* context, Node* frame_state) {
+Node* RawMachineAssembler::CallJS(Node* function, Node* receiver, Node* context,
+ Node** args, int arg_count) {
+ int node_input_count = arg_count + 5;
+ Node** buffer = zone()->NewArray<Node*>(node_input_count);
+ int index = 0;
+ buffer[index++] = function;
+ buffer[index++] = receiver;
+ for (int i = 0; i < arg_count; i++) {
+ buffer[index++] = args[i];
+ }
+ buffer[index++] = context;
+ buffer[index++] = graph()->start();
+ buffer[index++] = graph()->start();
Michael Starzinger 2015/08/19 17:18:56 Please don't add effect and control inputs to the
rmcilroy 2015/08/24 11:49:07 As discussed in https://codereview.chromium.org/12
+
+ CallDescriptor* descriptor = Linkage::GetJSCallDescriptor(
Michael Starzinger 2015/08/19 17:18:56 Would it be possible to just use RawMachineAssembl
rmcilroy 2015/08/24 11:49:07 Done (also removed CallJs0 and renamed CallInterpr
+ zone(), false, arg_count + 1, CallDescriptor::kNoFlags);
+ Node* call =
+ graph()->NewNode(common()->Call(descriptor), node_input_count, buffer);
+ schedule()->AddNode(CurrentBlock(), call);
+ return call;
+}
+
+
+Node* RawMachineAssembler::CallJS0WithFrameState(Node* function, Node* receiver,
+ Node* context,
+ Node* frame_state) {
CallDescriptor* descriptor = Linkage::GetJSCallDescriptor(
zone(), false, 1, CallDescriptor::kNeedsFrameState);
Node* call = graph()->NewNode(common()->Call(descriptor), function, receiver,

Powered by Google App Engine
This is Rietveld 408576698