OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/bootstrap.h" | 8 #include "vm/bootstrap.h" |
9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/constant_propagator.h" | 10 #include "vm/constant_propagator.h" |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 } | 412 } |
413 | 413 |
414 | 414 |
415 ConstantInstr::ConstantInstr(const Object& value, TokenPosition token_pos) | 415 ConstantInstr::ConstantInstr(const Object& value, TokenPosition token_pos) |
416 : value_(value), | 416 : value_(value), |
417 token_pos_(token_pos) { | 417 token_pos_(token_pos) { |
418 // Check that the value is not an incorrect Integer representation. | 418 // Check that the value is not an incorrect Integer representation. |
419 ASSERT(!value.IsBigint() || !Bigint::Cast(value).FitsIntoSmi()); | 419 ASSERT(!value.IsBigint() || !Bigint::Cast(value).FitsIntoSmi()); |
420 ASSERT(!value.IsBigint() || !Bigint::Cast(value).FitsIntoInt64()); | 420 ASSERT(!value.IsBigint() || !Bigint::Cast(value).FitsIntoInt64()); |
421 ASSERT(!value.IsMint() || !Smi::IsValid(Mint::Cast(value).AsInt64Value())); | 421 ASSERT(!value.IsMint() || !Smi::IsValid(Mint::Cast(value).AsInt64Value())); |
| 422 ASSERT(!value.IsField() || Field::Cast(value).IsOriginal()); |
422 } | 423 } |
423 | 424 |
424 | 425 |
425 bool ConstantInstr::AttributesEqual(Instruction* other) const { | 426 bool ConstantInstr::AttributesEqual(Instruction* other) const { |
426 ConstantInstr* other_constant = other->AsConstant(); | 427 ConstantInstr* other_constant = other->AsConstant(); |
427 ASSERT(other_constant != NULL); | 428 ASSERT(other_constant != NULL); |
428 return (value().raw() == other_constant->value().raw()); | 429 return (value().raw() == other_constant->value().raw()); |
429 } | 430 } |
430 | 431 |
431 | 432 |
(...skipping 3292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3724 set_native_c_function(native_function); | 3725 set_native_c_function(native_function); |
3725 function().SetIsNativeAutoSetupScope(auto_setup_scope); | 3726 function().SetIsNativeAutoSetupScope(auto_setup_scope); |
3726 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); | 3727 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); |
3727 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); | 3728 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); |
3728 set_is_bootstrap_native(is_bootstrap_native); | 3729 set_is_bootstrap_native(is_bootstrap_native); |
3729 } | 3730 } |
3730 | 3731 |
3731 #undef __ | 3732 #undef __ |
3732 | 3733 |
3733 } // namespace dart | 3734 } // namespace dart |
OLD | NEW |