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

Unified Diff: runtime/vm/intermediate_language.h

Issue 10942006: Fix bad optimization of instance-of with uninstantiated types (issue 5216). (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.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 12501)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -89,19 +89,24 @@
const char* DebugName() const { return "Value"; }
- // Returns true if the value represents a constant.
+ // Return true if the value represents a constant.
bool BindsToConstant() const;
- // Returns true if the value represents the constant null.
+ // Return true if the value represents the constant null.
bool BindsToConstantNull() const;
// Assert if BindsToConstant() is false, otherwise returns the constant value.
const Object& BoundConstant() const;
- // Reminder: The type of the constant null is the bottom type, which is more
- // specific than any type.
- bool CompileTypeIsMoreSpecificThan(const AbstractType& dst_type) const;
+ // Compute a run-time null test at compile-time and set result in is_null.
+ // Return false if the computation is not possible at compile time.
+ bool CanComputeIsNull(bool* is_null) const;
+ // Compute a run-time type test at compile-time and set result in is_instance.
+ // Return false if the computation is not possible at compile time.
+ bool CanComputeIsInstanceOf(const AbstractType& type,
+ bool* is_instance) const;
+
// Compile time constants, Bool, Smi and Nulls do not need to update
// the store buffer.
bool NeedsStoreBuffer() const;
« 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