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

Side by Side Diff: runtime/vm/compiler.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, 4 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/code_generator_test.cc ('k') | runtime/vm/flow_graph_compiler_arm.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 "vm/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/block_scheduler.h" 10 #include "vm/block_scheduler.h"
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 func.SetNumOptionalParameters(0, true); 1394 func.SetNumOptionalParameters(0, true);
1395 // Manually generated AST, do not recompile. 1395 // Manually generated AST, do not recompile.
1396 func.SetIsOptimizable(false); 1396 func.SetIsOptimizable(false);
1397 func.set_is_debuggable(false); 1397 func.set_is_debuggable(false);
1398 1398
1399 // We compile the function here, even though InvokeFunction() below 1399 // We compile the function here, even though InvokeFunction() below
1400 // would compile func automatically. We are checking fewer invariants 1400 // would compile func automatically. We are checking fewer invariants
1401 // here. 1401 // here.
1402 ParsedFunction* parsed_function = new ParsedFunction(thread, func); 1402 ParsedFunction* parsed_function = new ParsedFunction(thread, func);
1403 parsed_function->SetNodeSequence(fragment); 1403 parsed_function->SetNodeSequence(fragment);
1404 parsed_function->set_default_parameter_values(Object::null_array());
1405 fragment->scope()->AddVariable(parsed_function->EnsureExpressionTemp()); 1404 fragment->scope()->AddVariable(parsed_function->EnsureExpressionTemp());
1406 fragment->scope()->AddVariable( 1405 fragment->scope()->AddVariable(
1407 parsed_function->current_context_var()); 1406 parsed_function->current_context_var());
1408 parsed_function->AllocateVariables(); 1407 parsed_function->AllocateVariables();
1409 1408
1410 // Non-optimized code generator. 1409 // Non-optimized code generator.
1411 DartCompilationPipeline pipeline; 1410 DartCompilationPipeline pipeline;
1412 CompileParsedFunctionHelper(&pipeline, 1411 CompileParsedFunctionHelper(&pipeline,
1413 parsed_function, 1412 parsed_function,
1414 false, 1413 false,
(...skipping 10 matching lines...) Expand all
1425 const Object& result = 1424 const Object& result =
1426 PassiveObject::Handle(isolate->object_store()->sticky_error()); 1425 PassiveObject::Handle(isolate->object_store()->sticky_error());
1427 isolate->object_store()->clear_sticky_error(); 1426 isolate->object_store()->clear_sticky_error();
1428 return result.raw(); 1427 return result.raw();
1429 } 1428 }
1430 UNREACHABLE(); 1429 UNREACHABLE();
1431 return Object::null(); 1430 return Object::null();
1432 } 1431 }
1433 1432
1434 } // namespace dart 1433 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_generator_test.cc ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698