| 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 "platform/assert.h" | 5 #include "platform/assert.h" |
| 6 #include "vm/assembler.h" | 6 #include "vm/assembler.h" |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/isolate.h" | 8 #include "vm/isolate.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 #include "vm/object_store.h" | 10 #include "vm/object_store.h" |
| (...skipping 2622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2633 TEST_CASE(SubtypeTestCache) { | 2633 TEST_CASE(SubtypeTestCache) { |
| 2634 String& class_name = String::Handle(String::NewSymbol("EmptyClass")); | 2634 String& class_name = String::Handle(String::NewSymbol("EmptyClass")); |
| 2635 Script& script = Script::Handle(); | 2635 Script& script = Script::Handle(); |
| 2636 const Class& empty_class = | 2636 const Class& empty_class = |
| 2637 Class::Handle(Class::New(class_name, script, Scanner::kDummyTokenIndex)); | 2637 Class::Handle(Class::New(class_name, script, Scanner::kDummyTokenIndex)); |
| 2638 SubtypeTestCache& cache = SubtypeTestCache::Handle(SubtypeTestCache::New()); | 2638 SubtypeTestCache& cache = SubtypeTestCache::Handle(SubtypeTestCache::New()); |
| 2639 ASSERT(!cache.IsNull()); | 2639 ASSERT(!cache.IsNull()); |
| 2640 EXPECT_EQ(0, cache.NumberOfChecks()); | 2640 EXPECT_EQ(0, cache.NumberOfChecks()); |
| 2641 const TypeArguments& targ_0 = TypeArguments::Handle(TypeArguments::New(2)); | 2641 const TypeArguments& targ_0 = TypeArguments::Handle(TypeArguments::New(2)); |
| 2642 const TypeArguments& targ_1 = TypeArguments::Handle(TypeArguments::New(3)); | 2642 const TypeArguments& targ_1 = TypeArguments::Handle(TypeArguments::New(3)); |
| 2643 cache.AddCheck(empty_class, targ_0, targ_1, Bool::Handle(Bool::True())); | 2643 cache.AddCheck(empty_class.id(), targ_0, targ_1, Bool::Handle(Bool::True())); |
| 2644 EXPECT_EQ(1, cache.NumberOfChecks()); | 2644 EXPECT_EQ(1, cache.NumberOfChecks()); |
| 2645 Class& test_class = Class::Handle(); | 2645 intptr_t test_class_id = -1; |
| 2646 AbstractTypeArguments& test_targ_0 = AbstractTypeArguments::Handle(); | 2646 AbstractTypeArguments& test_targ_0 = AbstractTypeArguments::Handle(); |
| 2647 AbstractTypeArguments& test_targ_1 = AbstractTypeArguments::Handle(); | 2647 AbstractTypeArguments& test_targ_1 = AbstractTypeArguments::Handle(); |
| 2648 Bool& test_result = Bool::Handle(); | 2648 Bool& test_result = Bool::Handle(); |
| 2649 cache.GetCheck(0, &test_class, &test_targ_0, &test_targ_1, &test_result); | 2649 cache.GetCheck(0, &test_class_id, &test_targ_0, &test_targ_1, &test_result); |
| 2650 EXPECT_EQ(empty_class.raw(), test_class.raw()); | 2650 EXPECT_EQ(empty_class.id(), test_class_id); |
| 2651 EXPECT_EQ(targ_0.raw(), test_targ_0.raw()); | 2651 EXPECT_EQ(targ_0.raw(), test_targ_0.raw()); |
| 2652 EXPECT_EQ(targ_1.raw(), test_targ_1.raw()); | 2652 EXPECT_EQ(targ_1.raw(), test_targ_1.raw()); |
| 2653 EXPECT_EQ(Bool::True(), test_result.raw()); | 2653 EXPECT_EQ(Bool::True(), test_result.raw()); |
| 2654 } | 2654 } |
| 2655 | 2655 |
| 2656 | 2656 |
| 2657 TEST_CASE(FieldTests) { | 2657 TEST_CASE(FieldTests) { |
| 2658 const String& f = String::Handle(String::New("oneField")); | 2658 const String& f = String::Handle(String::New("oneField")); |
| 2659 const String& getter_f = String::Handle(Field::GetterName(f)); | 2659 const String& getter_f = String::Handle(Field::GetterName(f)); |
| 2660 const String& setter_f = String::Handle(Field::SetterName(f)); | 2660 const String& setter_f = String::Handle(Field::SetterName(f)); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2771 // Named double-private constructor mismatch. | 2771 // Named double-private constructor mismatch. |
| 2772 mangled_name = String::New("foo@12345.named@12345"); | 2772 mangled_name = String::New("foo@12345.named@12345"); |
| 2773 bare_name = String::New("foo.name"); | 2773 bare_name = String::New("foo.name"); |
| 2774 EXPECT(!EqualsIgnoringPrivate(mangled_name, bare_name)); | 2774 EXPECT(!EqualsIgnoringPrivate(mangled_name, bare_name)); |
| 2775 } | 2775 } |
| 2776 | 2776 |
| 2777 | 2777 |
| 2778 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). | 2778 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
| 2779 | 2779 |
| 2780 } // namespace dart | 2780 } // namespace dart |
| OLD | NEW |