| 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/flow_graph_builder.h" | 5 #include "vm/flow_graph_builder.h" |
| 6 | 6 |
| 7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
| 9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1539 Value* EffectGraphVisitor::BuildAssignableValue(TokenPosition token_pos, | 1539 Value* EffectGraphVisitor::BuildAssignableValue(TokenPosition token_pos, |
| 1540 Value* value, | 1540 Value* value, |
| 1541 const AbstractType& dst_type, | 1541 const AbstractType& dst_type, |
| 1542 const String& dst_name) { | 1542 const String& dst_name) { |
| 1543 if (CanSkipTypeCheck(token_pos, value, dst_type, dst_name)) { | 1543 if (CanSkipTypeCheck(token_pos, value, dst_type, dst_name)) { |
| 1544 return value; | 1544 return value; |
| 1545 } | 1545 } |
| 1546 return Bind(BuildAssertAssignable(token_pos, value, dst_type, dst_name)); | 1546 return Bind(BuildAssertAssignable(token_pos, value, dst_type, dst_name)); |
| 1547 } | 1547 } |
| 1548 | 1548 |
| 1549 |
| 1549 static bool simpleInstanceOfType(const AbstractType& type) { | 1550 static bool simpleInstanceOfType(const AbstractType& type) { |
| 1550 // Bail if the type is still uninstantiated at compile time. | 1551 // Bail if the type is still uninstantiated at compile time. |
| 1551 if (!type.IsInstantiated()) return false; | 1552 if (!type.IsInstantiated()) return false; |
| 1552 | 1553 |
| 1553 // Bail if the type is a function or a Dart Function type. | 1554 // Bail if the type is a function or a Dart Function type. |
| 1554 if (type.IsFunctionType() || type.IsDartFunctionType()) return false; | 1555 if (type.IsFunctionType() || type.IsDartFunctionType()) return false; |
| 1555 | 1556 |
| 1556 ASSERT(type.HasResolvedTypeClass()); | 1557 ASSERT(type.HasResolvedTypeClass()); |
| 1557 const Class& type_class = Class::Handle(type.type_class()); | 1558 const Class& type_class = Class::Handle(type.type_class()); |
| 1558 // Bail if the type has any type parameters. | 1559 // Bail if the type has any type parameters. |
| (...skipping 3079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4638 block_marks); | 4639 block_marks); |
| 4639 ASSERT(found); | 4640 ASSERT(found); |
| 4640 } | 4641 } |
| 4641 | 4642 |
| 4642 | 4643 |
| 4643 void FlowGraphBuilder::Bailout(const char* reason) const { | 4644 void FlowGraphBuilder::Bailout(const char* reason) const { |
| 4644 parsed_function_.Bailout("FlowGraphBuilder", reason); | 4645 parsed_function_.Bailout("FlowGraphBuilder", reason); |
| 4645 } | 4646 } |
| 4646 | 4647 |
| 4647 } // namespace dart | 4648 } // namespace dart |
| OLD | NEW |