Chromium Code Reviews| 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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 409 info->set_bailout_reason("not enough virtual registers (regalloc)"); | 409 info->set_bailout_reason("not enough virtual registers (regalloc)"); |
| 410 return NULL; | 410 return NULL; |
| 411 } | 411 } |
| 412 | 412 |
| 413 return chunk; | 413 return chunk; |
| 414 } | 414 } |
| 415 | 415 |
| 416 | 416 |
| 417 Handle<Code> LChunk::Codegen(Code::Kind kind) { | 417 Handle<Code> LChunk::Codegen(Code::Kind kind) { |
| 418 MacroAssembler assembler(info()->isolate(), NULL, 0); | 418 MacroAssembler assembler(info()->isolate(), NULL, 0); |
| 419 if (info()->isolate()->logger()->is_code_event_handler_enabled()) { | |
|
danno
2013/02/01 13:43:10
Other Logger APIs do "is_enabled" checking inside
| |
| 420 void* line_info = | |
|
danno
2013/02/01 13:43:10
This should be jit_handler_data
| |
| 421 info()->isolate()->logger()->CodeStartLinePosInfoRecordEvent(); | |
| 422 assembler.positions_recorder()->InitializeUserData(line_info); | |
|
danno
2013/02/01 13:43:10
InitializeUserData should be InitializeJitHandlerD
| |
| 423 } | |
| 419 LCodeGen generator(this, &assembler, info()); | 424 LCodeGen generator(this, &assembler, info()); |
| 420 | 425 |
| 421 MarkEmptyBlocks(); | 426 MarkEmptyBlocks(); |
| 422 | 427 |
| 423 if (generator.GenerateCode()) { | 428 if (generator.GenerateCode()) { |
| 424 if (FLAG_trace_codegen) { | 429 if (FLAG_trace_codegen) { |
| 425 PrintF("Crankshaft Compiler - "); | 430 PrintF("Crankshaft Compiler - "); |
| 426 } | 431 } |
| 427 CodeGenerator::MakeCodePrologue(info()); | 432 CodeGenerator::MakeCodePrologue(info()); |
| 428 Code::Flags flags = Code::ComputeFlags(kind); | 433 Code::Flags flags = Code::ComputeFlags(kind); |
| 429 Handle<Code> code = | 434 Handle<Code> code = |
| 430 CodeGenerator::MakeCodeEpilogue(&assembler, flags, info()); | 435 CodeGenerator::MakeCodeEpilogue(&assembler, flags, info()); |
| 431 generator.FinishCode(code); | 436 generator.FinishCode(code); |
| 437 | |
| 438 if (info()->isolate()->logger()->is_code_event_handler_enabled()) { | |
| 439 if (!code.is_null()) { | |
| 440 void* line_info = | |
| 441 assembler.positions_recorder()->DetachJITLineInfo(); | |
| 442 LOG_CODE_EVENT(info()->isolate(), | |
| 443 CodeEndLinePosInfoRecordEvent(*code, line_info)); | |
|
danno
2013/02/01 13:43:10
line_info -> jit_handler_data
| |
| 444 } | |
| 445 } | |
| 432 CodeGenerator::PrintCode(code, info()); | 446 CodeGenerator::PrintCode(code, info()); |
| 433 return code; | 447 return code; |
| 434 } | 448 } |
| 435 return Handle<Code>::null(); | 449 return Handle<Code>::null(); |
| 436 } | 450 } |
| 437 | 451 |
| 438 | 452 |
| 439 } } // namespace v8::internal | 453 } } // namespace v8::internal |
| OLD | NEW |