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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 Handle<Code> LChunk::Codegen() { | 425 Handle<Code> LChunk::Codegen() { |
426 MacroAssembler assembler(info()->isolate(), NULL, 0); | 426 MacroAssembler assembler(info()->isolate(), NULL, 0); |
427 LOG_CODE_EVENT(info()->isolate(), | 427 LOG_CODE_EVENT(info()->isolate(), |
428 CodeStartLinePosInfoRecordEvent( | 428 CodeStartLinePosInfoRecordEvent( |
429 assembler.positions_recorder())); | 429 assembler.positions_recorder())); |
430 LCodeGen generator(this, &assembler, info()); | 430 LCodeGen generator(this, &assembler, info()); |
431 | 431 |
432 MarkEmptyBlocks(); | 432 MarkEmptyBlocks(); |
433 | 433 |
434 if (generator.GenerateCode()) { | 434 if (generator.GenerateCode()) { |
| 435 generator.CheckEnvironmentUsage(); |
435 CodeGenerator::MakeCodePrologue(info(), "optimized"); | 436 CodeGenerator::MakeCodePrologue(info(), "optimized"); |
436 Code::Flags flags = info()->flags(); | 437 Code::Flags flags = info()->flags(); |
437 Handle<Code> code = | 438 Handle<Code> code = |
438 CodeGenerator::MakeCodeEpilogue(&assembler, flags, info()); | 439 CodeGenerator::MakeCodeEpilogue(&assembler, flags, info()); |
439 generator.FinishCode(code); | 440 generator.FinishCode(code); |
440 code->set_is_crankshafted(true); | 441 code->set_is_crankshafted(true); |
441 void* jit_handler_data = | 442 void* jit_handler_data = |
442 assembler.positions_recorder()->DetachJITHandlerData(); | 443 assembler.positions_recorder()->DetachJITHandlerData(); |
443 LOG_CODE_EVENT(info()->isolate(), | 444 LOG_CODE_EVENT(info()->isolate(), |
444 CodeEndLinePosInfoRecordEvent(*code, jit_handler_data)); | 445 CodeEndLinePosInfoRecordEvent(*code, jit_handler_data)); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 | 610 |
610 | 611 |
611 LPhase::~LPhase() { | 612 LPhase::~LPhase() { |
612 if (ShouldProduceTraceOutput()) { | 613 if (ShouldProduceTraceOutput()) { |
613 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 614 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
614 } | 615 } |
615 } | 616 } |
616 | 617 |
617 | 618 |
618 } } // namespace v8::internal | 619 } } // namespace v8::internal |
OLD | NEW |