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

Side by Side Diff: src/crankshaft/lithium.cc

Issue 2101523003: Use source position table for crankshaft code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@sourcepos
Patch Set: rebase Created 4 years, 5 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
« no previous file with comments | « src/crankshaft/ia32/lithium-codegen-ia32.cc ('k') | src/crankshaft/lithium-codegen.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/crankshaft/lithium.h" 5 #include "src/crankshaft/lithium.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 8
9 #if V8_TARGET_ARCH_IA32 9 #if V8_TARGET_ARCH_IA32
10 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT 10 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 chunk->set_allocated_double_registers( 441 chunk->set_allocated_double_registers(
442 allocator.assigned_double_registers()); 442 allocator.assigned_double_registers());
443 443
444 return chunk; 444 return chunk;
445 } 445 }
446 446
447 447
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 CodeObjectRequired::kYes); 450 CodeObjectRequired::kYes);
451 LOG_CODE_EVENT(info()->isolate(),
452 CodeStartLinePosInfoRecordEvent(
453 assembler.positions_recorder()));
454 // Code serializer only takes unoptimized code. 451 // Code serializer only takes unoptimized code.
455 DCHECK(!info()->will_serialize()); 452 DCHECK(!info()->will_serialize());
456 LCodeGen generator(this, &assembler, info()); 453 LCodeGen generator(this, &assembler, info());
457 454
455 LOG_CODE_EVENT(info()->isolate(),
456 CodeStartLinePosInfoRecordEvent(
457 generator.source_position_table_builder()));
458
458 MarkEmptyBlocks(); 459 MarkEmptyBlocks();
459 460
460 if (generator.GenerateCode()) { 461 if (generator.GenerateCode()) {
461 generator.CheckEnvironmentUsage(); 462 generator.CheckEnvironmentUsage();
462 CodeGenerator::MakeCodePrologue(info(), "optimized"); 463 CodeGenerator::MakeCodePrologue(info(), "optimized");
463 Handle<Code> code = CodeGenerator::MakeCodeEpilogue(&assembler, info()); 464 Handle<Code> code = CodeGenerator::MakeCodeEpilogue(&assembler, info());
464 generator.FinishCode(code); 465 generator.FinishCode(code);
465 CommitDependencies(code); 466 CommitDependencies(code);
466 code->set_is_crankshafted(true); 467 code->set_is_crankshafted(true);
467 void* jit_handler_data = 468 void* jit_handler_data =
468 assembler.positions_recorder()->DetachJITHandlerData(); 469 generator.source_position_table_builder()->DetachJITHandlerData();
469 LOG_CODE_EVENT(info()->isolate(), 470 LOG_CODE_EVENT(info()->isolate(),
470 CodeEndLinePosInfoRecordEvent(AbstractCode::cast(*code), 471 CodeEndLinePosInfoRecordEvent(AbstractCode::cast(*code),
471 jit_handler_data)); 472 jit_handler_data));
472 473
473 CodeGenerator::PrintCode(code, info()); 474 CodeGenerator::PrintCode(code, info());
474 DCHECK(!(info()->GetMustNotHaveEagerFrame() && 475 DCHECK(!(info()->GetMustNotHaveEagerFrame() &&
475 generator.NeedsEagerFrame())); 476 generator.NeedsEagerFrame()));
476 return code; 477 return code;
477 } 478 }
478 assembler.AbortedCodeGeneration(); 479 assembler.AbortedCodeGeneration();
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 726
726 LPhase::~LPhase() { 727 LPhase::~LPhase() {
727 if (ShouldProduceTraceOutput()) { 728 if (ShouldProduceTraceOutput()) {
728 isolate()->GetHTracer()->TraceLithium(name(), chunk_); 729 isolate()->GetHTracer()->TraceLithium(name(), chunk_);
729 } 730 }
730 } 731 }
731 732
732 733
733 } // namespace internal 734 } // namespace internal
734 } // namespace v8 735 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-codegen-ia32.cc ('k') | src/crankshaft/lithium-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698