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

Unified Diff: runtime/vm/intermediate_language.h

Issue 12086045: On Ia32 optimistically assume that results from int32 and uint32 array loads fit into Smi. Only if … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 17771)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -520,6 +520,7 @@
friend class DoubleToDoubleInstr;
friend class InvokeMathCFunctionInstr;
friend class FlowGraphOptimizer;
+ friend class LoadIndexedInstr;
intptr_t deopt_id_;
intptr_t lifetime_position_; // Position used by register allocator.
@@ -2695,12 +2696,16 @@
class LoadIndexedInstr : public TemplateDefinition<2> {
public:
- LoadIndexedInstr(Value* array, Value* index, intptr_t class_id)
+ LoadIndexedInstr(Value* array,
+ Value* index,
+ intptr_t class_id,
+ intptr_t deopt_id)
: class_id_(class_id) {
ASSERT(array != NULL);
ASSERT(index != NULL);
inputs_[0] = array;
inputs_[1] = index;
+ deopt_id_ = deopt_id;
}
DECLARE_INSTRUCTION(LoadIndexed)
@@ -2710,7 +2715,9 @@
Value* index() const { return inputs_[1]; }
intptr_t class_id() const { return class_id_; }
- virtual bool CanDeoptimize() const { return false; }
+ virtual bool CanDeoptimize() const {
+ return deopt_id_ != Isolate::kNoDeoptId;
+ }
virtual bool HasSideEffect() const { return false; }

Powered by Google App Engine
This is Rietveld 408576698