| 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 | 7 |
| 8 #include "vm/ast.h" | 8 #include "vm/ast.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/code_descriptors.h" | 10 #include "vm/code_descriptors.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 lib.AddClass(cls); | 37 lib.AddClass(cls); |
| 38 ParsedFunction* parsed_function = new ParsedFunction(function); | 38 ParsedFunction* parsed_function = new ParsedFunction(function); |
| 39 LiteralNode* l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(1))); | 39 LiteralNode* l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(1))); |
| 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(2))); | 41 l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(2))); |
| 42 test->node_sequence()->Add(new ReturnNode(kPos, l)); | 42 test->node_sequence()->Add(new ReturnNode(kPos, l)); |
| 43 l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(3))); | 43 l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(3))); |
| 44 test->node_sequence()->Add(new ReturnNode(kPos, l)); | 44 test->node_sequence()->Add(new ReturnNode(kPos, l)); |
| 45 parsed_function->SetNodeSequence(test->node_sequence()); | 45 parsed_function->SetNodeSequence(test->node_sequence()); |
| 46 parsed_function->set_instantiator(NULL); | 46 parsed_function->set_instantiator(NULL); |
| 47 parsed_function->set_default_parameter_values(Array::ZoneHandle()); | 47 parsed_function->set_default_parameter_values(Object::null_array()); |
| 48 parsed_function->AllocateVariables(); | 48 parsed_function->AllocateVariables(); |
| 49 bool retval; | 49 bool retval; |
| 50 Isolate* isolate = Isolate::Current(); | 50 Isolate* isolate = Isolate::Current(); |
| 51 EXPECT(isolate != NULL); | 51 EXPECT(isolate != NULL); |
| 52 LongJump* base = isolate->long_jump_base(); | 52 LongJump* base = isolate->long_jump_base(); |
| 53 LongJump jump; | 53 LongJump jump; |
| 54 isolate->set_long_jump_base(&jump); | 54 isolate->set_long_jump_base(&jump); |
| 55 if (setjmp(*jump.Set()) == 0) { | 55 if (setjmp(*jump.Set()) == 0) { |
| 56 // Build a stackmap table and some stackmap table entries. | 56 // Build a stackmap table and some stackmap table entries. |
| 57 const intptr_t kStackSlotCount = 11; | 57 const intptr_t kStackSlotCount = 11; |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 // Now invoke 'A.moo' and it will trigger a GC when the native function | 276 // Now invoke 'A.moo' and it will trigger a GC when the native function |
| 277 // 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' |
| 278 // to be traversed and the appropriate objects visited. | 278 // to be traversed and the appropriate objects visited. |
| 279 const Object& result = Object::Handle( | 279 const Object& result = Object::Handle( |
| 280 DartEntry::InvokeFunction(function_foo, Object::empty_array())); | 280 DartEntry::InvokeFunction(function_foo, Object::empty_array())); |
| 281 EXPECT(!result.IsError()); | 281 EXPECT(!result.IsError()); |
| 282 } | 282 } |
| 283 | 283 |
| 284 } // namespace dart | 284 } // namespace dart |
| 285 | 285 |
| OLD | NEW |