Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: vm/object_test.cc

Issue 10827249: - Register canonical names for internal VM classes and get rid of the method GetSingletonClassName (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« vm/object.h ('K') | « vm/object_store.cc ('k') | vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698