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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 | 407 |
408 if (!allocator.Allocate(chunk)) { | 408 if (!allocator.Allocate(chunk)) { |
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() { |
418 MacroAssembler assembler(info()->isolate(), NULL, 0); | 418 MacroAssembler assembler(info()->isolate(), NULL, 0); |
419 LCodeGen generator(this, &assembler, info()); | 419 LCodeGen generator(this, &assembler, info()); |
420 | 420 |
421 MarkEmptyBlocks(); | 421 MarkEmptyBlocks(); |
422 | 422 |
423 if (generator.GenerateCode()) { | 423 if (generator.GenerateCode()) { |
424 if (FLAG_trace_codegen) { | 424 if (FLAG_trace_codegen) { |
425 PrintF("Crankshaft Compiler - "); | 425 PrintF("Crankshaft Compiler - "); |
426 } | 426 } |
427 CodeGenerator::MakeCodePrologue(info()); | 427 CodeGenerator::MakeCodePrologue(info()); |
428 Code::Flags flags = Code::ComputeFlags(kind); | 428 Code::Flags flags = Code::ComputeFlags(Code::OPTIMIZED_FUNCTION); |
429 Handle<Code> code = | 429 Handle<Code> code = |
430 CodeGenerator::MakeCodeEpilogue(&assembler, flags, info()); | 430 CodeGenerator::MakeCodeEpilogue(&assembler, flags, info()); |
431 generator.FinishCode(code); | 431 generator.FinishCode(code); |
432 CodeGenerator::PrintCode(code, info()); | 432 CodeGenerator::PrintCode(code, info()); |
433 return code; | 433 return code; |
434 } | 434 } |
435 return Handle<Code>::null(); | 435 return Handle<Code>::null(); |
436 } | 436 } |
437 | 437 |
438 | 438 |
439 } } // namespace v8::internal | 439 } } // namespace v8::internal |
OLD | NEW |