| OLD | NEW |
| 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" |
| 6 |
| 5 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 6 #include "src/compiler/pipeline.h" | 8 #include "src/compiler/pipeline.h" |
| 7 #include "src/compiler/raw-machine-assembler.h" | |
| 8 #include "src/compiler/scheduler.h" | 9 #include "src/compiler/scheduler.h" |
| 9 | 10 |
| 10 namespace v8 { | 11 namespace v8 { |
| 11 namespace internal { | 12 namespace internal { |
| 12 namespace compiler { | 13 namespace compiler { |
| 13 | 14 |
| 14 RawMachineAssembler::RawMachineAssembler(Isolate* isolate, Graph* graph, | 15 RawMachineAssembler::RawMachineAssembler(Isolate* isolate, Graph* graph, |
| 15 CallDescriptor* call_descriptor, | 16 CallDescriptor* call_descriptor, |
| 16 MachineType word, | 17 MachineType word, |
| 17 MachineOperatorBuilder::Flags flags) | 18 MachineOperatorBuilder::Flags flags) |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 Node* context, Node* frame_state) { | 118 Node* context, Node* frame_state) { |
| 118 CallDescriptor* descriptor = Linkage::GetJSCallDescriptor( | 119 CallDescriptor* descriptor = Linkage::GetJSCallDescriptor( |
| 119 zone(), false, 1, CallDescriptor::kNeedsFrameState); | 120 zone(), false, 1, CallDescriptor::kNeedsFrameState); |
| 120 Node* call = graph()->NewNode(common()->Call(descriptor), function, receiver, | 121 Node* call = graph()->NewNode(common()->Call(descriptor), function, receiver, |
| 121 context, frame_state); | 122 context, frame_state); |
| 122 schedule()->AddNode(CurrentBlock(), call); | 123 schedule()->AddNode(CurrentBlock(), call); |
| 123 return call; | 124 return call; |
| 124 } | 125 } |
| 125 | 126 |
| 126 | 127 |
| 128 Node* RawMachineAssembler::CallInterpreterHandler(Node* target_handler, |
| 129 Node* bytecodes, |
| 130 Node* dispatch_table) { |
| 131 CallDescriptor* descriptor = |
| 132 Linkage::GetInterpreterDispatchDescriptor(zone(), false); |
| 133 Node* call = graph()->NewNode(common()->Call(descriptor), |
| 134 target_handler, bytecodes, dispatch_table); |
| 135 schedule()->AddNode(CurrentBlock(), call); |
| 136 return call; |
| 137 } |
| 138 |
| 139 |
| 127 Node* RawMachineAssembler::CallRuntime1(Runtime::FunctionId function, | 140 Node* RawMachineAssembler::CallRuntime1(Runtime::FunctionId function, |
| 128 Node* arg0, Node* context, | 141 Node* arg0, Node* context, |
| 129 Node* frame_state) { | 142 Node* frame_state) { |
| 130 CallDescriptor* descriptor = Linkage::GetRuntimeCallDescriptor( | 143 CallDescriptor* descriptor = Linkage::GetRuntimeCallDescriptor( |
| 131 zone(), function, 1, Operator::kNoProperties); | 144 zone(), function, 1, Operator::kNoProperties); |
| 132 | 145 |
| 133 Node* centry = HeapConstant(CEntryStub(isolate(), 1).GetCode()); | 146 Node* centry = HeapConstant(CEntryStub(isolate(), 1).GetCode()); |
| 134 Node* ref = NewNode( | 147 Node* ref = NewNode( |
| 135 common()->ExternalConstant(ExternalReference(function, isolate()))); | 148 common()->ExternalConstant(ExternalReference(function, isolate()))); |
| 136 Node* arity = Int32Constant(1); | 149 Node* arity = Int32Constant(1); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 : CurrentBlock(); | 262 : CurrentBlock(); |
| 250 if (op->opcode() != IrOpcode::kReturn) { | 263 if (op->opcode() != IrOpcode::kReturn) { |
| 251 schedule()->AddNode(block, node); | 264 schedule()->AddNode(block, node); |
| 252 } | 265 } |
| 253 return node; | 266 return node; |
| 254 } | 267 } |
| 255 | 268 |
| 256 } // namespace compiler | 269 } // namespace compiler |
| 257 } // namespace internal | 270 } // namespace internal |
| 258 } // namespace v8 | 271 } // namespace v8 |
| OLD | NEW |