| 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 28 matching lines...) Expand all Loading... |
| 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 intptr_t CreateClosureComp::InputCount() const { | 48 intptr_t CreateClosureComp::InputCount() const { |
| 49 intptr_t input_count = 0; | 49 // Type arguments (or null object) and receiver of implicit instance closure. |
| 50 // Optional type arguments. | 50 return function().IsImplicitInstanceClosureFunction() ? 2 : 1; |
| 51 if (type_arguments() != NULL) input_count++; | |
| 52 // Optional receiver. | |
| 53 if (function().IsImplicitInstanceClosureFunction()) input_count++; | |
| 54 return input_count; | |
| 55 } | 51 } |
| 56 | 52 |
| 57 | 53 |
| 58 intptr_t InstanceCallComp::InputCount() const { | 54 intptr_t InstanceCallComp::InputCount() const { |
| 59 return ArgumentCount(); | 55 return ArgumentCount(); |
| 60 } | 56 } |
| 61 | 57 |
| 62 | 58 |
| 63 intptr_t StaticCallComp::InputCount() const { | 59 intptr_t StaticCallComp::InputCount() const { |
| 64 return ArgumentCount(); | 60 return ArgumentCount(); |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 } | 535 } |
| 540 | 536 |
| 541 | 537 |
| 542 RawAbstractType* BinaryOpComp::StaticType() const { | 538 RawAbstractType* BinaryOpComp::StaticType() const { |
| 543 // TODO(srdjan): Compute based on input types (ICData). | 539 // TODO(srdjan): Compute based on input types (ICData). |
| 544 return Type::DynamicType(); | 540 return Type::DynamicType(); |
| 545 } | 541 } |
| 546 | 542 |
| 547 | 543 |
| 548 } // namespace dart | 544 } // namespace dart |
| OLD | NEW |