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

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

Issue 11362210: Restrict immediate operands to smi where only smis are supported. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/intermediate_language_x64.cc ('k') | runtime/vm/locations.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 #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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 258
259 intptr_t stack_index() const { 259 intptr_t stack_index() const {
260 ASSERT(IsStackSlot() || IsDoubleStackSlot()); 260 ASSERT(IsStackSlot() || IsDoubleStackSlot());
261 // Decode stack index manually to preserve sign. 261 // Decode stack index manually to preserve sign.
262 return IndexField::decode(payload()) - kStackIndexBias; 262 return IndexField::decode(payload()) - kStackIndexBias;
263 } 263 }
264 264
265 // Constants. 265 // Constants.
266 static Location RegisterOrConstant(Value* value); 266 static Location RegisterOrConstant(Value* value);
267 static Location RegisterOrSmiConstant(Value* value);
267 static Location FixedRegisterOrConstant(Value* value, Register reg); 268 static Location FixedRegisterOrConstant(Value* value, Register reg);
269 static Location FixedRegisterOrSmiConstant(Value* value, Register reg);
268 270
269 const char* Name() const; 271 const char* Name() const;
270 void PrintTo(BufferFormatter* f) const; 272 void PrintTo(BufferFormatter* f) const;
271 void Print() const; 273 void Print() const;
272 274
273 // Compare two locations. 275 // Compare two locations.
274 bool Equals(Location other) const { 276 bool Equals(Location other) const {
275 return value_ == other.value_; 277 return value_ == other.value_;
276 } 278 }
277 279
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 BitmapBuilder* stack_bitmap_; 469 BitmapBuilder* stack_bitmap_;
468 470
469 const ContainsCall contains_call_; 471 const ContainsCall contains_call_;
470 RegisterSet live_registers_; 472 RegisterSet live_registers_;
471 }; 473 };
472 474
473 475
474 } // namespace dart 476 } // namespace dart
475 477
476 #endif // VM_LOCATIONS_H_ 478 #endif // VM_LOCATIONS_H_
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/locations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698