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

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

Issue 12381034: Second codegen test passing on ARM (simulated). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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
« no previous file with comments | « runtime/vm/assembler_macros_arm.cc ('k') | runtime/vm/code_patcher_arm.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/globals.h" 6 #include "vm/globals.h"
7 #if defined(TARGET_ARCH_IA32) || \ 7 #if defined(TARGET_ARCH_IA32) || \
8 defined(TARGET_ARCH_X64) || \ 8 defined(TARGET_ARCH_X64) || \
9 defined(TARGET_ARCH_ARM) 9 defined(TARGET_ARCH_ARM)
10 10
(...skipping 13 matching lines...) Expand all
24 24
25 static const intptr_t kPos = Scanner::kDummyTokenIndex; 25 static const intptr_t kPos = Scanner::kDummyTokenIndex;
26 26
27 27
28 CODEGEN_TEST_GENERATE(SimpleReturnCodegen, test) { 28 CODEGEN_TEST_GENERATE(SimpleReturnCodegen, test) {
29 test->node_sequence()->Add(new ReturnNode(kPos)); 29 test->node_sequence()->Add(new ReturnNode(kPos));
30 } 30 }
31 CODEGEN_TEST_RUN(SimpleReturnCodegen, Instance::null()) 31 CODEGEN_TEST_RUN(SimpleReturnCodegen, Instance::null())
32 32
33 33
34 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
35
36
37 CODEGEN_TEST_GENERATE(SmiReturnCodegen, test) { 34 CODEGEN_TEST_GENERATE(SmiReturnCodegen, test) {
38 LiteralNode* l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(3))); 35 LiteralNode* l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(3)));
39 test->node_sequence()->Add(new ReturnNode(kPos, l)); 36 test->node_sequence()->Add(new ReturnNode(kPos, l));
40 } 37 }
41 CODEGEN_TEST_RUN(SmiReturnCodegen, Smi::New(3)) 38 CODEGEN_TEST_RUN(SmiReturnCodegen, Smi::New(3))
42 39
43 40
44 CODEGEN_TEST2_GENERATE(SimpleStaticCallCodegen, function, test) { 41 CODEGEN_TEST2_GENERATE(SimpleStaticCallCodegen, function, test) {
45 // Wrap the SmiReturnCodegen test above as a static function and call it. 42 // Wrap the SmiReturnCodegen test above as a static function and call it.
46 ArgumentListNode* no_arguments = new ArgumentListNode(kPos); 43 ArgumentListNode* no_arguments = new ArgumentListNode(kPos);
47 test->node_sequence()->Add( 44 test->node_sequence()->Add(
48 new ReturnNode(kPos, new StaticCallNode(kPos, function, no_arguments))); 45 new ReturnNode(kPos, new StaticCallNode(kPos, function, no_arguments)));
49 } 46 }
50 CODEGEN_TEST2_RUN(SimpleStaticCallCodegen, SmiReturnCodegen, Smi::New(3)) 47 CODEGEN_TEST2_RUN(SimpleStaticCallCodegen, SmiReturnCodegen, Smi::New(3))
51 48
52 49
50 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
51
52
53 // Helper to allocate and return a LocalVariable. 53 // Helper to allocate and return a LocalVariable.
54 static LocalVariable* NewTestLocalVariable(const char* name) { 54 static LocalVariable* NewTestLocalVariable(const char* name) {
55 const String& variable_name = String::ZoneHandle(Symbols::New(name)); 55 const String& variable_name = String::ZoneHandle(Symbols::New(name));
56 const Type& variable_type = Type::ZoneHandle(Type::DynamicType()); 56 const Type& variable_type = Type::ZoneHandle(Type::DynamicType());
57 return new LocalVariable(kPos, variable_name, variable_type); 57 return new LocalVariable(kPos, variable_name, variable_type);
58 } 58 }
59 59
60 60
61 CODEGEN_TEST_GENERATE(ReturnParameterCodegen, test) { 61 CODEGEN_TEST_GENERATE(ReturnParameterCodegen, test) {
62 SequenceNode* node_seq = test->node_sequence(); 62 SequenceNode* node_seq = test->node_sequence();
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 const Class& cls = Class::Handle( 563 const Class& cls = Class::Handle(
564 app_lib.LookupClass(String::Handle(Symbols::New("A")))); 564 app_lib.LookupClass(String::Handle(Symbols::New("A"))));
565 EXPECT_EQ(cls.raw(), result.clazz()); 565 EXPECT_EQ(cls.raw(), result.clazz());
566 } 566 }
567 567
568 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) 568 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
569 569
570 } // namespace dart 570 } // namespace dart
571 571
572 #endif // defined(TARGET_ARCH_IA32) || ..._ARCH_X64) || ..._ARCH_ARM) 572 #endif // defined(TARGET_ARCH_IA32) || ..._ARCH_X64) || ..._ARCH_ARM)
OLDNEW
« no previous file with comments | « runtime/vm/assembler_macros_arm.cc ('k') | runtime/vm/code_patcher_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698