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

Side by Side Diff: src/builtins/ppc/builtins-ppc.cc

Issue 2632513002: PPC/s390: [debugger] infrastructure for side-effect-free debug-evaluate. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | src/builtins/s390/builtins-s390.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #if V8_TARGET_ARCH_PPC 5 #if V8_TARGET_ARCH_PPC
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 // Store resume mode into generator object. 748 // Store resume mode into generator object.
749 __ StoreP(r5, FieldMemOperand(r4, JSGeneratorObject::kResumeModeOffset), r0); 749 __ StoreP(r5, FieldMemOperand(r4, JSGeneratorObject::kResumeModeOffset), r0);
750 750
751 // Load suspended function and context. 751 // Load suspended function and context.
752 __ LoadP(cp, FieldMemOperand(r4, JSGeneratorObject::kContextOffset)); 752 __ LoadP(cp, FieldMemOperand(r4, JSGeneratorObject::kContextOffset));
753 __ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset)); 753 __ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset));
754 754
755 // Flood function if we are stepping. 755 // Flood function if we are stepping.
756 Label prepare_step_in_if_stepping, prepare_step_in_suspended_generator; 756 Label prepare_step_in_if_stepping, prepare_step_in_suspended_generator;
757 Label stepping_prepared; 757 Label stepping_prepared;
758 ExternalReference last_step_action = 758 ExternalReference debug_hook =
759 ExternalReference::debug_last_step_action_address(masm->isolate()); 759 ExternalReference::debug_hook_on_function_call_address(masm->isolate());
760 STATIC_ASSERT(StepFrame > StepIn); 760 __ mov(ip, Operand(debug_hook));
761 __ mov(ip, Operand(last_step_action));
762 __ LoadByte(ip, MemOperand(ip), r0); 761 __ LoadByte(ip, MemOperand(ip), r0);
763 __ extsb(ip, ip); 762 __ extsb(ip, ip);
764 __ cmpi(ip, Operand(StepIn)); 763 __ CmpSmiLiteral(ip, Smi::kZero, r0);
765 __ bge(&prepare_step_in_if_stepping); 764 __ bne(&prepare_step_in_if_stepping);
766 765
767 // Flood function if we need to continue stepping in the suspended generator. 766 // Flood function if we need to continue stepping in the suspended generator.
768 767
769 ExternalReference debug_suspended_generator = 768 ExternalReference debug_suspended_generator =
770 ExternalReference::debug_suspended_generator_address(masm->isolate()); 769 ExternalReference::debug_suspended_generator_address(masm->isolate());
771 770
772 __ mov(ip, Operand(debug_suspended_generator)); 771 __ mov(ip, Operand(debug_suspended_generator));
773 __ LoadP(ip, MemOperand(ip)); 772 __ LoadP(ip, MemOperand(ip));
774 __ cmp(ip, r4); 773 __ cmp(ip, r4);
775 __ beq(&prepare_step_in_suspended_generator); 774 __ beq(&prepare_step_in_suspended_generator);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 __ mr(r6, r4); 826 __ mr(r6, r4);
828 __ mr(r4, r7); 827 __ mr(r4, r7);
829 __ LoadP(ip, FieldMemOperand(r4, JSFunction::kCodeEntryOffset)); 828 __ LoadP(ip, FieldMemOperand(r4, JSFunction::kCodeEntryOffset));
830 __ JumpToJSEntry(ip); 829 __ JumpToJSEntry(ip);
831 } 830 }
832 831
833 __ bind(&prepare_step_in_if_stepping); 832 __ bind(&prepare_step_in_if_stepping);
834 { 833 {
835 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 834 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
836 __ Push(r4, r5, r7); 835 __ Push(r4, r5, r7);
837 __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping); 836 __ CallRuntime(Runtime::kDebugOnFunctionCall);
838 __ Pop(r4, r5); 837 __ Pop(r4, r5);
839 __ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset)); 838 __ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset));
840 } 839 }
841 __ b(&stepping_prepared); 840 __ b(&stepping_prepared);
842 841
843 __ bind(&prepare_step_in_suspended_generator); 842 __ bind(&prepare_step_in_suspended_generator);
844 { 843 {
845 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); 844 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
846 __ Push(r4, r5); 845 __ Push(r4, r5);
847 __ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator); 846 __ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator);
(...skipping 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after
2972 __ CallRuntime(Runtime::kThrowStackOverflow); 2971 __ CallRuntime(Runtime::kThrowStackOverflow);
2973 __ bkpt(0); 2972 __ bkpt(0);
2974 } 2973 }
2975 } 2974 }
2976 2975
2977 #undef __ 2976 #undef __
2978 } // namespace internal 2977 } // namespace internal
2979 } // namespace v8 2978 } // namespace v8
2980 2979
2981 #endif // V8_TARGET_ARCH_PPC 2980 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | src/builtins/s390/builtins-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698