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

Side by Side Diff: src/codegen.cc

Issue 2693002: More precise break points and stepping when debugging... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 6 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/checks.h ('k') | src/d8.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 if (lit->IsTrue()) { 408 if (lit->IsTrue()) {
409 return ALWAYS_TRUE; 409 return ALWAYS_TRUE;
410 } else if (lit->IsFalse()) { 410 } else if (lit->IsFalse()) {
411 return ALWAYS_FALSE; 411 return ALWAYS_FALSE;
412 } 412 }
413 413
414 return DONT_KNOW; 414 return DONT_KNOW;
415 } 415 }
416 416
417 417
418 void CodeGenerator::RecordPositions(MacroAssembler* masm, int pos) { 418 bool CodeGenerator::RecordPositions(MacroAssembler* masm,
419 int pos,
420 bool right_here) {
419 if (pos != RelocInfo::kNoPosition) { 421 if (pos != RelocInfo::kNoPosition) {
420 masm->RecordStatementPosition(pos); 422 masm->RecordStatementPosition(pos);
421 masm->RecordPosition(pos); 423 masm->RecordPosition(pos);
424 if (right_here) {
425 return masm->WriteRecordedPositions();
426 }
422 } 427 }
428 return false;
423 } 429 }
424 430
425 431
426 void CodeGenerator::CodeForFunctionPosition(FunctionLiteral* fun) { 432 void CodeGenerator::CodeForFunctionPosition(FunctionLiteral* fun) {
427 if (FLAG_debug_info) RecordPositions(masm(), fun->start_position()); 433 if (FLAG_debug_info) RecordPositions(masm(), fun->start_position(), false);
428 } 434 }
429 435
430 436
431 void CodeGenerator::CodeForReturnPosition(FunctionLiteral* fun) { 437 void CodeGenerator::CodeForReturnPosition(FunctionLiteral* fun) {
432 if (FLAG_debug_info) RecordPositions(masm(), fun->end_position()); 438 if (FLAG_debug_info) RecordPositions(masm(), fun->end_position(), false);
433 } 439 }
434 440
435 441
436 void CodeGenerator::CodeForStatementPosition(Statement* stmt) { 442 void CodeGenerator::CodeForStatementPosition(Statement* stmt) {
437 if (FLAG_debug_info) RecordPositions(masm(), stmt->statement_pos()); 443 if (FLAG_debug_info) RecordPositions(masm(), stmt->statement_pos(), false);
438 } 444 }
439 445
446
440 void CodeGenerator::CodeForDoWhileConditionPosition(DoWhileStatement* stmt) { 447 void CodeGenerator::CodeForDoWhileConditionPosition(DoWhileStatement* stmt) {
441 if (FLAG_debug_info) RecordPositions(masm(), stmt->condition_position()); 448 if (FLAG_debug_info)
449 RecordPositions(masm(), stmt->condition_position(), false);
442 } 450 }
443 451
452
444 void CodeGenerator::CodeForSourcePosition(int pos) { 453 void CodeGenerator::CodeForSourcePosition(int pos) {
445 if (FLAG_debug_info && pos != RelocInfo::kNoPosition) { 454 if (FLAG_debug_info && pos != RelocInfo::kNoPosition) {
446 masm()->RecordPosition(pos); 455 masm()->RecordPosition(pos);
447 } 456 }
448 } 457 }
449 458
450 459
451 const char* GenericUnaryOpStub::GetName() { 460 const char* GenericUnaryOpStub::GetName() {
452 switch (op_) { 461 switch (op_) {
453 case Token::SUB: 462 case Token::SUB:
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 } 503 }
495 } 504 }
496 505
497 506
498 void ApiGetterEntryStub::SetCustomCache(Code* value) { 507 void ApiGetterEntryStub::SetCustomCache(Code* value) {
499 info()->set_load_stub_cache(value); 508 info()->set_load_stub_cache(value);
500 } 509 }
501 510
502 511
503 } } // namespace v8::internal 512 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/checks.h ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698