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 #include "vm/ast.h" | 7 #include "vm/ast.h" |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
10 #include "vm/code_generator.h" | 10 #include "vm/code_generator.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 CODEGEN_TEST2_GENERATE(SimpleStaticCallCodegen, function, test) { | 37 CODEGEN_TEST2_GENERATE(SimpleStaticCallCodegen, function, test) { |
38 // Wrap the SmiReturnCodegen test above as a static function and call it. | 38 // Wrap the SmiReturnCodegen test above as a static function and call it. |
39 ArgumentListNode* no_arguments = new ArgumentListNode(kPos); | 39 ArgumentListNode* no_arguments = new ArgumentListNode(kPos); |
40 test->node_sequence()->Add( | 40 test->node_sequence()->Add( |
41 new ReturnNode(kPos, new StaticCallNode(kPos, function, no_arguments))); | 41 new ReturnNode(kPos, new StaticCallNode(kPos, function, no_arguments))); |
42 } | 42 } |
43 CODEGEN_TEST2_RUN(SimpleStaticCallCodegen, SmiReturnCodegen, Smi::New(3)) | 43 CODEGEN_TEST2_RUN(SimpleStaticCallCodegen, SmiReturnCodegen, Smi::New(3)) |
44 | 44 |
45 | 45 |
46 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) | 46 #if defined(TARGET_ARCH_IA32) || \ |
| 47 defined(TARGET_ARCH_X64) || \ |
| 48 defined(TARGET_ARCH_ARM) |
47 | 49 |
48 | 50 |
49 // Helper to allocate and return a LocalVariable. | 51 // Helper to allocate and return a LocalVariable. |
50 static LocalVariable* NewTestLocalVariable(const char* name) { | 52 static LocalVariable* NewTestLocalVariable(const char* name) { |
51 const String& variable_name = String::ZoneHandle(Symbols::New(name)); | 53 const String& variable_name = String::ZoneHandle(Symbols::New(name)); |
52 const Type& variable_type = Type::ZoneHandle(Type::DynamicType()); | 54 const Type& variable_type = Type::ZoneHandle(Type::DynamicType()); |
53 return new LocalVariable(kPos, variable_name, variable_type); | 55 return new LocalVariable(kPos, variable_name, variable_type); |
54 } | 56 } |
55 | 57 |
56 | 58 |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 // App lib is the last one that was loaded. | 556 // App lib is the last one that was loaded. |
555 intptr_t num_libs = libs.Length(); | 557 intptr_t num_libs = libs.Length(); |
556 Library& app_lib = Library::Handle(); | 558 Library& app_lib = Library::Handle(); |
557 app_lib ^= libs.At(num_libs - 1); | 559 app_lib ^= libs.At(num_libs - 1); |
558 ASSERT(!app_lib.IsNull()); | 560 ASSERT(!app_lib.IsNull()); |
559 const Class& cls = Class::Handle( | 561 const Class& cls = Class::Handle( |
560 app_lib.LookupClass(String::Handle(Symbols::New("A")))); | 562 app_lib.LookupClass(String::Handle(Symbols::New("A")))); |
561 EXPECT_EQ(cls.raw(), result.clazz()); | 563 EXPECT_EQ(cls.raw(), result.clazz()); |
562 } | 564 } |
563 | 565 |
564 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) | 566 #endif // TARGET_ARCH_IA32 || TARGET_ARCH_X64 || TARGET_ARCH_ARM |
565 | 567 |
566 } // namespace dart | 568 } // namespace dart |
OLD | NEW |