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

Unified Diff: runtime/vm/intermediate_language.h

Issue 10832277: Eliminate condition type check when possible. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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/il_printer.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 10606)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -454,7 +454,8 @@
intptr_t try_index,
Value* value)
: token_pos_(token_pos),
- try_index_(try_index) {
+ try_index_(try_index),
+ eliminated_(false) {
ASSERT(value != NULL);
inputs_[0] = value;
}
@@ -465,11 +466,22 @@
intptr_t try_index() const { return try_index_; }
Value* value() const { return inputs_[0]; }
+ bool IsEliminated() const {
srdjan 2012/08/13 22:14:18 s/IsEliminated/is_eliminated_.
regis 2012/08/13 22:23:49 Done.
+ return eliminated_;
+ }
+ void Eliminate() {
srdjan 2012/08/13 22:14:18 s/Eliminate/eliminate/
regis 2012/08/13 22:23:49 Done.
+ ASSERT(!eliminated_);
+ eliminated_ = true;
+ }
+
+ virtual void PrintOperandsTo(BufferFormatter* f) const;
+
virtual bool CanDeoptimize() const { return false; }
private:
const intptr_t token_pos_;
const intptr_t try_index_;
+ bool eliminated_;
srdjan 2012/08/13 22:14:18 s/eliminated_/is_eleminated_/
regis 2012/08/13 22:23:49 Done.
DISALLOW_COPY_AND_ASSIGN(AssertBooleanComp);
};
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698