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

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

Issue 10825282: Put PushArgument into the environment instead of raw values. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | Annotate | Revision Log
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/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 15 matching lines...) Expand all
26 DECLARE_FLAG(bool, enable_type_checks); 26 DECLARE_FLAG(bool, enable_type_checks);
27 DECLARE_FLAG(bool, intrinsify); 27 DECLARE_FLAG(bool, intrinsify);
28 DECLARE_FLAG(bool, report_usage_count); 28 DECLARE_FLAG(bool, report_usage_count);
29 DECLARE_FLAG(bool, trace_functions); 29 DECLARE_FLAG(bool, trace_functions);
30 DECLARE_FLAG(int, optimization_counter_threshold); 30 DECLARE_FLAG(int, optimization_counter_threshold);
31 31
32 RawDeoptInfo* DeoptimizationStub::CreateDeoptInfo(FlowGraphCompiler* compiler) { 32 RawDeoptInfo* DeoptimizationStub::CreateDeoptInfo(FlowGraphCompiler* compiler) {
33 if (deoptimization_env_ == NULL) return DeoptInfo::null(); 33 if (deoptimization_env_ == NULL) return DeoptInfo::null();
34 const intptr_t fixed_parameter_count = 34 const intptr_t fixed_parameter_count =
35 deoptimization_env_->fixed_parameter_count(); 35 deoptimization_env_->fixed_parameter_count();
36 DeoptInfoBuilder builder(compiler->object_table(), fixed_parameter_count); 36 DeoptInfoBuilder builder(compiler->object_table(),
37 compiler->StackSize(),
38 fixed_parameter_count);
37 39
38 const Function& function = compiler->parsed_function().function(); 40 const Function& function = compiler->parsed_function().function();
39 intptr_t slot_ix = 0; 41 intptr_t slot_ix = 0;
40 builder.AddReturnAddress(function, deopt_id_, slot_ix++); 42 builder.AddReturnAddress(function, deopt_id_, slot_ix++);
41 43
42 // All locals between TOS and PC-marker. 44 // All locals between TOS and PC-marker.
43 const GrowableArray<Value*>& values = deoptimization_env_->values(); 45 const GrowableArray<Value*>& values = deoptimization_env_->values();
44 // const intptr_t local_slot_count = values.length() - fixed_parameter_count; 46 // const intptr_t local_slot_count = values.length() - fixed_parameter_count;
45 for (intptr_t i = values.length() - 1; i >= fixed_parameter_count; i--) { 47 for (intptr_t i = values.length() - 1; i >= fixed_parameter_count; i--) {
46 builder.AddCopy(deoptimization_env_->LocationAt(i), *values[i], slot_ix++); 48 builder.AddCopy(deoptimization_env_->LocationAt(i), *values[i], slot_ix++);
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 return; 854 return;
853 } 855 }
854 } 856 }
855 857
856 // This move is not blocked. 858 // This move is not blocked.
857 EmitMove(index); 859 EmitMove(index);
858 } 860 }
859 861
860 862
861 } // namespace dart 863 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698