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

Side by Side Diff: runtime/vm/class_finalizer.cc

Issue 2811643004: Added missing canonicalization of typedef signature instantiated during (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/class_finalizer.h" 5 #include "vm/class_finalizer.h"
6 6
7 #include "vm/code_generator.h" 7 #include "vm/code_generator.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/hash_table.h" 9 #include "vm/hash_table.h"
10 #include "vm/heap.h" 10 #include "vm/heap.h"
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 TypeArguments::Handle(zone, fun_type.arguments()); 1242 TypeArguments::Handle(zone, fun_type.arguments());
1243 if (FLAG_trace_type_finalization) { 1243 if (FLAG_trace_type_finalization) {
1244 THR_Print("Instantiating signature '%s' of typedef '%s'\n", 1244 THR_Print("Instantiating signature '%s' of typedef '%s'\n",
1245 String::Handle(zone, signature.Signature()).ToCString(), 1245 String::Handle(zone, signature.Signature()).ToCString(),
1246 String::Handle(zone, fun_type.Name()).ToCString()); 1246 String::Handle(zone, fun_type.Name()).ToCString());
1247 } 1247 }
1248 signature = signature.InstantiateSignatureFrom(type_args, Heap::kOld); 1248 signature = signature.InstantiateSignatureFrom(type_args, Heap::kOld);
1249 // Note that if type_args contains type parameters, signature is still 1249 // Note that if type_args contains type parameters, signature is still
1250 // uninstantiated here (typedef type parameters were substituted in 1250 // uninstantiated here (typedef type parameters were substituted in
1251 // the signature with typedef type arguments). 1251 // the signature with typedef type arguments).
1252 FinalizeSignature(scope_class, signature); // Canonicalize signature.
1252 } 1253 }
1253 fun_type.set_signature(signature); 1254 fun_type.set_signature(signature);
1254 } else { 1255 } else {
1255 FinalizeSignature(cls, Function::Handle(zone, fun_type.signature())); 1256 FinalizeSignature(cls, Function::Handle(zone, fun_type.signature()));
1256 } 1257 }
1257 } 1258 }
1258 1259
1259 if (FLAG_trace_type_finalization) { 1260 if (FLAG_trace_type_finalization) {
1260 THR_Print("Marking type '%s' as finalized for class '%s'\n", 1261 THR_Print("Marking type '%s' as finalized for class '%s'\n",
1261 String::Handle(zone, type.Name()).ToCString(), 1262 String::Handle(zone, type.Name()).ToCString(),
(...skipping 2485 matching lines...) Expand 10 before | Expand all | Expand 10 after
3747 ProgramVisitor::VisitFunctions(&function_visitor); 3748 ProgramVisitor::VisitFunctions(&function_visitor);
3748 3749
3749 class ClearCodeClassVisitor : public ClassVisitor { 3750 class ClearCodeClassVisitor : public ClassVisitor {
3750 void Visit(const Class& cls) { cls.DisableAllocationStub(); } 3751 void Visit(const Class& cls) { cls.DisableAllocationStub(); }
3751 }; 3752 };
3752 ClearCodeClassVisitor class_visitor; 3753 ClearCodeClassVisitor class_visitor;
3753 ProgramVisitor::VisitClasses(&class_visitor); 3754 ProgramVisitor::VisitClasses(&class_visitor);
3754 } 3755 }
3755 3756
3756 } // namespace dart 3757 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698