| 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/code-factory.h" | 7 #include "src/code-factory.h" | 
| 8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" | 
| 9 #include "src/compiler/pipeline.h" | 9 #include "src/compiler/pipeline.h" | 
| 10 #include "src/compiler/scheduler.h" | 10 #include "src/compiler/scheduler.h" | 
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 105   } | 105   } | 
| 106   BasicBlock* default_block = schedule()->NewBasicBlock(); | 106   BasicBlock* default_block = schedule()->NewBasicBlock(); | 
| 107   Node* default_node = graph()->NewNode(common()->IfDefault(), switch_node); | 107   Node* default_node = graph()->NewNode(common()->IfDefault(), switch_node); | 
| 108   schedule()->AddNode(default_block, default_node); | 108   schedule()->AddNode(default_block, default_node); | 
| 109   schedule()->AddGoto(default_block, Use(default_label)); | 109   schedule()->AddGoto(default_block, Use(default_label)); | 
| 110   succ_blocks[case_count] = default_block; | 110   succ_blocks[case_count] = default_block; | 
| 111   schedule()->AddSwitch(CurrentBlock(), switch_node, succ_blocks, succ_count); | 111   schedule()->AddSwitch(CurrentBlock(), switch_node, succ_blocks, succ_count); | 
| 112   current_block_ = nullptr; | 112   current_block_ = nullptr; | 
| 113 } | 113 } | 
| 114 | 114 | 
| 115 |  | 
| 116 void RawMachineAssembler::Return(Node* value) { | 115 void RawMachineAssembler::Return(Node* value) { | 
| 117   Node* ret = MakeNode(common()->Return(), 1, &value); | 116   Node* ret = MakeNode(common()->Return(), 1, &value); | 
| 118   schedule()->AddReturn(CurrentBlock(), ret); | 117   schedule()->AddReturn(CurrentBlock(), ret); | 
| 119   current_block_ = nullptr; | 118   current_block_ = nullptr; | 
| 120 } | 119 } | 
| 121 | 120 | 
| 122 | 121 | 
| 123 void RawMachineAssembler::Return(Node* v1, Node* v2) { | 122 void RawMachineAssembler::Return(Node* v1, Node* v2) { | 
| 124   Node* values[] = {v1, v2}; | 123   Node* values[] = {v1, v2}; | 
| 125   Node* ret = MakeNode(common()->Return(2), 2, values); | 124   Node* ret = MakeNode(common()->Return(2), 2, values); | 
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 494   // The raw machine assembler nodes do not have effect and control inputs, | 493   // The raw machine assembler nodes do not have effect and control inputs, | 
| 495   // so we disable checking input counts here. | 494   // so we disable checking input counts here. | 
| 496   return graph()->NewNodeUnchecked(op, input_count, inputs); | 495   return graph()->NewNodeUnchecked(op, input_count, inputs); | 
| 497 } | 496 } | 
| 498 | 497 | 
| 499 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); } | 498 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); } | 
| 500 | 499 | 
| 501 }  // namespace compiler | 500 }  // namespace compiler | 
| 502 }  // namespace internal | 501 }  // namespace internal | 
| 503 }  // namespace v8 | 502 }  // namespace v8 | 
| OLD | NEW | 
|---|