| 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/pipeline.h" | 5 #include "src/compiler/pipeline.h" |
| 6 #include "src/compiler/raw-machine-assembler.h" | 6 #include "src/compiler/raw-machine-assembler.h" |
| 7 #include "src/compiler/scheduler.h" | 7 #include "src/compiler/scheduler.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 void RawMachineAssembler::Return(Node* value) { | 77 void RawMachineAssembler::Return(Node* value) { |
| 78 schedule()->AddReturn(CurrentBlock(), value); | 78 schedule()->AddReturn(CurrentBlock(), value); |
| 79 current_block_ = NULL; | 79 current_block_ = NULL; |
| 80 } | 80 } |
| 81 | 81 |
| 82 | 82 |
| 83 Node* RawMachineAssembler::CallFunctionStub0(Node* function, Node* receiver, | 83 Node* RawMachineAssembler::CallFunctionStub0(Node* function, Node* receiver, |
| 84 Node* context, Node* frame_state, | 84 Node* context, Node* frame_state, |
| 85 CallFunctionFlags flags) { | 85 CallFunctionFlags flags) { |
| 86 CallFunctionStub stub(isolate(), 0, flags); | 86 CallFunctionStub stub(isolate(), 0, flags); |
| 87 CodeStubInterfaceDescriptor* d = isolate()->code_stub_interface_descriptor( | 87 CodeStubInterfaceDescriptor d; |
| 88 reinterpret_cast<CodeStub*>(&stub)->MajorKey()); | 88 stub.InitializeInterfaceDescriptor(&d); |
| 89 stub.InitializeInterfaceDescriptor(d); | |
| 90 | 89 |
| 91 CallDescriptor* desc = Linkage::GetStubCallDescriptor( | 90 CallDescriptor* desc = Linkage::GetStubCallDescriptor( |
| 92 d, 1, CallDescriptor::kNeedsFrameState, zone()); | 91 &d, 1, CallDescriptor::kNeedsFrameState, zone()); |
| 93 Node* stub_code = HeapConstant(stub.GetCode()); | 92 Node* stub_code = HeapConstant(stub.GetCode()); |
| 94 Node* call = graph()->NewNode(common()->Call(desc), stub_code, function, | 93 Node* call = graph()->NewNode(common()->Call(desc), stub_code, function, |
| 95 receiver, context, frame_state); | 94 receiver, context, frame_state); |
| 96 schedule()->AddNode(CurrentBlock(), call); | 95 schedule()->AddNode(CurrentBlock(), call); |
| 97 return call; | 96 return call; |
| 98 } | 97 } |
| 99 | 98 |
| 100 | 99 |
| 101 Node* RawMachineAssembler::CallJS0(Node* function, Node* receiver, | 100 Node* RawMachineAssembler::CallJS0(Node* function, Node* receiver, |
| 102 Node* context, Node* frame_state) { | 101 Node* context, Node* frame_state) { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 Node* node = graph()->NewNode(op, input_count, inputs); | 158 Node* node = graph()->NewNode(op, input_count, inputs); |
| 160 BasicBlock* block = op->opcode() == IrOpcode::kParameter ? schedule()->start() | 159 BasicBlock* block = op->opcode() == IrOpcode::kParameter ? schedule()->start() |
| 161 : CurrentBlock(); | 160 : CurrentBlock(); |
| 162 schedule()->AddNode(block, node); | 161 schedule()->AddNode(block, node); |
| 163 return node; | 162 return node; |
| 164 } | 163 } |
| 165 | 164 |
| 166 } // namespace compiler | 165 } // namespace compiler |
| 167 } // namespace internal | 166 } // namespace internal |
| 168 } // namespace v8 | 167 } // namespace v8 |
| OLD | NEW |