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

Unified Diff: runtime/vm/deopt_instructions.cc

Issue 13867006: Inline binary Float32x4 ops. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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/deopt_instructions.cc
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index f6f8869a51bc8b6e912900c87277dc7b0f07bc79..1c010efc01ffea443e0a7b8d055ccacee5a347a4 100644
--- a/runtime/vm/deopt_instructions.cc
+++ b/runtime/vm/deopt_instructions.cc
@@ -759,6 +759,12 @@ intptr_t DeoptInfoBuilder::FindOrAddObjectInTable(const Object& obj) const {
}
+intptr_t DeoptInfoBuilder::CalculateStackIndex(const Location& from_loc) const {
+ return from_loc.stack_index() < 0 ?
+ from_loc.stack_index() + num_args_ :
+ from_loc.stack_index() + num_args_ - kFirstLocalSlotIndex + 1;
+}
+
Vyacheslav Egorov (Google) 2013/04/15 13:49:21 add empty line
Cutch 2013/04/15 14:07:06 Done.
void DeoptInfoBuilder::AddReturnAddress(const Function& function,
intptr_t deopt_id,
intptr_t to_index) {
@@ -807,20 +813,24 @@ void DeoptInfoBuilder::AddCopy(Value* value,
}
} else if (from_loc.IsStackSlot()) {
ASSERT(value->definition()->representation() == kTagged);
- intptr_t from_index = (from_loc.stack_index() < 0) ?
- from_loc.stack_index() + num_args_ :
- from_loc.stack_index() + num_args_ - kFirstLocalSlotIndex + 1;
+ intptr_t from_index = CalculateStackIndex(from_loc);
deopt_instr = new DeoptStackSlotInstr(from_index);
} else if (from_loc.IsDoubleStackSlot()) {
- intptr_t from_index = (from_loc.stack_index() < 0) ?
- from_loc.stack_index() + num_args_ :
- from_loc.stack_index() + num_args_ - kFirstLocalSlotIndex + 1;
+ intptr_t from_index = CalculateStackIndex(from_loc);
if (value->definition()->representation() == kUnboxedDouble) {
deopt_instr = new DeoptDoubleStackSlotInstr(from_index);
} else {
ASSERT(value->definition()->representation() == kUnboxedMint);
deopt_instr = new DeoptInt64StackSlotInstr(from_index);
}
+ } else if (from_loc.IsQuadStackSlot()) {
+ intptr_t from_index = CalculateStackIndex(from_loc);
+ if (value->definition()->representation() == kUnboxedFloat32x4) {
+ deopt_instr = new DeoptFloat32x4StackSlotInstr(from_index);
+ } else {
+ ASSERT(value->definition()->representation() == kUnboxedUint32x4);
+ deopt_instr = new DeoptUint32x4StackSlotInstr(from_index);
+ }
} else {
UNREACHABLE();
}

Powered by Google App Engine
This is Rietveld 408576698