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

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

Issue 10115053: Assign ids to incoming arguments (to be used in checked mode). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | Annotate | Revision Log
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"
(...skipping 22 matching lines...) Expand all
33 cls.SetFunctions(functions); 33 cls.SetFunctions(functions);
34 Library& lib = Library::Handle(Library::CoreLibrary()); 34 Library& lib = Library::Handle(Library::CoreLibrary());
35 lib.AddClass(cls); 35 lib.AddClass(cls);
36 ParsedFunction parsed_function(function); 36 ParsedFunction parsed_function(function);
37 LiteralNode* l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(1))); 37 LiteralNode* l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(1)));
38 test->node_sequence()->Add(new ReturnNode(kPos, l)); 38 test->node_sequence()->Add(new ReturnNode(kPos, l));
39 l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(2))); 39 l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(2)));
40 test->node_sequence()->Add(new ReturnNode(kPos, l)); 40 test->node_sequence()->Add(new ReturnNode(kPos, l));
41 l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(3))); 41 l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(3)));
42 test->node_sequence()->Add(new ReturnNode(kPos, l)); 42 test->node_sequence()->Add(new ReturnNode(kPos, l));
43 parsed_function.set_node_sequence(test->node_sequence()); 43 parsed_function.SetNodeSequence(test->node_sequence());
44 parsed_function.set_instantiator(NULL); 44 parsed_function.set_instantiator(NULL);
45 parsed_function.set_default_parameter_values(Array::Handle()); 45 parsed_function.set_default_parameter_values(Array::Handle());
46 parsed_function.AllocateVariables(); 46 parsed_function.AllocateVariables();
47 bool retval; 47 bool retval;
48 Isolate* isolate = Isolate::Current(); 48 Isolate* isolate = Isolate::Current();
49 EXPECT(isolate != NULL); 49 EXPECT(isolate != NULL);
50 LongJump* base = isolate->long_jump_base(); 50 LongJump* base = isolate->long_jump_base();
51 LongJump jump; 51 LongJump jump;
52 isolate->set_long_jump_base(&jump); 52 isolate->set_long_jump_base(&jump);
53 if (setjmp(*jump.Set()) == 0) { 53 if (setjmp(*jump.Set()) == 0) {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 GrowableArray<const Object*> arguments; 210 GrowableArray<const Object*> arguments;
211 const Array& kNoArgumentNames = Array::Handle(); 211 const Array& kNoArgumentNames = Array::Handle();
212 Object& result = Object::Handle(); 212 Object& result = Object::Handle();
213 result = DartEntry::InvokeStatic(function_foo, arguments, kNoArgumentNames); 213 result = DartEntry::InvokeStatic(function_foo, arguments, kNoArgumentNames);
214 EXPECT(!result.IsError()); 214 EXPECT(!result.IsError());
215 } 215 }
216 216
217 } // namespace dart 217 } // namespace dart
218 218
219 #endif // defined TARGET_ARCH_IA32 || defined(TARGET_ARCH_X64) 219 #endif // defined TARGET_ARCH_IA32 || defined(TARGET_ARCH_X64)
OLDNEW
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/code_generator_ia32.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698