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

Side by Side Diff: runtime/vm/unit_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: Cleanup 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
« runtime/vm/parser.cc ('K') | « runtime/vm/unit_test.h ('k') | no next file » | 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 "vm/unit_test.h" 5 #include "vm/unit_test.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "bin/builtin.h" 9 #include "bin/builtin.h"
10 #include "bin/dartutils.h" 10 #include "bin/dartutils.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 Disassembler::Disassemble(start, start + assembler_->CodeSize()); 215 Disassembler::Disassemble(start, start + assembler_->CodeSize());
216 OS::Print("}\n"); 216 OS::Print("}\n");
217 } 217 }
218 } 218 }
219 219
220 220
221 CodeGenTest::CodeGenTest(const char* name) 221 CodeGenTest::CodeGenTest(const char* name)
222 : function_(Function::ZoneHandle()), 222 : function_(Function::ZoneHandle()),
223 node_sequence_(new SequenceNode(Scanner::kNoSourcePos, 223 node_sequence_(new SequenceNode(Scanner::kNoSourcePos,
224 new LocalScope(NULL, 0, 0))), 224 new LocalScope(NULL, 0, 0))),
225 default_parameter_values_(Array::ZoneHandle()) { 225 default_parameter_values_(new ZoneGrowableArray<const Instance*> ()) {
226 ASSERT(name != NULL); 226 ASSERT(name != NULL);
227 const String& function_name = String::ZoneHandle(Symbols::New(name)); 227 const String& function_name = String::ZoneHandle(Symbols::New(name));
228 // Add function to a class and that class to the class dictionary so that 228 // Add function to a class and that class to the class dictionary so that
229 // frame walking can be used. 229 // frame walking can be used.
230 const Class& cls = Class::ZoneHandle( 230 const Class& cls = Class::ZoneHandle(
231 Class::New(function_name, Script::Handle(), Scanner::kNoSourcePos)); 231 Class::New(function_name, Script::Handle(), Scanner::kNoSourcePos));
232 function_ = Function::New( 232 function_ = Function::New(
233 function_name, RawFunction::kRegularFunction, 233 function_name, RawFunction::kRegularFunction,
234 true, false, false, false, false, cls, 0); 234 true, false, false, false, false, cls, 0);
235 function_.set_result_type(Type::Handle(Type::DynamicType())); 235 function_.set_result_type(Type::Handle(Type::DynamicType()));
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 Thread* thread = Thread::Current(); 276 Thread* thread = Thread::Current();
277 ASSERT(thread != NULL); 277 ASSERT(thread != NULL);
278 ASSERT(ClassFinalizer::AllClassesFinalized()); 278 ASSERT(ClassFinalizer::AllClassesFinalized());
279 const Error& error = Error::Handle(Compiler::CompileFunction(thread, 279 const Error& error = Error::Handle(Compiler::CompileFunction(thread,
280 function)); 280 function));
281 return error.IsNull(); 281 return error.IsNull();
282 } 282 }
283 283
284 284
285 } // namespace dart 285 } // namespace dart
OLDNEW
« runtime/vm/parser.cc ('K') | « runtime/vm/unit_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698