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

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

Issue 10894034: Make constants computations instead of values. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 48
49 // Assign locations to values pushed above spill slots with PushArgument. 49 // Assign locations to values pushed above spill slots with PushArgument.
50 intptr_t height = compiler->StackSize(); 50 intptr_t height = compiler->StackSize();
51 for (intptr_t i = 0; i < values.length(); i++) { 51 for (intptr_t i = 0; i < values.length(); i++) {
52 if (deoptimization_env_->LocationAt(i).IsInvalid() && 52 if (deoptimization_env_->LocationAt(i).IsInvalid()) {
53 !values[i]->IsConstant()) {
54 ASSERT(values[i]->AsUse()->definition()->IsPushArgument()); 53 ASSERT(values[i]->AsUse()->definition()->IsPushArgument());
55 *deoptimization_env_->LocationSlotAt(i) = Location::StackSlot(height++); 54 *deoptimization_env_->LocationSlotAt(i) = Location::StackSlot(height++);
56 } 55 }
57 } 56 }
58 57
59 for (intptr_t i = values.length() - 1; i >= fixed_parameter_count; i--) { 58 for (intptr_t i = values.length() - 1; i >= fixed_parameter_count; i--) {
60 builder.AddCopy(deoptimization_env_->LocationAt(i), *values[i], slot_ix++); 59 builder.AddCopy(deoptimization_env_->LocationAt(i), *values[i], slot_ix++);
61 } 60 }
62 61
63 // PC marker, caller-fp, caller-pc. 62 // PC marker, caller-fp, caller-pc.
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 return; 737 return;
739 } 738 }
740 } 739 }
741 740
742 // This move is not blocked. 741 // This move is not blocked.
743 EmitMove(index); 742 EmitMove(index);
744 } 743 }
745 744
746 745
747 } // namespace dart 746 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698