OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/globals.h" // Needed here to get TARGET_ARCH_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
7 | 7 |
8 #include "vm/code_generator.h" | 8 #include "vm/code_generator.h" |
9 | 9 |
10 #include "lib/error.h" | 10 #include "lib/error.h" |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 } | 388 } |
389 | 389 |
390 | 390 |
391 void CodeGenerator::FinalizePcDescriptors(const Code& code) { | 391 void CodeGenerator::FinalizePcDescriptors(const Code& code) { |
392 ASSERT(pc_descriptors_list_ != NULL); | 392 ASSERT(pc_descriptors_list_ != NULL); |
393 const PcDescriptors& descriptors = PcDescriptors::Handle( | 393 const PcDescriptors& descriptors = PcDescriptors::Handle( |
394 pc_descriptors_list_->FinalizePcDescriptors(code.EntryPoint())); | 394 pc_descriptors_list_->FinalizePcDescriptors(code.EntryPoint())); |
395 bool ok = VerifyPcDescriptors( | 395 bool ok = VerifyPcDescriptors( |
396 descriptors, parsed_function_.function().is_optimizable()); | 396 descriptors, parsed_function_.function().is_optimizable()); |
397 if (!ok) { | 397 if (!ok) { |
| 398 // TODO(5442338) Fix bad pc descriptor generation. |
398 parsed_function_.function().set_is_optimizable(false); | 399 parsed_function_.function().set_is_optimizable(false); |
399 } | 400 } |
400 code.set_pc_descriptors(descriptors); | 401 code.set_pc_descriptors(descriptors); |
401 } | 402 } |
402 | 403 |
403 | 404 |
404 void CodeGenerator::FinalizeExceptionHandlers(const Code& code) { | 405 void CodeGenerator::FinalizeExceptionHandlers(const Code& code) { |
405 ASSERT(exception_handlers_list_ != NULL); | 406 ASSERT(exception_handlers_list_ != NULL); |
406 const ExceptionHandlers& handlers = ExceptionHandlers::Handle( | 407 const ExceptionHandlers& handlers = ExceptionHandlers::Handle( |
407 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint())); | 408 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint())); |
(...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2657 const Class& cls = Class::Handle(parsed_function_.function().owner()); | 2658 const Class& cls = Class::Handle(parsed_function_.function().owner()); |
2658 const Script& script = Script::Handle(cls.script()); | 2659 const Script& script = Script::Handle(cls.script()); |
2659 Parser::ReportMsg(script, token_index, "Error", error_msg, format, args); | 2660 Parser::ReportMsg(script, token_index, "Error", error_msg, format, args); |
2660 Isolate::Current()->long_jump_base()->Jump(1, error_msg); | 2661 Isolate::Current()->long_jump_base()->Jump(1, error_msg); |
2661 UNREACHABLE(); | 2662 UNREACHABLE(); |
2662 } | 2663 } |
2663 | 2664 |
2664 } // namespace dart | 2665 } // namespace dart |
2665 | 2666 |
2666 #endif // defined TARGET_ARCH_IA32 | 2667 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |