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

Side by Side Diff: src/compiler/raw-machine-assembler.cc

Issue 1284893002: Reland: [turbofan] Various fixes to allow unboxed doubles as arguments in registers and on the stac… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
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 unified diff | Download patch
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/raw-machine-assembler.h" 5 #include "src/compiler/raw-machine-assembler.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler/pipeline.h" 8 #include "src/compiler/pipeline.h"
9 #include "src/compiler/scheduler.h" 9 #include "src/compiler/scheduler.h"
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 94
95 95
96 void RawMachineAssembler::Return(Node* value) { 96 void RawMachineAssembler::Return(Node* value) {
97 Node* ret = graph()->NewNode(common()->Return(), value); 97 Node* ret = graph()->NewNode(common()->Return(), value);
98 schedule()->AddReturn(CurrentBlock(), ret); 98 schedule()->AddReturn(CurrentBlock(), ret);
99 current_block_ = nullptr; 99 current_block_ = nullptr;
100 } 100 }
101 101
102 102
103 Node* RawMachineAssembler::CallN(CallDescriptor* desc, Node* function,
104 Node** args) {
105 int param_count =
106 static_cast<int>(desc->GetMachineSignature()->parameter_count());
107 Node** buffer = zone()->NewArray<Node*>(param_count + 1);
108 int index = 0;
109 buffer[index++] = function;
110 for (int i = 0; i < param_count; i++) {
111 buffer[index++] = args[i];
112 }
113 Node* call = graph()->NewNode(common()->Call(desc), param_count + 1, buffer);
114 schedule()->AddNode(CurrentBlock(), call);
115 return call;
116 }
117
118
103 Node* RawMachineAssembler::CallFunctionStub0(Node* function, Node* receiver, 119 Node* RawMachineAssembler::CallFunctionStub0(Node* function, Node* receiver,
104 Node* context, Node* frame_state, 120 Node* context, Node* frame_state,
105 CallFunctionFlags flags) { 121 CallFunctionFlags flags) {
106 Callable callable = CodeFactory::CallFunction(isolate(), 0, flags); 122 Callable callable = CodeFactory::CallFunction(isolate(), 0, flags);
107 CallDescriptor* desc = Linkage::GetStubCallDescriptor( 123 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
108 isolate(), zone(), callable.descriptor(), 1, 124 isolate(), zone(), callable.descriptor(), 1,
109 CallDescriptor::kNeedsFrameState, Operator::kNoProperties); 125 CallDescriptor::kNeedsFrameState, Operator::kNoProperties);
110 Node* stub_code = HeapConstant(callable.code()); 126 Node* stub_code = HeapConstant(callable.code());
111 Node* call = graph()->NewNode(common()->Call(desc), stub_code, function, 127 Node* call = graph()->NewNode(common()->Call(desc), stub_code, function,
112 receiver, context, frame_state); 128 receiver, context, frame_state);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 DCHECK_NOT_NULL(schedule_); 263 DCHECK_NOT_NULL(schedule_);
248 DCHECK(current_block_ != nullptr); 264 DCHECK(current_block_ != nullptr);
249 Node* node = graph()->NewNode(op, input_count, inputs); 265 Node* node = graph()->NewNode(op, input_count, inputs);
250 schedule()->AddNode(CurrentBlock(), node); 266 schedule()->AddNode(CurrentBlock(), node);
251 return node; 267 return node;
252 } 268 }
253 269
254 } // namespace compiler 270 } // namespace compiler
255 } // namespace internal 271 } // namespace internal
256 } // namespace v8 272 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698