OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
6 | 6 |
7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
8 #include "vm/flow_graph_builder.h" | 8 #include "vm/flow_graph_builder.h" |
9 #include "vm/object.h" | 9 #include "vm/object.h" |
10 #include "vm/os.h" | 10 #include "vm/os.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 void FlowGraphVisitor::VisitBlocks() { | 38 void FlowGraphVisitor::VisitBlocks() { |
39 for (intptr_t i = 0; i < block_order_.length(); ++i) { | 39 for (intptr_t i = 0; i < block_order_.length(); ++i) { |
40 Instruction* current = block_order_[i]->Accept(this); | 40 Instruction* current = block_order_[i]->Accept(this); |
41 while ((current != NULL) && !current->IsBlockEntry()) { | 41 while ((current != NULL) && !current->IsBlockEntry()) { |
42 current = current->Accept(this); | 42 current = current->Accept(this); |
43 } | 43 } |
44 } | 44 } |
45 } | 45 } |
46 | 46 |
47 | 47 |
| 48 UseVal::UseVal(BindInstr* definition) : definition_(definition) { |
| 49 definition->SetUse(this); |
| 50 } |
| 51 |
| 52 |
48 // ==== Per-instruction input counts. | 53 // ==== Per-instruction input counts. |
49 intptr_t AssertAssignableComp::InputCount() const { | 54 intptr_t AssertAssignableComp::InputCount() const { |
50 // Value and optional instantiator and instantiator type arguments. | 55 // Value and optional instantiator and instantiator type arguments. |
51 intptr_t count = 1; | 56 intptr_t count = 1; |
52 if (instantiator() != NULL) count++; | 57 if (instantiator() != NULL) count++; |
53 if (instantiator_type_arguments() != NULL) count++; | 58 if (instantiator_type_arguments() != NULL) count++; |
54 return count; | 59 return count; |
55 } | 60 } |
56 | 61 |
57 | 62 |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 return AbstractType::null(); | 551 return AbstractType::null(); |
547 } | 552 } |
548 | 553 |
549 | 554 |
550 RawAbstractType* CatchEntryComp::StaticType() const { | 555 RawAbstractType* CatchEntryComp::StaticType() const { |
551 UNREACHABLE(); | 556 UNREACHABLE(); |
552 return AbstractType::null(); | 557 return AbstractType::null(); |
553 } | 558 } |
554 | 559 |
555 | 560 |
| 561 RawAbstractType* BinaryOpComp::StaticType() const { |
| 562 // TODO(srdjan): Compute based on input types (ICData). |
| 563 return Type::DynamicType(); |
| 564 } |
| 565 |
| 566 |
556 } // namespace dart | 567 } // namespace dart |
OLD | NEW |