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

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
« no previous file with comments | « runtime/vm/deopt_instructions.h ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/deopt_instructions.cc
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index f6f8869a51bc8b6e912900c87277dc7b0f07bc79..bbb7adcc65f175667383b227d410a91ca214918d 100644
--- a/runtime/vm/deopt_instructions.cc
+++ b/runtime/vm/deopt_instructions.cc
@@ -759,6 +759,13 @@ 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;
+}
+
+
void DeoptInfoBuilder::AddReturnAddress(const Function& function,
intptr_t deopt_id,
intptr_t to_index) {
@@ -807,20 +814,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();
}
« no previous file with comments | « runtime/vm/deopt_instructions.h ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698