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

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

Issue 1383573002: VM: More compact code for pushing constant arguments on ia32/x64. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
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 #ifndef VM_LOCATIONS_H_ 5 #ifndef VM_LOCATIONS_H_
6 #define VM_LOCATIONS_H_ 6 #define VM_LOCATIONS_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/bitfield.h" 10 #include "vm/bitfield.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 bool IsInvalid() const { 142 bool IsInvalid() const {
143 return value_ == kInvalidLocation; 143 return value_ == kInvalidLocation;
144 } 144 }
145 145
146 // Constants. 146 // Constants.
147 bool IsConstant() const { 147 bool IsConstant() const {
148 return (value_ & kLocationTagMask) == kConstantTag; 148 return (value_ & kLocationTagMask) == kConstantTag;
149 } 149 }
150 150
151 static Location Constant(ConstantInstr* obj) { 151 static Location Constant(const ConstantInstr* obj) {
152 Location loc(reinterpret_cast<uword>(obj) | kConstantTag); 152 Location loc(reinterpret_cast<uword>(obj) | kConstantTag);
153 ASSERT(obj == loc.constant_instruction()); 153 ASSERT(obj == loc.constant_instruction());
154 return loc; 154 return loc;
155 } 155 }
156 156
157 ConstantInstr* constant_instruction() const { 157 ConstantInstr* constant_instruction() const {
158 ASSERT(IsConstant()); 158 ASSERT(IsConstant());
159 return reinterpret_cast<ConstantInstr*>(value_ & ~kLocationTagMask); 159 return reinterpret_cast<ConstantInstr*>(value_ & ~kLocationTagMask);
160 } 160 }
161 161
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 709
710 #if defined(DEBUG) 710 #if defined(DEBUG)
711 intptr_t writable_inputs_; 711 intptr_t writable_inputs_;
712 #endif 712 #endif
713 }; 713 };
714 714
715 715
716 } // namespace dart 716 } // namespace dart
717 717
718 #endif // VM_LOCATIONS_H_ 718 #endif // VM_LOCATIONS_H_
OLDNEW
« runtime/vm/intermediate_language_ia32.cc ('K') | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698