Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: src/lithium.cc

Issue 12223027: This patch is the propagation version of https://codereview.chromium.org/10824032 patch (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/full-codegen.cc ('k') | src/log.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 437
438 chunk->set_allocated_double_registers( 438 chunk->set_allocated_double_registers(
439 allocator.assigned_double_registers()); 439 allocator.assigned_double_registers());
440 440
441 return chunk; 441 return chunk;
442 } 442 }
443 443
444 444
445 Handle<Code> LChunk::Codegen(Code::Kind kind) { 445 Handle<Code> LChunk::Codegen(Code::Kind kind) {
446 MacroAssembler assembler(info()->isolate(), NULL, 0); 446 MacroAssembler assembler(info()->isolate(), NULL, 0);
447 LOG_CODE_EVENT(info()->isolate(),
448 CodeStartLinePosInfoRecordEvent(
449 assembler.positions_recorder()));
447 LCodeGen generator(this, &assembler, info()); 450 LCodeGen generator(this, &assembler, info());
448 451
449 MarkEmptyBlocks(); 452 MarkEmptyBlocks();
450 453
451 if (generator.GenerateCode()) { 454 if (generator.GenerateCode()) {
452 if (FLAG_trace_codegen) { 455 if (FLAG_trace_codegen) {
453 PrintF("Crankshaft Compiler - "); 456 PrintF("Crankshaft Compiler - ");
454 } 457 }
455 CodeGenerator::MakeCodePrologue(info()); 458 CodeGenerator::MakeCodePrologue(info());
456 Code::Flags flags = Code::ComputeFlags(kind); 459 Code::Flags flags = Code::ComputeFlags(kind);
457 Handle<Code> code = 460 Handle<Code> code =
458 CodeGenerator::MakeCodeEpilogue(&assembler, flags, info()); 461 CodeGenerator::MakeCodeEpilogue(&assembler, flags, info());
459 generator.FinishCode(code); 462 generator.FinishCode(code);
463
464 if (!code.is_null()) {
465 void* jit_handler_data =
466 assembler.positions_recorder()->DetachJITHandlerData();
467 LOG_CODE_EVENT(info()->isolate(),
468 CodeEndLinePosInfoRecordEvent(*code, jit_handler_data));
469 }
470
460 CodeGenerator::PrintCode(code, info()); 471 CodeGenerator::PrintCode(code, info());
461 return code; 472 return code;
462 } 473 }
463 return Handle<Code>::null(); 474 return Handle<Code>::null();
464 } 475 }
465 476
466 477
467 void LChunk::set_allocated_double_registers(BitVector* allocated_registers) { 478 void LChunk::set_allocated_double_registers(BitVector* allocated_registers) {
468 allocated_double_registers_ = allocated_registers; 479 allocated_double_registers_ = allocated_registers;
469 BitVector* doubles = allocated_double_registers(); 480 BitVector* doubles = allocated_double_registers();
470 BitVector::Iterator iterator(doubles); 481 BitVector::Iterator iterator(doubles);
471 while (!iterator.Done()) { 482 while (!iterator.Done()) {
472 if (info()->saves_caller_doubles()) { 483 if (info()->saves_caller_doubles()) {
473 if (kDoubleSize == kPointerSize * 2) { 484 if (kDoubleSize == kPointerSize * 2) {
474 spill_slot_count_ += 2; 485 spill_slot_count_ += 2;
475 } else { 486 } else {
476 spill_slot_count_++; 487 spill_slot_count_++;
477 } 488 }
478 } 489 }
479 iterator.Advance(); 490 iterator.Advance();
480 } 491 }
481 } 492 }
482 493
483 494
484 } } // namespace v8::internal 495 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698