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

Unified Diff: runtime/vm/intermediate_language.h

Issue 11092090: Inline indexed load and store of typed array float64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 13666)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -2658,7 +2658,8 @@
class LoadIndexedInstr : public TemplateDefinition<2> {
public:
- LoadIndexedInstr(Value* array, Value* index) {
+ LoadIndexedInstr(Value* array, Value* index, intptr_t class_id)
+ : class_id_(class_id) {
ASSERT(array != NULL);
ASSERT(index != NULL);
inputs_[0] = array;
@@ -2670,14 +2671,19 @@
Value* array() const { return inputs_[0]; }
Value* index() const { return inputs_[1]; }
+ intptr_t class_id() const { return class_id_; }
virtual bool CanDeoptimize() const { return false; }
virtual bool HasSideEffect() const { return false; }
- virtual intptr_t ResultCid() const { return kDynamicCid; }
+ virtual intptr_t ResultCid() const;
+ virtual Representation representation() const;
+
private:
+ const intptr_t class_id_;
+
DISALLOW_COPY_AND_ASSIGN(LoadIndexedInstr);
};
@@ -2687,8 +2693,12 @@
StoreIndexedInstr(Value* array,
Value* index,
Value* value,
- bool emit_store_barrier)
- : emit_store_barrier_(emit_store_barrier) {
+ bool emit_store_barrier,
+ intptr_t class_id,
+ intptr_t deopt_id)
+ : emit_store_barrier_(emit_store_barrier),
+ class_id_(class_id),
+ deopt_id_(deopt_id) {
ASSERT(array != NULL);
ASSERT(index != NULL);
ASSERT(value != NULL);
@@ -2703,6 +2713,7 @@
Value* array() const { return inputs_[0]; }
Value* index() const { return inputs_[1]; }
Value* value() const { return inputs_[2]; }
+ intptr_t class_id() const { return class_id_; }
bool ShouldEmitStoreBarrier() const {
return value()->NeedsStoreBuffer() && emit_store_barrier_;
@@ -2714,8 +2725,18 @@
virtual intptr_t ResultCid() const { return kDynamicCid; }
+ virtual Representation RequiredInputRepresentation(intptr_t idx) const;
+
+ virtual intptr_t DeoptimizationTarget() const {
+ // Direct access since this instruction cannot deoptimize, and the deopt-id
+ // was inherited from another instruction that could deoptimize.
+ return deopt_id_;
+ }
+
private:
const bool emit_store_barrier_;
+ const intptr_t class_id_;
+ const intptr_t deopt_id_;
DISALLOW_COPY_AND_ASSIGN(StoreIndexedInstr);
};
@@ -3447,8 +3468,8 @@
}
virtual intptr_t DeoptimizationTarget() const {
- // Direct access since this instuction cannot deoptimize, and the deopt-id
- // was inherited from another instuction that could deoptimize.
+ // Direct access since this instruction cannot deoptimize, and the deopt-id
+ // was inherited from another instruction that could deoptimize.
return deopt_id_;
}
@@ -3503,8 +3524,8 @@
}
virtual intptr_t DeoptimizationTarget() const {
- // Direct access since this instuction cannot deoptimize, and the deopt-id
- // was inherited from another instuction that could deoptimize.
+ // Direct access since this instruction cannot deoptimize, and the deopt-id
+ // was inherited from another instruction that could deoptimize.
return deopt_id_;
}
@@ -3564,8 +3585,8 @@
}
virtual intptr_t DeoptimizationTarget() const {
- // Direct access since this instuction cannot deoptimize, and the deopt-id
- // was inherited from another instuction that could deoptimize.
+ // Direct access since this instruction cannot deoptimize, and the deopt-id
+ // was inherited from another instruction that could deoptimize.
return deopt_id_;
}
@@ -3623,8 +3644,8 @@
}
virtual intptr_t DeoptimizationTarget() const {
- // Direct access since this instuction cannot deoptimize, and the deopt-id
- // was inherited from another instuction that could deoptimize.
+ // Direct access since this instruction cannot deoptimize, and the deopt-id
+ // was inherited from another instruction that could deoptimize.
return deopt_id_;
}
@@ -3678,8 +3699,8 @@
}
virtual intptr_t DeoptimizationTarget() const {
- // Direct access since this instuction cannot deoptimize, and the deopt-id
- // was inherited from another instuction that could deoptimize.
+ // Direct access since this instruction cannot deoptimize, and the deopt-id
+ // was inherited from another instruction that could deoptimize.
return deopt_id_;
}
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698