| OLD | NEW |
| 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 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1202 | 1202 |
| 1203 | 1203 |
| 1204 RawFunction* Precompiler::CompileStaticInitializer(const Field& field, | 1204 RawFunction* Precompiler::CompileStaticInitializer(const Field& field, |
| 1205 bool compute_type) { | 1205 bool compute_type) { |
| 1206 ASSERT(field.is_static()); | 1206 ASSERT(field.is_static()); |
| 1207 Thread* thread = Thread::Current(); | 1207 Thread* thread = Thread::Current(); |
| 1208 StackZone stack_zone(thread); | 1208 StackZone stack_zone(thread); |
| 1209 Zone* zone = stack_zone.GetZone(); | 1209 Zone* zone = stack_zone.GetZone(); |
| 1210 | 1210 |
| 1211 ParsedFunction* parsed_function; | 1211 ParsedFunction* parsed_function; |
| 1212 // Check if this field is comming from the Kernel binary. | 1212 // Check if this field is coming from the Kernel binary. |
| 1213 if (field.kernel_field() != NULL) { | 1213 if (field.kernel_field() != NULL) { |
| 1214 parsed_function = kernel::ParseStaticFieldInitializer(zone, field); | 1214 parsed_function = kernel::ParseStaticFieldInitializer(zone, field); |
| 1215 } else { | 1215 } else { |
| 1216 parsed_function = Parser::ParseStaticFieldInitializer(field); | 1216 parsed_function = Parser::ParseStaticFieldInitializer(field); |
| 1217 parsed_function->AllocateVariables(); | 1217 parsed_function->AllocateVariables(); |
| 1218 } | 1218 } |
| 1219 | 1219 |
| 1220 | 1220 |
| 1221 DartPrecompilationPipeline pipeline(zone); | 1221 DartPrecompilationPipeline pipeline(zone); |
| 1222 PrecompileParsedFunctionHelper helper(/* precompiler = */ NULL, | 1222 PrecompileParsedFunctionHelper helper(/* precompiler = */ NULL, |
| (...skipping 2105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3328 | 3328 |
| 3329 ASSERT(FLAG_precompiled_mode); | 3329 ASSERT(FLAG_precompiled_mode); |
| 3330 const bool optimized = function.IsOptimizable(); // False for natives. | 3330 const bool optimized = function.IsOptimizable(); // False for natives. |
| 3331 DartPrecompilationPipeline pipeline(zone, field_type_map); | 3331 DartPrecompilationPipeline pipeline(zone, field_type_map); |
| 3332 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); | 3332 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); |
| 3333 } | 3333 } |
| 3334 | 3334 |
| 3335 #endif // DART_PRECOMPILER | 3335 #endif // DART_PRECOMPILER |
| 3336 | 3336 |
| 3337 } // namespace dart | 3337 } // namespace dart |
| OLD | NEW |