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

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: revert changes in deopt instructions 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
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_compiler_x64.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/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 27 matching lines...) Expand all
38 0 : function.num_fixed_parameters(); 38 0 : function.num_fixed_parameters();
39 const intptr_t fixed_parameter_count = 39 const intptr_t fixed_parameter_count =
40 deoptimization_env_->fixed_parameter_count(); 40 deoptimization_env_->fixed_parameter_count();
41 DeoptInfoBuilder builder(compiler->object_table(), num_args); 41 DeoptInfoBuilder builder(compiler->object_table(), num_args);
42 42
43 intptr_t slot_ix = 0; 43 intptr_t slot_ix = 0;
44 builder.AddReturnAddress(function, deopt_id_, slot_ix++); 44 builder.AddReturnAddress(function, deopt_id_, slot_ix++);
45 45
46 // All locals between TOS and PC-marker. 46 // All locals between TOS and PC-marker.
47 const GrowableArray<Value*>& values = deoptimization_env_->values(); 47 const GrowableArray<Value*>& values = deoptimization_env_->values();
48 // const intptr_t local_slot_count = values.length() - fixed_parameter_count; 48
49 // Assign locations to values pushed above spill slots with PushArgument.
50 intptr_t height = compiler->StackSize();
51 for (intptr_t i = 0; i < values.length(); i++) {
52 if (deoptimization_env_->LocationAt(i).IsInvalid() &&
53 !values[i]->IsConstant()) {
54 ASSERT(values[i]->AsUse()->definition()->IsPushArgument());
55 *deoptimization_env_->LocationSlotAt(i) = Location::StackSlot(height++);
56 }
57 }
58
49 for (intptr_t i = values.length() - 1; i >= fixed_parameter_count; i--) { 59 for (intptr_t i = values.length() - 1; i >= fixed_parameter_count; i--) {
50 builder.AddCopy(deoptimization_env_->LocationAt(i), *values[i], slot_ix++); 60 builder.AddCopy(deoptimization_env_->LocationAt(i), *values[i], slot_ix++);
51 } 61 }
52 62
53 // PC marker, caller-fp, caller-pc. 63 // PC marker, caller-fp, caller-pc.
54 builder.AddPcMarker(function, slot_ix++); 64 builder.AddPcMarker(function, slot_ix++);
55 builder.AddCallerFp(slot_ix++); 65 builder.AddCallerFp(slot_ix++);
56 builder.AddCallerPc(slot_ix++); 66 builder.AddCallerPc(slot_ix++);
57 // Incoming arguments. 67 // Incoming arguments.
58 for (intptr_t i = fixed_parameter_count - 1; i >= 0; i--) { 68 for (intptr_t i = fixed_parameter_count - 1; i >= 0; i--) {
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 return; 865 return;
856 } 866 }
857 } 867 }
858 868
859 // This move is not blocked. 869 // This move is not blocked.
860 EmitMove(index); 870 EmitMove(index);
861 } 871 }
862 872
863 873
864 } // namespace dart 874 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698