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

Side by Side Diff: src/debug.cc

Issue 6850015: Remove support for inlined property loads and stores. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 8 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/arm/ic-arm.cc ('k') | src/ia32/full-codegen-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 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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 470
471 RelocInfo::Mode mode = rmode(); 471 RelocInfo::Mode mode = rmode();
472 if (RelocInfo::IsCodeTarget(mode)) { 472 if (RelocInfo::IsCodeTarget(mode)) {
473 Address target = rinfo()->target_address(); 473 Address target = rinfo()->target_address();
474 Handle<Code> code(Code::GetCodeFromTargetAddress(target)); 474 Handle<Code> code(Code::GetCodeFromTargetAddress(target));
475 475
476 // Patch the code to invoke the builtin debug break function matching the 476 // Patch the code to invoke the builtin debug break function matching the
477 // calling convention used by the call site. 477 // calling convention used by the call site.
478 Handle<Code> dbgbrk_code(Debug::FindDebugBreak(code, mode)); 478 Handle<Code> dbgbrk_code(Debug::FindDebugBreak(code, mode));
479 rinfo()->set_target_address(dbgbrk_code->entry()); 479 rinfo()->set_target_address(dbgbrk_code->entry());
480
481 // For stubs that refer back to an inlined version clear the cached map for
482 // the inlined case to always go through the IC. As long as the break point
483 // is set the patching performed by the runtime system will take place in
484 // the code copy and will therefore have no effect on the running code
485 // keeping it from using the inlined code.
486 if (code->is_keyed_load_stub()) {
487 KeyedLoadIC::ClearInlinedVersion(pc());
488 } else if (code->is_keyed_store_stub()) {
489 KeyedStoreIC::ClearInlinedVersion(pc());
490 } else if (code->is_load_stub()) {
491 LoadIC::ClearInlinedVersion(pc());
492 } else if (code->is_store_stub()) {
493 StoreIC::ClearInlinedVersion(pc());
494 }
495 } 480 }
496 } 481 }
497 482
498 483
499 void BreakLocationIterator::ClearDebugBreakAtIC() { 484 void BreakLocationIterator::ClearDebugBreakAtIC() {
500 // Patch the code to the original invoke. 485 // Patch the code to the original invoke.
501 rinfo()->set_target_address(original_rinfo()->target_address()); 486 rinfo()->set_target_address(original_rinfo()->target_address());
502
503 RelocInfo::Mode mode = rmode();
504 if (RelocInfo::IsCodeTarget(mode)) {
505 AssertNoAllocation nogc;
506 Address target = original_rinfo()->target_address();
507 Code* code = Code::GetCodeFromTargetAddress(target);
508
509 // Restore the inlined version of keyed stores to get back to the
510 // fast case. We need to patch back the keyed store because no
511 // patching happens when running normally. For keyed loads, the
512 // map check will get patched back when running normally after ICs
513 // have been cleared at GC.
514 if (code->is_keyed_store_stub()) KeyedStoreIC::RestoreInlinedVersion(pc());
515 }
516 } 487 }
517 488
518 489
519 bool BreakLocationIterator::IsDebuggerStatement() { 490 bool BreakLocationIterator::IsDebuggerStatement() {
520 return RelocInfo::DEBUG_BREAK == rmode(); 491 return RelocInfo::DEBUG_BREAK == rmode();
521 } 492 }
522 493
523 494
524 bool BreakLocationIterator::IsDebugBreakSlot() { 495 bool BreakLocationIterator::IsDebugBreakSlot() {
525 return RelocInfo::DEBUG_BREAK_SLOT == rmode(); 496 return RelocInfo::DEBUG_BREAK_SLOT == rmode();
(...skipping 2653 matching lines...) Expand 10 before | Expand all | Expand 10 after
3179 { 3150 {
3180 Locker locker; 3151 Locker locker;
3181 Isolate::Current()->debugger()->CallMessageDispatchHandler(); 3152 Isolate::Current()->debugger()->CallMessageDispatchHandler();
3182 } 3153 }
3183 } 3154 }
3184 } 3155 }
3185 3156
3186 #endif // ENABLE_DEBUGGER_SUPPORT 3157 #endif // ENABLE_DEBUGGER_SUPPORT
3187 3158
3188 } } // namespace v8::internal 3159 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698