OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/code-assembler.h" | 5 #include "src/compiler/code-assembler.h" |
6 | 6 |
7 #include <ostream> | 7 #include <ostream> |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 } | 321 } |
322 | 322 |
323 Node* CodeAssembler::Retain(Node* value) { | 323 Node* CodeAssembler::Retain(Node* value) { |
324 return raw_assembler_->Retain(value); | 324 return raw_assembler_->Retain(value); |
325 } | 325 } |
326 | 326 |
327 Node* CodeAssembler::Projection(int index, Node* value) { | 327 Node* CodeAssembler::Projection(int index, Node* value) { |
328 return raw_assembler_->Projection(index, value); | 328 return raw_assembler_->Projection(index, value); |
329 } | 329 } |
330 | 330 |
331 void CodeAssembler::BranchIf(Node* condition, Label* if_true, Label* if_false) { | |
332 Label if_condition_is_true(this), if_condition_is_false(this); | |
333 Branch(condition, &if_condition_is_true, &if_condition_is_false); | |
334 Bind(&if_condition_is_true); | |
335 Goto(if_true); | |
336 Bind(&if_condition_is_false); | |
337 Goto(if_false); | |
338 } | |
339 | |
340 void CodeAssembler::GotoIfException(Node* node, Label* if_exception, | 331 void CodeAssembler::GotoIfException(Node* node, Label* if_exception, |
341 Variable* exception_var) { | 332 Variable* exception_var) { |
342 Label success(this), exception(this, Label::kDeferred); | 333 Label success(this), exception(this, Label::kDeferred); |
343 success.MergeVariables(); | 334 success.MergeVariables(); |
344 exception.MergeVariables(); | 335 exception.MergeVariables(); |
345 DCHECK(!node->op()->HasProperty(Operator::kNoThrow)); | 336 DCHECK(!node->op()->HasProperty(Operator::kNoThrow)); |
346 | 337 |
347 raw_assembler_->Continuations(node, success.label_, exception.label_); | 338 raw_assembler_->Continuations(node, success.label_, exception.label_); |
348 | 339 |
349 Bind(&exception); | 340 Bind(&exception); |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 } | 1122 } |
1132 } | 1123 } |
1133 } | 1124 } |
1134 | 1125 |
1135 bound_ = true; | 1126 bound_ = true; |
1136 } | 1127 } |
1137 | 1128 |
1138 } // namespace compiler | 1129 } // namespace compiler |
1139 } // namespace internal | 1130 } // namespace internal |
1140 } // namespace v8 | 1131 } // namespace v8 |
OLD | NEW |