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

Unified Diff: runtime/vm/precompiler.cc

Issue 1815733003: Remove recently introduced FunctionType vm class by merging it into class Type. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comment Created 4 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/parser.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/precompiler.cc
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
index 67ba031c8b3c973419201a9080f35f7f6f682014..d3578394ca9d7fa76529533a59e9722f666a24d5 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -621,14 +621,10 @@ void Precompiler::AddType(const AbstractType& abstype) {
AddTypesOf(cls);
const TypeArguments& vector = TypeArguments::Handle(Z, abstype.arguments());
AddTypeArguments(vector);
- } else if (abstype.IsFunctionType()) {
- const FunctionType& func_type = FunctionType::Cast(abstype);
- const Class& cls = Class::Handle(Z, func_type.scope_class());
- AddTypesOf(cls);
- const Function& func = Function::Handle(Z, func_type.signature());
- AddTypesOf(func);
- const TypeArguments& vector = TypeArguments::Handle(Z, abstype.arguments());
- AddTypeArguments(vector);
+ if (type.IsFunctionType()) {
+ const Function& func = Function::Handle(Z, type.signature());
+ AddTypesOf(func);
+ }
} else if (abstype.IsBoundedType()) {
AbstractType& type = AbstractType::Handle(Z);
type = BoundedType::Cast(abstype).type();
@@ -847,7 +843,7 @@ RawObject* Precompiler::ExecuteOnce(SequenceNode* fragment) {
false, // not abstract
false, // not external
false, // not native
- Class::Handle(Type::Handle(Type::Function()).type_class()),
+ Class::Handle(Type::Handle(Type::DartFunctionType()).type_class()),
fragment->token_pos()));
func.set_result_type(Object::dynamic_type());
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698