OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 Handle<Code> LChunk::Codegen() { | 448 Handle<Code> LChunk::Codegen() { |
449 MacroAssembler assembler(info()->isolate(), NULL, 0); | 449 MacroAssembler assembler(info()->isolate(), NULL, 0); |
450 LOG_CODE_EVENT(info()->isolate(), | 450 LOG_CODE_EVENT(info()->isolate(), |
451 CodeStartLinePosInfoRecordEvent( | 451 CodeStartLinePosInfoRecordEvent( |
452 assembler.positions_recorder())); | 452 assembler.positions_recorder())); |
453 LCodeGen generator(this, &assembler, info()); | 453 LCodeGen generator(this, &assembler, info()); |
454 | 454 |
455 MarkEmptyBlocks(); | 455 MarkEmptyBlocks(); |
456 | 456 |
457 if (generator.GenerateCode()) { | 457 if (generator.GenerateCode()) { |
458 if (FLAG_trace_codegen) { | 458 CodeGenerator::MakeCodePrologue(info(), "optimized"); |
459 PrintF("Crankshaft Compiler - "); | |
460 } | |
461 CodeGenerator::MakeCodePrologue(info()); | |
462 Code::Flags flags = info()->flags(); | 459 Code::Flags flags = info()->flags(); |
463 Handle<Code> code = | 460 Handle<Code> code = |
464 CodeGenerator::MakeCodeEpilogue(&assembler, flags, info()); | 461 CodeGenerator::MakeCodeEpilogue(&assembler, flags, info()); |
465 generator.FinishCode(code); | 462 generator.FinishCode(code); |
466 code->set_is_crankshafted(true); | 463 code->set_is_crankshafted(true); |
467 if (!code.is_null()) { | 464 if (!code.is_null()) { |
468 void* jit_handler_data = | 465 void* jit_handler_data = |
469 assembler.positions_recorder()->DetachJITHandlerData(); | 466 assembler.positions_recorder()->DetachJITHandlerData(); |
470 LOG_CODE_EVENT(info()->isolate(), | 467 LOG_CODE_EVENT(info()->isolate(), |
471 CodeEndLinePosInfoRecordEvent(*code, jit_handler_data)); | 468 CodeEndLinePosInfoRecordEvent(*code, jit_handler_data)); |
(...skipping 17 matching lines...) Expand all Loading... |
489 } else { | 486 } else { |
490 spill_slot_count_++; | 487 spill_slot_count_++; |
491 } | 488 } |
492 } | 489 } |
493 iterator.Advance(); | 490 iterator.Advance(); |
494 } | 491 } |
495 } | 492 } |
496 | 493 |
497 | 494 |
498 } } // namespace v8::internal | 495 } } // namespace v8::internal |
OLD | NEW |