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

Unified Diff: dart/runtime/vm/intermediate_language.cc

Issue 963483002: Version 1.8.6 (Closed) Base URL: http://dart.googlecode.com/svn/branches/1.8/
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/runtime/vm/intermediate_language.h ('k') | dart/runtime/vm/locations.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/runtime/vm/intermediate_language.cc
===================================================================
--- dart/runtime/vm/intermediate_language.cc (revision 44047)
+++ dart/runtime/vm/intermediate_language.cc (working copy)
@@ -191,7 +191,7 @@
ASSERT(IsDenseSwitch());
intptr_t mask = 0;
for (intptr_t i = 0; i < cids_.length(); ++i) {
- mask |= 1 << (cids_[i] - cids_[0]);
+ mask |= static_cast<intptr_t>(1) << (cids_[i] - cids_[0]);
}
return mask;
}
@@ -2632,8 +2632,8 @@
// This function should be kept in sync with
// FlowGraphCompiler::SlowPathEnvironmentFor().
-void MaterializeObjectInstr::RemapRegisters(intptr_t* fpu_reg_slots,
- intptr_t* cpu_reg_slots) {
+void MaterializeObjectInstr::RemapRegisters(intptr_t* cpu_reg_slots,
+ intptr_t* fpu_reg_slots) {
if (registers_remapped_) {
return;
}
@@ -2640,34 +2640,8 @@
registers_remapped_ = true;
for (intptr_t i = 0; i < InputCount(); i++) {
- Location loc = LocationAt(i);
- if (loc.IsRegister()) {
- intptr_t index = cpu_reg_slots[loc.reg()];
- ASSERT(index >= 0);
- locations_[i] = Location::StackSlot(index);
- } else if (loc.IsFpuRegister()) {
- intptr_t index = fpu_reg_slots[loc.fpu_reg()];
- ASSERT(index >= 0);
- Value* value = InputAt(i);
- switch (value->definition()->representation()) {
- case kUnboxedDouble:
- locations_[i] = Location::DoubleStackSlot(index);
- break;
- case kUnboxedFloat32x4:
- case kUnboxedInt32x4:
- case kUnboxedFloat64x2:
- locations_[i] = Location::QuadStackSlot(index);
- break;
- default:
- UNREACHABLE();
- }
- } else if (loc.IsPairLocation()) {
- UNREACHABLE();
- } else if (loc.IsInvalid() &&
- InputAt(i)->definition()->IsMaterializeObject()) {
- InputAt(i)->definition()->AsMaterializeObject()->RemapRegisters(
- fpu_reg_slots, cpu_reg_slots);
- }
+ locations_[i] = LocationAt(i).RemapForSlowPath(
+ InputAt(i)->definition(), cpu_reg_slots, fpu_reg_slots);
}
}
« no previous file with comments | « dart/runtime/vm/intermediate_language.h ('k') | dart/runtime/vm/locations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698