| 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 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 | 1214 |
| 1215 RawFunction* Precompiler::CompileStaticInitializer(const Field& field, | 1215 RawFunction* Precompiler::CompileStaticInitializer(const Field& field, |
| 1216 bool compute_type) { | 1216 bool compute_type) { |
| 1217 ASSERT(field.is_static()); | 1217 ASSERT(field.is_static()); |
| 1218 Thread* thread = Thread::Current(); | 1218 Thread* thread = Thread::Current(); |
| 1219 StackZone stack_zone(thread); | 1219 StackZone stack_zone(thread); |
| 1220 Zone* zone = stack_zone.GetZone(); | 1220 Zone* zone = stack_zone.GetZone(); |
| 1221 | 1221 |
| 1222 ParsedFunction* parsed_function; | 1222 ParsedFunction* parsed_function; |
| 1223 // Check if this field is coming from the Kernel binary. | 1223 // Check if this field is coming from the Kernel binary. |
| 1224 if (field.kernel_offset() > 0) { | 1224 if (field.kernel_field() != NULL) { |
| 1225 parsed_function = kernel::ParseStaticFieldInitializer(zone, field); | 1225 parsed_function = kernel::ParseStaticFieldInitializer(zone, field); |
| 1226 } else { | 1226 } else { |
| 1227 parsed_function = Parser::ParseStaticFieldInitializer(field); | 1227 parsed_function = Parser::ParseStaticFieldInitializer(field); |
| 1228 parsed_function->AllocateVariables(); | 1228 parsed_function->AllocateVariables(); |
| 1229 } | 1229 } |
| 1230 | 1230 |
| 1231 | 1231 |
| 1232 DartPrecompilationPipeline pipeline(zone); | 1232 DartPrecompilationPipeline pipeline(zone); |
| 1233 PrecompileParsedFunctionHelper helper(/* precompiler = */ NULL, | 1233 PrecompileParsedFunctionHelper helper(/* precompiler = */ NULL, |
| 1234 parsed_function, | 1234 parsed_function, |
| (...skipping 2129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3364 | 3364 |
| 3365 ASSERT(FLAG_precompiled_mode); | 3365 ASSERT(FLAG_precompiled_mode); |
| 3366 const bool optimized = function.IsOptimizable(); // False for natives. | 3366 const bool optimized = function.IsOptimizable(); // False for natives. |
| 3367 DartPrecompilationPipeline pipeline(zone, field_type_map); | 3367 DartPrecompilationPipeline pipeline(zone, field_type_map); |
| 3368 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); | 3368 return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized); |
| 3369 } | 3369 } |
| 3370 | 3370 |
| 3371 #endif // DART_PRECOMPILER | 3371 #endif // DART_PRECOMPILER |
| 3372 | 3372 |
| 3373 } // namespace dart | 3373 } // namespace dart |
| OLD | NEW |