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

Side by Side Diff: vm/code_descriptors_test.cc

Issue 10808064: Rename some of the enum definitions inside classes to avoid conflict with the ObjectKind enum. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 5 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 | « vm/bootstrap.cc ('k') | vm/code_generator_test.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) || 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"
11 #include "vm/code_descriptors.h" 11 #include "vm/code_descriptors.h"
12 #include "vm/compiler.h" 12 #include "vm/compiler.h"
13 #include "vm/dart_entry.h" 13 #include "vm/dart_entry.h"
14 #include "vm/native_entry.h" 14 #include "vm/native_entry.h"
15 #include "vm/parser.h" 15 #include "vm/parser.h"
16 #include "vm/unit_test.h" 16 #include "vm/unit_test.h"
17 17
18 namespace dart { 18 namespace dart {
19 19
20 static const intptr_t kPos = Scanner::kDummyTokenIndex; 20 static const intptr_t kPos = Scanner::kDummyTokenIndex;
21 21
22 22
23 CODEGEN_TEST_GENERATE(StackmapCodegen, test) { 23 CODEGEN_TEST_GENERATE(StackmapCodegen, test) {
24 Assembler assembler; 24 Assembler assembler;
25 const String& function_name = String::ZoneHandle(String::NewSymbol("test")); 25 const String& function_name = String::ZoneHandle(String::NewSymbol("test"));
26 const Function& function = Function::Handle( 26 const Function& function = Function::Handle(
27 Function::New(function_name, RawFunction::kFunction, true, false, 0)); 27 Function::New(function_name, RawFunction::kRegularFunction,
28 true, false, 0));
28 function.set_result_type(Type::Handle(Type::DynamicType())); 29 function.set_result_type(Type::Handle(Type::DynamicType()));
29 Class& cls = Class::ZoneHandle(); 30 Class& cls = Class::ZoneHandle();
30 const Script& script = Script::Handle(); 31 const Script& script = Script::Handle();
31 cls = Class::New(function_name, script, Scanner::kDummyTokenIndex); 32 cls = Class::New(function_name, script, Scanner::kDummyTokenIndex);
32 const Array& functions = Array::Handle(Array::New(1)); 33 const Array& functions = Array::Handle(Array::New(1));
33 functions.SetAt(0, function); 34 functions.SetAt(0, function);
34 cls.SetFunctions(functions); 35 cls.SetFunctions(functions);
35 Library& lib = Library::Handle(Library::CoreLibrary()); 36 Library& lib = Library::Handle(Library::CoreLibrary());
36 lib.AddClass(cls); 37 lib.AddClass(cls);
37 ParsedFunction parsed_function(function); 38 ParsedFunction parsed_function(function);
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 GrowableArray<const Object*> arguments; 211 GrowableArray<const Object*> arguments;
211 const Array& kNoArgumentNames = Array::Handle(); 212 const Array& kNoArgumentNames = Array::Handle();
212 Object& result = Object::Handle(); 213 Object& result = Object::Handle();
213 result = DartEntry::InvokeStatic(function_foo, arguments, kNoArgumentNames); 214 result = DartEntry::InvokeStatic(function_foo, arguments, kNoArgumentNames);
214 EXPECT(!result.IsError()); 215 EXPECT(!result.IsError());
215 } 216 }
216 217
217 } // namespace dart 218 } // namespace dart
218 219
219 #endif // defined TARGET_ARCH_IA32 || defined(TARGET_ARCH_X64) 220 #endif // defined TARGET_ARCH_IA32 || defined(TARGET_ARCH_X64)
OLDNEW
« no previous file with comments | « vm/bootstrap.cc ('k') | vm/code_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698