| 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" | 5 #include "src/compiler/raw-machine-assembler.h" |
| 6 | 6 |
| 7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.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 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 void RawMachineAssembler::PopAndReturn(Node* pop, Node* v1, Node* v2, | 159 void RawMachineAssembler::PopAndReturn(Node* pop, Node* v1, Node* v2, |
| 160 Node* v3) { | 160 Node* v3) { |
| 161 Node* values[] = {pop, v1, v2, v3}; | 161 Node* values[] = {pop, v1, v2, v3}; |
| 162 Node* ret = MakeNode(common()->Return(3), 4, values); | 162 Node* ret = MakeNode(common()->Return(3), 4, values); |
| 163 schedule()->AddReturn(CurrentBlock(), ret); | 163 schedule()->AddReturn(CurrentBlock(), ret); |
| 164 current_block_ = nullptr; | 164 current_block_ = nullptr; |
| 165 } | 165 } |
| 166 | 166 |
| 167 void RawMachineAssembler::DebugBreak() { AddNode(machine()->DebugBreak()); } | 167 void RawMachineAssembler::DebugBreak() { AddNode(machine()->DebugBreak()); } |
| 168 | 168 |
| 169 void RawMachineAssembler::Unreachable() { |
| 170 Node* values[] = {UndefinedConstant()}; // Unused. |
| 171 Node* ret = MakeNode(common()->Throw(), 1, values); |
| 172 schedule()->AddThrow(CurrentBlock(), ret); |
| 173 current_block_ = nullptr; |
| 174 } |
| 175 |
| 169 void RawMachineAssembler::Comment(const char* msg) { | 176 void RawMachineAssembler::Comment(const char* msg) { |
| 170 AddNode(machine()->Comment(msg)); | 177 AddNode(machine()->Comment(msg)); |
| 171 } | 178 } |
| 172 | 179 |
| 173 Node* RawMachineAssembler::CallN(CallDescriptor* desc, int input_count, | 180 Node* RawMachineAssembler::CallN(CallDescriptor* desc, int input_count, |
| 174 Node* const* inputs) { | 181 Node* const* inputs) { |
| 175 DCHECK(!desc->NeedsFrameState()); | 182 DCHECK(!desc->NeedsFrameState()); |
| 176 // +1 is for target. | 183 // +1 is for target. |
| 177 DCHECK_EQ(input_count, desc->ParameterCount() + 1); | 184 DCHECK_EQ(input_count, desc->ParameterCount() + 1); |
| 178 return AddNode(common()->Call(desc), input_count, inputs); | 185 return AddNode(common()->Call(desc), input_count, inputs); |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 | 341 |
| 335 RawMachineLabel::~RawMachineLabel() { | 342 RawMachineLabel::~RawMachineLabel() { |
| 336 // If this DCHECK fails, it means that the label has been bound but it's not | 343 // If this DCHECK fails, it means that the label has been bound but it's not |
| 337 // used, or the opposite. This would cause the register allocator to crash. | 344 // used, or the opposite. This would cause the register allocator to crash. |
| 338 DCHECK_EQ(bound_, used_); | 345 DCHECK_EQ(bound_, used_); |
| 339 } | 346 } |
| 340 | 347 |
| 341 } // namespace compiler | 348 } // namespace compiler |
| 342 } // namespace internal | 349 } // namespace internal |
| 343 } // namespace v8 | 350 } // namespace v8 |
| OLD | NEW |