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

Side by Side Diff: runtime/vm/resolver_test.cc

Issue 1870343002: - Refactor Symbol allocation to expect a thread parameter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review feedback. Created 4 years, 8 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
« no previous file with comments | « runtime/vm/resolver.cc ('k') | runtime/vm/runtime_entry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/compiler.h" 8 #include "vm/compiler.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 SetupInstanceFunction(test_library_name, 151 SetupInstanceFunction(test_library_name,
152 test_class_name, 152 test_class_name,
153 test_function_name); 153 test_function_name);
154 154
155 // Now create an instance object of the class and try to 155 // Now create an instance object of the class and try to
156 // resolve a function in it. 156 // resolve a function in it.
157 const String& lib_name = String::Handle(String::New(test_library_name)); 157 const String& lib_name = String::Handle(String::New(test_library_name));
158 const Library& lib = Library::Handle(Library::LookupLibrary(lib_name)); 158 const Library& lib = Library::Handle(Library::LookupLibrary(lib_name));
159 ASSERT(!lib.IsNull()); 159 ASSERT(!lib.IsNull());
160 const Class& cls = Class::Handle(lib.LookupClass( 160 const Class& cls = Class::Handle(lib.LookupClass(
161 String::Handle(Symbols::New(test_class_name)))); 161 String::Handle(Symbols::New(thread, test_class_name))));
162 EXPECT(!cls.IsNull()); // No ambiguity error expected. 162 EXPECT(!cls.IsNull()); // No ambiguity error expected.
163 163
164 Instance& receiver = Instance::Handle(Instance::New(cls)); 164 Instance& receiver = Instance::Handle(Instance::New(cls));
165 const String& function_name = String::Handle(String::New(test_function_name)); 165 const String& function_name = String::Handle(String::New(test_function_name));
166 166
167 // Now try to resolve and invoke the instance function in this class. 167 // Now try to resolve and invoke the instance function in this class.
168 { 168 {
169 const int kNumArguments = 3; 169 const int kNumArguments = 3;
170 ArgumentsDescriptor args_desc( 170 ArgumentsDescriptor args_desc(
171 Array::Handle(ArgumentsDescriptor::New(kNumArguments))); 171 Array::Handle(ArgumentsDescriptor::New(kNumArguments)));
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 String::Handle(String::New("dynCall")); 206 String::Handle(String::New("dynCall"));
207 const Function& super_function = Function::Handle( 207 const Function& super_function = Function::Handle(
208 Resolver::ResolveDynamic(receiver, 208 Resolver::ResolveDynamic(receiver,
209 super_function_name, 209 super_function_name,
210 args_desc)); 210 args_desc));
211 EXPECT(!super_function.IsNull()); 211 EXPECT(!super_function.IsNull());
212 } 212 }
213 } 213 }
214 214
215 } // namespace dart 215 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/resolver.cc ('k') | runtime/vm/runtime_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698