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

Unified Diff: runtime/vm/intermediate_language.h

Issue 10914008: Add explicit smi-checks to smi comparisons. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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_ia32.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 11616)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -136,7 +136,7 @@
}
// Unique id used for deoptimization.
- intptr_t deopt_id() const {
+ virtual intptr_t deopt_id() const {
ASSERT(CanDeoptimize());
return deopt_id_;
}
@@ -1924,7 +1924,7 @@
Value* value() const { return inputs_[0]; }
- intptr_t deopt_id() const { return original_->deopt_id(); }
+ virtual intptr_t deopt_id() const { return original_->deopt_id(); }
virtual Definition* TryReplace(BindInstr* instr) const;
@@ -1939,9 +1939,10 @@
class CheckSmiComp : public TemplateComputation<1> {
public:
- CheckSmiComp(Value* value, InstanceCallComp* original)
- : original_(original) {
+ CheckSmiComp(Value* value, intptr_t original_deopt_id)
+ : original_deopt_id_(original_deopt_id) {
ASSERT(value != NULL);
+ ASSERT(original_deopt_id != Isolate::kNoDeoptId);
inputs_[0] = value;
}
@@ -1958,10 +1959,10 @@
Value* value() const { return inputs_[0]; }
- intptr_t deopt_id() const { return original_->deopt_id(); }
+ virtual intptr_t deopt_id() const { return original_deopt_id_; }
private:
- InstanceCallComp* original_;
+ const intptr_t original_deopt_id_;
DISALLOW_COPY_AND_ASSIGN(CheckSmiComp);
};
@@ -1994,7 +1995,7 @@
intptr_t array_type() const { return array_type_; }
- intptr_t deopt_id() const { return original_->deopt_id(); }
+ virtual intptr_t deopt_id() const { return original_->deopt_id(); }
private:
intptr_t array_type_;
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698