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

Side by Side Diff: src/debug.cc

Issue 543207: Removing redundant stub for runtime native calls. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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/debug.h ('k') | src/disassembler.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 static Handle<Code> ComputeCallDebugPrepareStepIn(int argc) { 69 static Handle<Code> ComputeCallDebugPrepareStepIn(int argc) {
70 CALL_HEAP_FUNCTION(StubCache::ComputeCallDebugPrepareStepIn(argc), Code); 70 CALL_HEAP_FUNCTION(StubCache::ComputeCallDebugPrepareStepIn(argc), Code);
71 } 71 }
72 72
73 73
74 BreakLocationIterator::BreakLocationIterator(Handle<DebugInfo> debug_info, 74 BreakLocationIterator::BreakLocationIterator(Handle<DebugInfo> debug_info,
75 BreakLocatorType type) { 75 BreakLocatorType type) {
76 debug_info_ = debug_info; 76 debug_info_ = debug_info;
77 type_ = type; 77 type_ = type;
78 // Get the stub early to avoid possible GC during iterations. We may need
79 // this stub to detect debugger calls generated from debugger statements.
80 debug_break_stub_ = RuntimeStub(Runtime::kDebugBreak, 0).GetCode();
81 reloc_iterator_ = NULL; 78 reloc_iterator_ = NULL;
82 reloc_iterator_original_ = NULL; 79 reloc_iterator_original_ = NULL;
83 Reset(); // Initialize the rest of the member variables. 80 Reset(); // Initialize the rest of the member variables.
84 } 81 }
85 82
86 83
87 BreakLocationIterator::~BreakLocationIterator() { 84 BreakLocationIterator::~BreakLocationIterator() {
88 ASSERT(reloc_iterator_ != NULL); 85 ASSERT(reloc_iterator_ != NULL);
89 ASSERT(reloc_iterator_original_ != NULL); 86 ASSERT(reloc_iterator_original_ != NULL);
90 delete reloc_iterator_; 87 delete reloc_iterator_;
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 } 451 }
455 } 452 }
456 453
457 454
458 bool BreakLocationIterator::IsDebuggerStatement() { 455 bool BreakLocationIterator::IsDebuggerStatement() {
459 if (RelocInfo::IsCodeTarget(rmode())) { 456 if (RelocInfo::IsCodeTarget(rmode())) {
460 Address target = original_rinfo()->target_address(); 457 Address target = original_rinfo()->target_address();
461 Code* code = Code::GetCodeFromTargetAddress(target); 458 Code* code = Code::GetCodeFromTargetAddress(target);
462 if (code->kind() == Code::STUB) { 459 if (code->kind() == Code::STUB) {
463 CodeStub::Major major_key = code->major_key(); 460 CodeStub::Major major_key = code->major_key();
464 if (major_key == CodeStub::Runtime) { 461 return (major_key == CodeStub::DebuggerStatement);
465 return (*debug_break_stub_ == code);
466 }
467 } 462 }
468 } 463 }
469 return false; 464 return false;
470 } 465 }
471 466
472 467
473 Object* BreakLocationIterator::BreakPointObjects() { 468 Object* BreakLocationIterator::BreakPointObjects() {
474 return debug_info_->GetBreakPointObjects(code_position()); 469 return debug_info_->GetBreakPointObjects(code_position());
475 } 470 }
476 471
(...skipping 2322 matching lines...) Expand 10 before | Expand all | Expand 10 after
2799 { 2794 {
2800 Locker locker; 2795 Locker locker;
2801 Debugger::CallMessageDispatchHandler(); 2796 Debugger::CallMessageDispatchHandler();
2802 } 2797 }
2803 } 2798 }
2804 } 2799 }
2805 2800
2806 #endif // ENABLE_DEBUGGER_SUPPORT 2801 #endif // ENABLE_DEBUGGER_SUPPORT
2807 2802
2808 } } // namespace v8::internal 2803 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/debug.h ('k') | src/disassembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698