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

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

Issue 12179020: Fix for issues 6080 - pass in the Isolate's top context into the stub for invoking dart code from n… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | « no previous file | runtime/vm/debugger.h » ('j') | runtime/vm/parser.cc » ('J')
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"
(...skipping 28 matching lines...) Expand all
39 ParsedFunction* parsed_function = new ParsedFunction(function); 39 ParsedFunction* parsed_function = new ParsedFunction(function);
40 LiteralNode* l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(1))); 40 LiteralNode* l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(1)));
41 test->node_sequence()->Add(new ReturnNode(kPos, l)); 41 test->node_sequence()->Add(new ReturnNode(kPos, l));
42 l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(2))); 42 l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(2)));
43 test->node_sequence()->Add(new ReturnNode(kPos, l)); 43 test->node_sequence()->Add(new ReturnNode(kPos, l));
44 l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(3))); 44 l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(3)));
45 test->node_sequence()->Add(new ReturnNode(kPos, l)); 45 test->node_sequence()->Add(new ReturnNode(kPos, l));
46 parsed_function->SetNodeSequence(test->node_sequence()); 46 parsed_function->SetNodeSequence(test->node_sequence());
47 parsed_function->set_instantiator(NULL); 47 parsed_function->set_instantiator(NULL);
48 parsed_function->set_default_parameter_values(Array::ZoneHandle()); 48 parsed_function->set_default_parameter_values(Array::ZoneHandle());
49 parsed_function->AllocateVariables();
50 bool retval; 49 bool retval;
51 Isolate* isolate = Isolate::Current(); 50 Isolate* isolate = Isolate::Current();
52 EXPECT(isolate != NULL); 51 EXPECT(isolate != NULL);
53 LongJump* base = isolate->long_jump_base(); 52 LongJump* base = isolate->long_jump_base();
54 LongJump jump; 53 LongJump jump;
55 isolate->set_long_jump_base(&jump); 54 isolate->set_long_jump_base(&jump);
56 if (setjmp(*jump.Set()) == 0) { 55 if (setjmp(*jump.Set()) == 0) {
57 // Build a stackmap table and some stackmap table entries. 56 // Build a stackmap table and some stackmap table entries.
58 const intptr_t kStackSlotCount = 11; 57 const intptr_t kStackSlotCount = 11;
59 StackmapTableBuilder* stackmap_table_builder = new StackmapTableBuilder(); 58 StackmapTableBuilder* stackmap_table_builder = new StackmapTableBuilder();
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // is called, this should then cause the stack map of function 'A.foo' 277 // is called, this should then cause the stack map of function 'A.foo'
279 // to be traversed and the appropriate objects visited. 278 // to be traversed and the appropriate objects visited.
280 const Object& result = Object::Handle( 279 const Object& result = Object::Handle(
281 DartEntry::InvokeStatic(function_foo, Object::empty_array())); 280 DartEntry::InvokeStatic(function_foo, Object::empty_array()));
282 EXPECT(!result.IsError()); 281 EXPECT(!result.IsError());
283 } 282 }
284 283
285 } // namespace dart 284 } // namespace dart
286 285
287 #endif // defined TARGET_ARCH_IA32 || defined(TARGET_ARCH_X64) 286 #endif // defined TARGET_ARCH_IA32 || defined(TARGET_ARCH_X64)
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/debugger.h » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698