| 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/dart_entry.h" | 8 #include "vm/dart_entry.h" |
| 9 #include "vm/flow_graph_allocator.h" | 9 #include "vm/flow_graph_allocator.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 return AbstractType::null(); | 799 return AbstractType::null(); |
| 800 } | 800 } |
| 801 | 801 |
| 802 | 802 |
| 803 RawAbstractType* CheckStackOverflowComp::CompileType() const { | 803 RawAbstractType* CheckStackOverflowComp::CompileType() const { |
| 804 return AbstractType::null(); | 804 return AbstractType::null(); |
| 805 } | 805 } |
| 806 | 806 |
| 807 | 807 |
| 808 RawAbstractType* BinaryOpComp::CompileType() const { | 808 RawAbstractType* BinaryOpComp::CompileType() const { |
| 809 // TODO(srdjan): Add mint, smi and double type to object store. | |
| 810 // TODO(srdjan): Convert to use with class-ids instead of types. | 809 // TODO(srdjan): Convert to use with class-ids instead of types. |
| 811 if (operands_type() == kMintOperands) { | 810 if (operands_type() == kMintOperands) { |
| 812 ObjectStore* object_store = Isolate::Current()->object_store(); | 811 return Isolate::Current()->object_store()->mint_type(); |
| 813 return Type::NewNonParameterizedType( | |
| 814 Class::Handle(object_store->mint_class())); | |
| 815 } else if (op_kind() == Token::kSHL) { | 812 } else if (op_kind() == Token::kSHL) { |
| 816 return Type::IntInterface(); | 813 return Type::IntInterface(); |
| 817 } else { | 814 } else { |
| 818 ASSERT(operands_type() == kSmiOperands); | 815 ASSERT(operands_type() == kSmiOperands); |
| 819 ObjectStore* object_store = Isolate::Current()->object_store(); | 816 return Isolate::Current()->object_store()->smi_type(); |
| 820 return Type::NewNonParameterizedType( | |
| 821 Class::Handle(object_store->smi_class())); | |
| 822 } | 817 } |
| 823 } | 818 } |
| 824 | 819 |
| 825 | 820 |
| 826 RawAbstractType* DoubleBinaryOpComp::CompileType() const { | 821 RawAbstractType* DoubleBinaryOpComp::CompileType() const { |
| 827 return Type::DoubleInterface(); | 822 return Type::DoubleInterface(); |
| 828 } | 823 } |
| 829 | 824 |
| 830 | 825 |
| 831 RawAbstractType* UnarySmiOpComp::CompileType() const { | 826 RawAbstractType* UnarySmiOpComp::CompileType() const { |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1314 if (compiler->is_ssa()) { | 1309 if (compiler->is_ssa()) { |
| 1315 ASSERT(locs()->in(0).IsRegister()); | 1310 ASSERT(locs()->in(0).IsRegister()); |
| 1316 __ PushRegister(locs()->in(0).reg()); | 1311 __ PushRegister(locs()->in(0).reg()); |
| 1317 } | 1312 } |
| 1318 } | 1313 } |
| 1319 | 1314 |
| 1320 | 1315 |
| 1321 #undef __ | 1316 #undef __ |
| 1322 | 1317 |
| 1323 } // namespace dart | 1318 } // namespace dart |
| OLD | NEW |