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

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

Issue 2719603002: Rename Closure instance field type_arguments_ to instantiator_. (Closed)
Patch Set: work in progress 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/raw_object.h » ('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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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/precompiler.h" 5 #include "vm/precompiler.h"
6 6
7 #include "vm/aot_optimizer.h" 7 #include "vm/aot_optimizer.h"
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/branch_optimizer.h" 10 #include "vm/branch_optimizer.h"
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 void Precompiler::AddConstObject(const Instance& instance) { 1101 void Precompiler::AddConstObject(const Instance& instance) {
1102 const Class& cls = Class::Handle(Z, instance.clazz()); 1102 const Class& cls = Class::Handle(Z, instance.clazz());
1103 AddInstantiatedClass(cls); 1103 AddInstantiatedClass(cls);
1104 1104
1105 if (instance.IsClosure()) { 1105 if (instance.IsClosure()) {
1106 // An implicit static closure. 1106 // An implicit static closure.
1107 const Function& func = 1107 const Function& func =
1108 Function::Handle(Z, Closure::Cast(instance).function()); 1108 Function::Handle(Z, Closure::Cast(instance).function());
1109 ASSERT(func.is_static()); 1109 ASSERT(func.is_static());
1110 AddFunction(func); 1110 AddFunction(func);
1111 AddTypeArguments(TypeArguments::Handle(Z, instance.GetTypeArguments())); 1111 AddTypeArguments(
1112 TypeArguments::Handle(Z, Closure::Cast(instance).instantiator()));
1112 return; 1113 return;
1113 } 1114 }
1114 1115
1115 // Can't ask immediate objects if they're canoncial. 1116 // Can't ask immediate objects if they're canoncial.
1116 if (instance.IsSmi()) return; 1117 if (instance.IsSmi()) return;
1117 1118
1118 // Some Instances in the ObjectPool aren't const objects, such as 1119 // Some Instances in the ObjectPool aren't const objects, such as
1119 // argument descriptors. 1120 // argument descriptors.
1120 if (!instance.IsCanonical()) return; 1121 if (!instance.IsCanonical()) return;
1121 1122
(...skipping 2432 matching lines...) Expand 10 before | Expand all | Expand 10 after
3554 3555
3555 ASSERT(FLAG_precompiled_mode); 3556 ASSERT(FLAG_precompiled_mode);
3556 const bool optimized = function.IsOptimizable(); // False for natives. 3557 const bool optimized = function.IsOptimizable(); // False for natives.
3557 DartPrecompilationPipeline pipeline(zone, field_type_map); 3558 DartPrecompilationPipeline pipeline(zone, field_type_map);
3558 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); 3559 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized);
3559 } 3560 }
3560 3561
3561 #endif // DART_PRECOMPILER 3562 #endif // DART_PRECOMPILER
3562 3563
3563 } // namespace dart 3564 } // namespace dart
OLDNEW
« 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