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

Unified Diff: runtime/vm/intermediate_language_mips.cc

Issue 504143003: Support Int32 representation for selected binary operations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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
Index: runtime/vm/intermediate_language_mips.cc
diff --git a/runtime/vm/intermediate_language_mips.cc b/runtime/vm/intermediate_language_mips.cc
index a52b566398dae814b8568ca2de4a76bc40cd4334..645f87b9036eda7db9230c576ee9d5e09a26578e 100644
--- a/runtime/vm/intermediate_language_mips.cc
+++ b/runtime/vm/intermediate_language_mips.cc
@@ -326,6 +326,7 @@ LocationSummary* UnboxedConstantInstr::MakeLocationSummary(Isolate* isolate,
void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ ASSERT(representation_ == kUnboxedDouble);
// The register allocator drops constant definitions that have no uses.
if (!locs()->out(0).IsInvalid()) {
ASSERT(value().IsDouble());
@@ -1122,7 +1123,7 @@ LocationSummary* LoadIndexedInstr::MakeLocationSummary(Isolate* isolate,
isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
locs->set_in(0, Location::RequiresRegister());
if (CanBeImmediateIndex(index(), class_id(), IsExternal())) {
- locs->set_in(1, Location::Constant(index()->BoundConstant()));
+ locs->set_in(1, Location::Constant(index()->definition()->AsConstant()));
} else {
locs->set_in(1, Location::RequiresRegister());
}
@@ -1275,7 +1276,7 @@ LocationSummary* StoreIndexedInstr::MakeLocationSummary(Isolate* isolate,
isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
locs->set_in(0, Location::RequiresRegister());
if (CanBeImmediateIndex(index(), class_id(), IsExternal())) {
- locs->set_in(1, Location::Constant(index()->BoundConstant()));
+ locs->set_in(1, Location::Constant(index()->definition()->AsConstant()));
} else {
locs->set_in(1, Location::WritableRegister());
}
@@ -2724,7 +2725,7 @@ LocationSummary* BinarySmiOpInstr::MakeLocationSummary(Isolate* isolate,
summary->set_in(0, Location::RequiresRegister());
if (RightIsPowerOfTwoConstant()) {
ConstantInstr* right_constant = right()->definition()->AsConstant();
- summary->set_in(1, Location::Constant(right_constant->value()));
+ summary->set_in(1, Location::Constant(right_constant));
} else {
summary->set_in(1, Location::RequiresRegister());
}
@@ -3835,6 +3836,8 @@ void UnaryDoubleOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
+DEFINE_UNIMPLEMENTED_INSTRUCTION(Int32ToDoubleInstr)
+
LocationSummary* SmiToDoubleInstr::MakeLocationSummary(Isolate* isolate,
bool opt) const {
@@ -4558,86 +4561,15 @@ CompileType UnaryUint32OpInstr::ComputeType() const {
}
-CompileType BoxUint32Instr::ComputeType() const {
- return CompileType::Int();
-}
-
-
-CompileType UnboxUint32Instr::ComputeType() const {
- return CompileType::Int();
-}
-
-
-LocationSummary* BinaryUint32OpInstr::MakeLocationSummary(Isolate* isolate,
- bool opt) const {
- UNIMPLEMENTED();
- return NULL;
-}
-
-
-void BinaryUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
-}
-
-
-LocationSummary* ShiftUint32OpInstr::MakeLocationSummary(Isolate* isolate,
- bool opt) const {
- UNIMPLEMENTED();
- return NULL;
-}
-
-
-void ShiftUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
-}
-
-
-LocationSummary* UnaryUint32OpInstr::MakeLocationSummary(Isolate* isolate,
- bool opt) const {
- UNIMPLEMENTED();
- return NULL;
-}
-
-
-void UnaryUint32OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
-}
-
-
-LocationSummary* UnboxUint32Instr::MakeLocationSummary(Isolate* isolate,
- bool opt) const {
- UNIMPLEMENTED();
- return NULL;
-}
-
-
-void UnboxUint32Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
-}
-
-
-LocationSummary* BoxUint32Instr::MakeLocationSummary(Isolate* isolate,
- bool opt) const {
- UNIMPLEMENTED();
- return NULL;
-}
-
-
-void BoxUint32Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
-}
-
-
-LocationSummary* UnboxedIntConverterInstr::MakeLocationSummary(Isolate* isolate,
- bool opt) const {
- UNIMPLEMENTED();
- return NULL;
-}
-
-
-void UnboxedIntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- UNIMPLEMENTED();
-}
+DEFINE_UNIMPLEMENTED_INSTRUCTION(BinaryUint32OpInstr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(ShiftUint32OpInstr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(UnaryUint32OpInstr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(BoxInt32Instr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(UnboxInt32Instr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(BinaryInt32OpInstr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(BoxUint32Instr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(UnboxUint32Instr)
+DEFINE_UNIMPLEMENTED_INSTRUCTION(UnboxedIntConverterInstr)
LocationSummary* ThrowInstr::MakeLocationSummary(Isolate* isolate,

Powered by Google App Engine
This is Rietveld 408576698