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

Unified Diff: runtime/vm/intermediate_language.h

Issue 10440053: Moved InstantiateTypeArgumentsComp and InstanceOfComp. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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.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 8007)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -321,11 +321,12 @@
DECLARE_COMPUTATION(AssertAssignable)
- intptr_t token_index() const { return token_index_; }
- intptr_t try_index() const { return try_index_; }
Value* value() const { return inputs_[0]; }
Value* instantiator() const { return inputs_[1]; }
Value* instantiator_type_arguments() const { return inputs_[2]; }
+
+ intptr_t token_index() const { return token_index_; }
+ intptr_t try_index() const { return try_index_; }
const AbstractType& dst_type() const { return dst_type_; }
const String& dst_name() const { return dst_name_; }
@@ -857,43 +858,39 @@
};
-class InstanceOfComp : public Computation {
+class InstanceOfComp : public TemplateComputation<3> {
public:
InstanceOfComp(intptr_t token_index,
intptr_t try_index,
Value* value,
- Value* instantiator, // Can be NULL.
- Value* type_arguments, // Can be NULL.
+ Value* instantiator,
+ Value* instantiator_type_arguments,
const AbstractType& type,
bool negate_result)
: token_index_(token_index),
try_index_(try_index),
- value_(value),
- instantiator_(instantiator),
- type_arguments_(type_arguments),
type_(type),
negate_result_(negate_result) {
- ASSERT(value_ != NULL);
+ ASSERT(value != NULL);
+ ASSERT(instantiator != NULL);
+ ASSERT(instantiator_type_arguments != NULL);
ASSERT(!type.IsNull());
+ inputs_[0] = value;
+ inputs_[1] = instantiator;
+ inputs_[2] = instantiator_type_arguments;
}
DECLARE_COMPUTATION(InstanceOf)
- Value* value() const { return value_; }
- Value* instantiator() const { return instantiator_; }
- Value* type_arguments() const { return type_arguments_; }
+ Value* value() const { return inputs_[0]; }
+ Value* instantiator() const { return inputs_[1]; }
+ Value* instantiator_type_arguments() const { return inputs_[2]; }
+
bool negate_result() const { return negate_result_; }
const AbstractType& type() const { return type_; }
intptr_t token_index() const { return token_index_; }
intptr_t try_index() const { return try_index_; }
- virtual intptr_t InputCount() const;
- virtual Value* InputAt(intptr_t i) const {
- if (i == 0) return value();
- if (i == 1) return type_arguments();
- return NULL;
- }
-
virtual void PrintOperandsTo(BufferFormatter* f) const;
private:
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698