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

Unified Diff: runtime/vm/locations.cc

Issue 10916090: Support immediate operands for array bounds checks. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/locations.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/locations.cc
===================================================================
--- runtime/vm/locations.cc (revision 11818)
+++ runtime/vm/locations.cc (working copy)
@@ -45,6 +45,22 @@
}
+Location Location::RegisterOrConstant(Value* value) {
+ ConstantComp* constant = value->definition()->AsConstant();
+ return (constant != NULL)
+ ? Location::Constant(constant->value())
+ : Location::RequiresRegister();
+}
+
+
+Location Location::FixedRegisterOrConstant(Value* value, Register reg) {
+ ConstantComp* constant = value->definition()->AsConstant();
+ return (constant != NULL)
+ ? Location::Constant(constant->value())
+ : Location::RegisterLocation(reg);
+}
+
+
const char* Location::Name() const {
switch (kind()) {
case kInvalid: return "?";
« no previous file with comments | « runtime/vm/locations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698