| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/compiler.h" | 5 #include "vm/compiler.h" |
| 6 | 6 |
| 7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
| 8 | 8 |
| 9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
| 10 #include "vm/block_scheduler.h" | 10 #include "vm/block_scheduler.h" |
| (...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1281 func.ClearCode(); | 1281 func.ClearCode(); |
| 1282 } | 1282 } |
| 1283 } | 1283 } |
| 1284 } | 1284 } |
| 1285 return error.raw(); | 1285 return error.raw(); |
| 1286 } | 1286 } |
| 1287 | 1287 |
| 1288 | 1288 |
| 1289 void Compiler::CompileStaticInitializer(const Field& field) { | 1289 void Compiler::CompileStaticInitializer(const Field& field) { |
| 1290 ASSERT(field.is_static()); | 1290 ASSERT(field.is_static()); |
| 1291 if (field.PrecompiledInitializer() != Function::null()) { | 1291 if (field.HasPrecompiledInitializer()) { |
| 1292 // TODO(rmacnak): Investigate why this happens for _enum_names. | 1292 // TODO(rmacnak): Investigate why this happens for _enum_names. |
| 1293 OS::Print("Warning: Ignoring repeated request for initializer for %s\n", | 1293 OS::Print("Warning: Ignoring repeated request for initializer for %s\n", |
| 1294 field.ToCString()); | 1294 field.ToCString()); |
| 1295 return; | 1295 return; |
| 1296 } | 1296 } |
| 1297 ASSERT(field.PrecompiledInitializer() == Function::null()); | |
| 1298 Thread* thread = Thread::Current(); | 1297 Thread* thread = Thread::Current(); |
| 1299 StackZone zone(thread); | 1298 StackZone zone(thread); |
| 1300 | 1299 |
| 1301 ParsedFunction* parsed_function = Parser::ParseStaticFieldInitializer(field); | 1300 ParsedFunction* parsed_function = Parser::ParseStaticFieldInitializer(field); |
| 1302 | 1301 |
| 1303 parsed_function->AllocateVariables(); | 1302 parsed_function->AllocateVariables(); |
| 1304 // Non-optimized code generator. | 1303 // Non-optimized code generator. |
| 1305 DartCompilationPipeline pipeline; | 1304 DartCompilationPipeline pipeline; |
| 1306 CompileParsedFunctionHelper(&pipeline, | 1305 CompileParsedFunctionHelper(&pipeline, |
| 1307 parsed_function, | 1306 parsed_function, |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1416 const Object& result = | 1415 const Object& result = |
| 1417 PassiveObject::Handle(isolate->object_store()->sticky_error()); | 1416 PassiveObject::Handle(isolate->object_store()->sticky_error()); |
| 1418 isolate->object_store()->clear_sticky_error(); | 1417 isolate->object_store()->clear_sticky_error(); |
| 1419 return result.raw(); | 1418 return result.raw(); |
| 1420 } | 1419 } |
| 1421 UNREACHABLE(); | 1420 UNREACHABLE(); |
| 1422 return Object::null(); | 1421 return Object::null(); |
| 1423 } | 1422 } |
| 1424 | 1423 |
| 1425 } // namespace dart | 1424 } // namespace dart |
| OLD | NEW |