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

Unified Diff: runtime/vm/intermediate_language.h

Issue 2761933002: Add Genericity enum in VM to distinguish how a type is uninstantiated. (Closed)
Patch Set: sync Created 3 years, 9 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
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index d0e84e846d30867a45c439219b7bea8c49db284d..766a6836e4fad3bcfc72638c9fb21a20d0ab2c93 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -2534,6 +2534,7 @@ class AssertAssignableInstr : public TemplateDefinition<2, Throws, Pure> {
AssertAssignableInstr(TokenPosition token_pos,
Value* value,
Value* instantiator_type_arguments,
+ Value* function_type_arguments,
const AbstractType& dst_type,
const String& dst_name,
intptr_t deopt_id)
@@ -2546,6 +2547,7 @@ class AssertAssignableInstr : public TemplateDefinition<2, Throws, Pure> {
ASSERT(!dst_name.IsNull());
SetInputAt(0, value);
SetInputAt(1, instantiator_type_arguments);
+ ASSERT(function_type_arguments == NULL); // TODO(regis): Implement.
}
DECLARE_INSTRUCTION(AssertAssignable)
@@ -3961,12 +3963,14 @@ class InstanceOfInstr : public TemplateDefinition<2, Throws> {
InstanceOfInstr(TokenPosition token_pos,
Value* value,
Value* instantiator_type_arguments,
+ Value* function_type_arguments,
const AbstractType& type,
intptr_t deopt_id)
: TemplateDefinition(deopt_id), token_pos_(token_pos), type_(type) {
ASSERT(!type.IsNull());
SetInputAt(0, value);
SetInputAt(1, instantiator_type_arguments);
+ ASSERT(function_type_arguments == NULL); // TODO(regis): Implement.
}
DECLARE_INSTRUCTION(InstanceOf)
@@ -4385,21 +4389,20 @@ class InstantiateTypeInstr : public TemplateDefinition<1, Throws> {
public:
InstantiateTypeInstr(TokenPosition token_pos,
const AbstractType& type,
- const Class& instantiator_class,
- Value* instantiator)
+ Value* instantiator_type_arguments,
+ Value* function_type_arguments)
: TemplateDefinition(Thread::Current()->GetNextDeoptId()),
token_pos_(token_pos),
- type_(type),
- instantiator_class_(instantiator_class) {
+ type_(type) {
ASSERT(type.IsZoneHandle() || type.IsReadOnlyHandle());
- SetInputAt(0, instantiator);
+ ASSERT(function_type_arguments == NULL); // TODO(regis): Implement.
+ SetInputAt(0, instantiator_type_arguments);
}
DECLARE_INSTRUCTION(InstantiateType)
- Value* instantiator() const { return inputs_[0]; }
+ Value* instantiator_type_arguments() const { return inputs_[0]; }
const AbstractType& type() const { return type_; }
- const Class& instantiator_class() const { return instantiator_class_; }
virtual TokenPosition token_pos() const { return token_pos_; }
virtual bool CanDeoptimize() const { return true; }
@@ -4411,7 +4414,6 @@ class InstantiateTypeInstr : public TemplateDefinition<1, Throws> {
private:
const TokenPosition token_pos_;
const AbstractType& type_;
- const Class& instantiator_class_;
DISALLOW_COPY_AND_ASSIGN(InstantiateTypeInstr);
};
@@ -4422,18 +4424,20 @@ class InstantiateTypeArgumentsInstr : public TemplateDefinition<1, Throws> {
InstantiateTypeArgumentsInstr(TokenPosition token_pos,
const TypeArguments& type_arguments,
const Class& instantiator_class,
- Value* instantiator)
+ Value* instantiator_type_arguments,
+ Value* function_type_arguments)
: TemplateDefinition(Thread::Current()->GetNextDeoptId()),
token_pos_(token_pos),
type_arguments_(type_arguments),
instantiator_class_(instantiator_class) {
ASSERT(type_arguments.IsZoneHandle());
- SetInputAt(0, instantiator);
+ ASSERT(function_type_arguments == NULL); // TODO(regis): Implement.
+ SetInputAt(0, instantiator_type_arguments);
}
DECLARE_INSTRUCTION(InstantiateTypeArguments)
- Value* instantiator() const { return inputs_[0]; }
+ Value* instantiator_type_arguments() const { return inputs_[0]; }
const TypeArguments& type_arguments() const { return type_arguments_; }
const Class& instantiator_class() const { return instantiator_class_; }
virtual TokenPosition token_pos() const { return token_pos_; }
« 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