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

Side by Side Diff: src/full-codegen.cc

Issue 1229673005: Debugger: record reloc info for debug break slot immediate before the slot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix typo Created 5 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/debug.cc ('k') | src/ia32/debug-ia32.cc » ('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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 RecordStatementPosition(masm_, fun->end_position() - 1); 426 RecordStatementPosition(masm_, fun->end_position() - 1);
427 } 427 }
428 428
429 429
430 void FullCodeGenerator::SetStatementPosition( 430 void FullCodeGenerator::SetStatementPosition(
431 Statement* stmt, FullCodeGenerator::InsertBreak insert_break) { 431 Statement* stmt, FullCodeGenerator::InsertBreak insert_break) {
432 if (stmt->position() == RelocInfo::kNoPosition) return; 432 if (stmt->position() == RelocInfo::kNoPosition) return;
433 bool recorded = RecordStatementPosition(masm_, stmt->position()); 433 bool recorded = RecordStatementPosition(masm_, stmt->position());
434 if (recorded && insert_break == INSERT_BREAK && info_->is_debug() && 434 if (recorded && insert_break == INSERT_BREAK && info_->is_debug() &&
435 !stmt->IsDebuggerStatement()) { 435 !stmt->IsDebuggerStatement()) {
436 masm_->RecordDebugBreakSlot(); 436 DebugCodegen::GenerateSlot(masm_, DebugCodegen::PLAIN_DEBUG_BREAK);
437 DebugCodegen::GenerateSlot(masm_);
438 } 437 }
439 } 438 }
440 439
441 440
442 void FullCodeGenerator::SetExpressionPosition( 441 void FullCodeGenerator::SetExpressionPosition(
443 Expression* expr, FullCodeGenerator::InsertBreak insert_break) { 442 Expression* expr, FullCodeGenerator::InsertBreak insert_break) {
444 if (expr->position() == RelocInfo::kNoPosition) return; 443 if (expr->position() == RelocInfo::kNoPosition) return;
445 bool recorded = RecordPosition(masm_, expr->position()); 444 bool recorded = RecordPosition(masm_, expr->position());
446 if (recorded && insert_break == INSERT_BREAK && info_->is_debug()) { 445 if (recorded && insert_break == INSERT_BREAK && info_->is_debug()) {
447 masm_->RecordDebugBreakSlot(); 446 DebugCodegen::GenerateSlot(masm_, DebugCodegen::PLAIN_DEBUG_BREAK);
448 DebugCodegen::GenerateSlot(masm_);
449 } 447 }
450 } 448 }
451 449
452 450
453 void FullCodeGenerator::SetExpressionAsStatementPosition(Expression* expr) { 451 void FullCodeGenerator::SetExpressionAsStatementPosition(Expression* expr) {
454 if (expr->position() == RelocInfo::kNoPosition) return; 452 if (expr->position() == RelocInfo::kNoPosition) return;
455 bool recorded = RecordStatementPosition(masm_, expr->position()); 453 bool recorded = RecordStatementPosition(masm_, expr->position());
456 if (recorded && info_->is_debug()) { 454 if (recorded && info_->is_debug()) {
457 masm_->RecordDebugBreakSlot(); 455 DebugCodegen::GenerateSlot(masm_, DebugCodegen::PLAIN_DEBUG_BREAK);
458 DebugCodegen::GenerateSlot(masm_);
459 } 456 }
460 } 457 }
461 458
462 459
463 void FullCodeGenerator::SetCallPosition(Expression* expr, int argc) { 460 void FullCodeGenerator::SetCallPosition(Expression* expr, int argc) {
464 if (expr->position() == RelocInfo::kNoPosition) return; 461 if (expr->position() == RelocInfo::kNoPosition) return;
465 RecordPosition(masm_, expr->position()); 462 RecordPosition(masm_, expr->position());
466 if (info_->is_debug()) { 463 if (info_->is_debug()) {
467 // Always emit a debug break slot before a call. 464 // Always emit a debug break slot before a call.
468 masm_->RecordDebugBreakSlotForCall(argc); 465 DebugCodegen::GenerateSlot(masm_, DebugCodegen::DEBUG_BREAK_AT_CALL, argc);
469 DebugCodegen::GenerateSlot(masm_);
470 } 466 }
471 } 467 }
472 468
473 469
474 void FullCodeGenerator::SetConstructCallPosition(Expression* expr) { 470 void FullCodeGenerator::SetConstructCallPosition(Expression* expr) {
475 if (expr->position() == RelocInfo::kNoPosition) return; 471 if (expr->position() == RelocInfo::kNoPosition) return;
476 RecordPosition(masm_, expr->position()); 472 RecordPosition(masm_, expr->position());
477 if (info_->is_debug()) { 473 if (info_->is_debug()) {
478 // Always emit a debug break slot before a construct call. 474 // Always emit a debug break slot before a construct call.
479 masm_->RecordDebugBreakSlotForConstructCall(); 475 DebugCodegen::GenerateSlot(masm_,
480 DebugCodegen::GenerateSlot(masm_); 476 DebugCodegen::DEBUG_BREAK_AT_CONSTRUCT_CALL);
481 } 477 }
482 } 478 }
483 479
484 480
485 void FullCodeGenerator::VisitSuperPropertyReference( 481 void FullCodeGenerator::VisitSuperPropertyReference(
486 SuperPropertyReference* super) { 482 SuperPropertyReference* super) {
487 __ CallRuntime(Runtime::kThrowUnsupportedSuperError, 0); 483 __ CallRuntime(Runtime::kThrowUnsupportedSuperError, 0);
488 } 484 }
489 485
490 486
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); 1468 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS);
1473 codegen_->scope_ = saved_scope_; 1469 codegen_->scope_ = saved_scope_;
1474 } 1470 }
1475 1471
1476 1472
1477 #undef __ 1473 #undef __
1478 1474
1479 1475
1480 } // namespace internal 1476 } // namespace internal
1481 } // namespace v8 1477 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | src/ia32/debug-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698