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/globals.h" | 6 #include "vm/globals.h" |
7 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) | 7 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) |
8 | 8 |
9 #include "vm/ast.h" | 9 #include "vm/ast.h" |
10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
263 } | 263 } |
264 CODEGEN_TEST_RUN(DoubleUnaryOpCodegen, Double::New(-12.0)) | 264 CODEGEN_TEST_RUN(DoubleUnaryOpCodegen, Double::New(-12.0)) |
265 | 265 |
266 | 266 |
267 static Library& MakeTestLibrary(const char* url) { | 267 static Library& MakeTestLibrary(const char* url) { |
268 const String& lib_url = String::ZoneHandle(Symbols::New(url)); | 268 const String& lib_url = String::ZoneHandle(Symbols::New(url)); |
269 Library& lib = Library::ZoneHandle(Library::New(lib_url)); | 269 Library& lib = Library::ZoneHandle(Library::New(lib_url)); |
270 lib.Register(); | 270 lib.Register(); |
271 Library& core_lib = Library::Handle(Library::CoreLibrary()); | 271 Library& core_lib = Library::Handle(Library::CoreLibrary()); |
272 ASSERT(!core_lib.IsNull()); | 272 ASSERT(!core_lib.IsNull()); |
273 lib.AddImport(core_lib); | 273 lib.AddImportAll(core_lib); |
siva
2012/09/24 18:28:51
AddImportAll seems like a bad name why not
AddImpo
hausner
2012/09/24 20:25:43
Done.
| |
274 return lib; | 274 return lib; |
275 } | 275 } |
276 | 276 |
277 | 277 |
278 static RawClass* LookupClass(const Library& lib, const char* name) { | 278 static RawClass* LookupClass(const Library& lib, const char* name) { |
279 const String& cls_name = String::ZoneHandle(Symbols::New(name)); | 279 const String& cls_name = String::ZoneHandle(Symbols::New(name)); |
280 return lib.LookupClass(cls_name); | 280 return lib.LookupClass(cls_name); |
281 } | 281 } |
282 | 282 |
283 | 283 |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
514 app_lib ^= libs.At(num_libs - 1); | 514 app_lib ^= libs.At(num_libs - 1); |
515 ASSERT(!app_lib.IsNull()); | 515 ASSERT(!app_lib.IsNull()); |
516 const Class& cls = Class::Handle( | 516 const Class& cls = Class::Handle( |
517 app_lib.LookupClass(String::Handle(Symbols::New("A")))); | 517 app_lib.LookupClass(String::Handle(Symbols::New("A")))); |
518 EXPECT_EQ(cls.raw(), result.clazz()); | 518 EXPECT_EQ(cls.raw(), result.clazz()); |
519 } | 519 } |
520 | 520 |
521 } // namespace dart | 521 } // namespace dart |
522 | 522 |
523 #endif // defined TARGET_ARCH_IA32 || defined(TARGET_ARCH_X64) | 523 #endif // defined TARGET_ARCH_IA32 || defined(TARGET_ARCH_X64) |
OLD | NEW |