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

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

Issue 12114008: Avoid re-tagging of the index register in optimized byte array access. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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
« runtime/vm/locations.h ('K') | « runtime/vm/locations.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/locations.h" 5 #include "vm/locations.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/il_printer.h" 8 #include "vm/il_printer.h"
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 #include "vm/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 72
73 Location Location::FixedRegisterOrSmiConstant(Value* value, Register reg) { 73 Location Location::FixedRegisterOrSmiConstant(Value* value, Register reg) {
74 ConstantInstr* constant = value->definition()->AsConstant(); 74 ConstantInstr* constant = value->definition()->AsConstant();
75 return ((constant != NULL) && constant->value().IsSmi()) 75 return ((constant != NULL) && constant->value().IsSmi())
76 ? Location::Constant(constant->value()) 76 ? Location::Constant(constant->value())
77 : Location::RegisterLocation(reg); 77 : Location::RegisterLocation(reg);
78 } 78 }
79 79
80 80
81 Location Location::WritableRegisterOrSmiConstant(Value* value) {
82 ConstantInstr* constant = value->definition()->AsConstant();
83 return ((constant != NULL) && constant->value().IsSmi())
84 ? Location::Constant(constant->value())
85 : Location::WritableRegister();
86 }
87
88
81 Location Location::AnyOrConstant(Value* value) { 89 Location Location::AnyOrConstant(Value* value) {
82 ConstantInstr* constant = value->definition()->AsConstant(); 90 ConstantInstr* constant = value->definition()->AsConstant();
83 return (constant != NULL) 91 return (constant != NULL)
84 ? Location::Constant(constant->value()) 92 ? Location::Constant(constant->value())
85 : Location::Any(); 93 : Location::Any();
86 } 94 }
87 95
88 96
89 Address Location::ToStackSlotAddress() const { 97 Address Location::ToStackSlotAddress() const {
90 const intptr_t index = stack_index(); 98 const intptr_t index = stack_index();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 179
172 if (!out().IsInvalid()) { 180 if (!out().IsInvalid()) {
173 f->Print(" => "); 181 f->Print(" => ");
174 out().PrintTo(f); 182 out().PrintTo(f);
175 } 183 }
176 184
177 if (always_calls()) f->Print(" C"); 185 if (always_calls()) f->Print(" C");
178 } 186 }
179 187
180 } // namespace dart 188 } // namespace dart
OLDNEW
« runtime/vm/locations.h ('K') | « runtime/vm/locations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698