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

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

Issue 1307943008: Make default_parameter_values a ZoneGrowableArray instead of an array in new space (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: r Created 5 years, 3 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
« no previous file with comments | « runtime/vm/ast_printer.cc ('k') | runtime/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 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 14 matching lines...) Expand all
25 ParsedFunction* parsed_function = 25 ParsedFunction* parsed_function =
26 new ParsedFunction(Thread::Current(), test->function()); 26 new ParsedFunction(Thread::Current(), test->function());
27 LiteralNode* l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(1))); 27 LiteralNode* l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(1)));
28 test->node_sequence()->Add(new ReturnNode(kPos, l)); 28 test->node_sequence()->Add(new ReturnNode(kPos, l));
29 l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(2))); 29 l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(2)));
30 test->node_sequence()->Add(new ReturnNode(kPos, l)); 30 test->node_sequence()->Add(new ReturnNode(kPos, l));
31 l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(3))); 31 l = new LiteralNode(kPos, Smi::ZoneHandle(Smi::New(3)));
32 test->node_sequence()->Add(new ReturnNode(kPos, l)); 32 test->node_sequence()->Add(new ReturnNode(kPos, l));
33 parsed_function->SetNodeSequence(test->node_sequence()); 33 parsed_function->SetNodeSequence(test->node_sequence());
34 parsed_function->set_instantiator(NULL); 34 parsed_function->set_instantiator(NULL);
35 parsed_function->set_default_parameter_values(Object::null_array());
36 parsed_function->EnsureExpressionTemp(); 35 parsed_function->EnsureExpressionTemp();
37 test->node_sequence()->scope()->AddVariable( 36 test->node_sequence()->scope()->AddVariable(
38 parsed_function->expression_temp_var()); 37 parsed_function->expression_temp_var());
39 test->node_sequence()->scope()->AddVariable( 38 test->node_sequence()->scope()->AddVariable(
40 parsed_function->current_context_var()); 39 parsed_function->current_context_var());
41 parsed_function->AllocateVariables(); 40 parsed_function->AllocateVariables();
42 bool retval; 41 bool retval;
43 Isolate* isolate = Isolate::Current(); 42 Isolate* isolate = Isolate::Current();
44 EXPECT(isolate != NULL); 43 EXPECT(isolate != NULL);
45 LongJumpScope jump; 44 LongJumpScope jump;
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 262
264 // Now invoke 'A.moo' and it will trigger a GC when the native function 263 // Now invoke 'A.moo' and it will trigger a GC when the native function
265 // is called, this should then cause the stack map of function 'A.foo' 264 // is called, this should then cause the stack map of function 'A.foo'
266 // to be traversed and the appropriate objects visited. 265 // to be traversed and the appropriate objects visited.
267 const Object& result = Object::Handle( 266 const Object& result = Object::Handle(
268 DartEntry::InvokeFunction(function_foo, Object::empty_array())); 267 DartEntry::InvokeFunction(function_foo, Object::empty_array()));
269 EXPECT(!result.IsError()); 268 EXPECT(!result.IsError());
270 } 269 }
271 270
272 } // namespace dart 271 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/ast_printer.cc ('k') | runtime/vm/code_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698