| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 String& interface_name = String::Handle(); | 104 String& interface_name = String::Handle(); |
| 105 interface_name = Symbols::New("Harley"); | 105 interface_name = Symbols::New("Harley"); |
| 106 interface = Class::New(interface_name, script, Scanner::kDummyTokenIndex); | 106 interface = Class::New(interface_name, script, Scanner::kDummyTokenIndex); |
| 107 interfaces.SetAt(0, Type::Handle(Type::NewNonParameterizedType(interface))); | 107 interfaces.SetAt(0, Type::Handle(Type::NewNonParameterizedType(interface))); |
| 108 interface_name = Symbols::New("Norton"); | 108 interface_name = Symbols::New("Norton"); |
| 109 interface = Class::New(interface_name, script, Scanner::kDummyTokenIndex); | 109 interface = Class::New(interface_name, script, Scanner::kDummyTokenIndex); |
| 110 interfaces.SetAt(1, Type::Handle(Type::NewNonParameterizedType(interface))); | 110 interfaces.SetAt(1, Type::Handle(Type::NewNonParameterizedType(interface))); |
| 111 cls.set_interfaces(interfaces); | 111 cls.set_interfaces(interfaces); |
| 112 cls.Finalize(); | 112 cls.Finalize(); |
| 113 | 113 |
| 114 ASSERT(cls.functions_cache() == Array::null()); |
| 115 cls.InitFunctionsCache(); |
| 114 const Array& array = Array::Handle(cls.functions_cache()); | 116 const Array& array = Array::Handle(cls.functions_cache()); |
| 115 array.SetAt(0, function_name); | 117 array.SetAt(0, function_name); |
| 116 cls.set_functions_cache(array); | 118 cls.set_functions_cache(array); |
| 117 String& test_name = String::Handle(); | 119 String& test_name = String::Handle(); |
| 118 test_name ^= Array::Handle(cls.functions_cache()).At(0); | 120 test_name ^= Array::Handle(cls.functions_cache()).At(0); |
| 119 EXPECT(test_name.Equals(function_name)); | 121 EXPECT(test_name.Equals(function_name)); |
| 120 } | 122 } |
| 121 | 123 |
| 122 | 124 |
| 123 TEST_CASE(TypeArguments) { | 125 TEST_CASE(TypeArguments) { |
| (...skipping 2740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2864 "#6 MyClass.foo (dart:test-lib:32:14)\n" | 2866 "#6 MyClass.foo (dart:test-lib:32:14)\n" |
| 2865 "#7 MyClass.MyClass.<anonymous closure> (dart:test-lib:21:15)\n" | 2867 "#7 MyClass.MyClass.<anonymous closure> (dart:test-lib:21:15)\n" |
| 2866 "#8 MyClass.MyClass (dart:test-lib:21:18)\n" | 2868 "#8 MyClass.MyClass (dart:test-lib:21:18)\n" |
| 2867 "#9 main.<anonymous closure> (dart:test-lib:37:10)\n" | 2869 "#9 main.<anonymous closure> (dart:test-lib:37:10)\n" |
| 2868 "#10 main (dart:test-lib:37:24)"); | 2870 "#10 main (dart:test-lib:37:24)"); |
| 2869 } | 2871 } |
| 2870 | 2872 |
| 2871 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). | 2873 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
| 2872 | 2874 |
| 2873 } // namespace dart | 2875 } // namespace dart |
| OLD | NEW |