Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 375 // calling convention used by the call site. | 375 // calling convention used by the call site. |
| 376 Handle<Code> dbgbrk_code(Debug::FindDebugBreak(code, mode)); | 376 Handle<Code> dbgbrk_code(Debug::FindDebugBreak(code, mode)); |
| 377 rinfo()->set_target_address(dbgbrk_code->entry()); | 377 rinfo()->set_target_address(dbgbrk_code->entry()); |
| 378 | 378 |
| 379 // For stubs that refer back to an inlined version clear the cached map for | 379 // For stubs that refer back to an inlined version clear the cached map for |
| 380 // the inlined case to always go through the IC. As long as the break point | 380 // the inlined case to always go through the IC. As long as the break point |
| 381 // is set the patching performed by the runtime system will take place in | 381 // is set the patching performed by the runtime system will take place in |
| 382 // the code copy and will therefore have no effect on the running code | 382 // the code copy and will therefore have no effect on the running code |
| 383 // keeping it from using the inlined code. | 383 // keeping it from using the inlined code. |
| 384 if (code->is_keyed_load_stub()) KeyedLoadIC::ClearInlinedVersion(pc()); | 384 if (code->is_keyed_load_stub()) KeyedLoadIC::ClearInlinedVersion(pc()); |
| 385 if (code->is_keyed_store_stub()) KeyedStoreIC::ClearInlinedVersion(pc()); | |
| 385 } | 386 } |
| 386 } | 387 } |
| 387 | 388 |
| 388 | 389 |
| 389 void BreakLocationIterator::ClearDebugBreakAtIC() { | 390 void BreakLocationIterator::ClearDebugBreakAtIC() { |
| 390 // Patch the code to the original invoke. | 391 // Patch the code to the original invoke. |
| 391 rinfo()->set_target_address(original_rinfo()->target_address()); | 392 rinfo()->set_target_address(original_rinfo()->target_address()); |
| 393 | |
| 394 RelocInfo::Mode mode = rmode(); | |
| 395 if (RelocInfo::IsCodeTarget(mode)) { | |
| 396 Address target = original_rinfo()->target_address(); | |
| 397 Handle<Code> code(Code::GetCodeFromTargetAddress(target)); | |
| 398 | |
| 399 // Restore the inlined version of keyed stores to get back to the | |
| 400 // fast case. | |
| 401 if (code->is_keyed_store_stub()) KeyedStoreIC::RestoreInlinedVersion(pc()); | |
| 402 } | |
|
Søren Thygesen Gjesse
2009/06/12 11:15:29
Maybe add a comment saying why this is not require
| |
| 392 } | 403 } |
| 393 | 404 |
| 394 | 405 |
| 395 Object* BreakLocationIterator::BreakPointObjects() { | 406 Object* BreakLocationIterator::BreakPointObjects() { |
| 396 return debug_info_->GetBreakPointObjects(code_position()); | 407 return debug_info_->GetBreakPointObjects(code_position()); |
| 397 } | 408 } |
| 398 | 409 |
| 399 | 410 |
| 400 // Clear out all the debug break code. This is ONLY supposed to be used when | 411 // Clear out all the debug break code. This is ONLY supposed to be used when |
| 401 // shutting down the debugger as it will leave the break point information in | 412 // shutting down the debugger as it will leave the break point information in |
| (...skipping 2132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2534 | 2545 |
| 2535 | 2546 |
| 2536 void LockingCommandMessageQueue::Clear() { | 2547 void LockingCommandMessageQueue::Clear() { |
| 2537 ScopedLock sl(lock_); | 2548 ScopedLock sl(lock_); |
| 2538 queue_.Clear(); | 2549 queue_.Clear(); |
| 2539 } | 2550 } |
| 2540 | 2551 |
| 2541 #endif // ENABLE_DEBUGGER_SUPPORT | 2552 #endif // ENABLE_DEBUGGER_SUPPORT |
| 2542 | 2553 |
| 2543 } } // namespace v8::internal | 2554 } } // namespace v8::internal |
| OLD | NEW |