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

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

Issue 1721673003: PPC: [interpreter, debugger] support debug breaks via bytecode array copy (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | 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 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 // Open a frame scope to indicate that there is a frame on the stack. The 852 // Open a frame scope to indicate that there is a frame on the stack. The
853 // MANUAL indicates that the scope shouldn't actually generate code to set up 853 // MANUAL indicates that the scope shouldn't actually generate code to set up
854 // the frame (that is done below). 854 // the frame (that is done below).
855 FrameScope frame_scope(masm, StackFrame::MANUAL); 855 FrameScope frame_scope(masm, StackFrame::MANUAL);
856 __ PushFixedFrame(r4); 856 __ PushFixedFrame(r4);
857 __ addi(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); 857 __ addi(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
858 858
859 // Get the bytecode array from the function object and load the pointer to the 859 // Get the bytecode array from the function object and load the pointer to the
860 // first entry into kInterpreterBytecodeRegister. 860 // first entry into kInterpreterBytecodeRegister.
861 __ LoadP(r3, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); 861 __ LoadP(r3, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset));
862 Label array_done;
863 Register debug_info = r5;
864 DCHECK(!debug_info.is(r3));
865 __ LoadP(debug_info,
866 FieldMemOperand(r3, SharedFunctionInfo::kDebugInfoOffset));
867 // Load original bytecode array or the debug copy.
862 __ LoadP(kInterpreterBytecodeArrayRegister, 868 __ LoadP(kInterpreterBytecodeArrayRegister,
863 FieldMemOperand(r3, SharedFunctionInfo::kFunctionDataOffset)); 869 FieldMemOperand(r3, SharedFunctionInfo::kFunctionDataOffset));
870 __ CmpSmiLiteral(debug_info, DebugInfo::uninitialized(), r0);
871 __ beq(&array_done);
872 __ LoadP(kInterpreterBytecodeArrayRegister,
873 FieldMemOperand(debug_info, DebugInfo::kAbstractCodeIndex));
874 __ bind(&array_done);
864 875
865 if (FLAG_debug_code) { 876 if (FLAG_debug_code) {
866 // Check function data field is actually a BytecodeArray object. 877 // Check function data field is actually a BytecodeArray object.
867 __ TestIfSmi(kInterpreterBytecodeArrayRegister, r0); 878 __ TestIfSmi(kInterpreterBytecodeArrayRegister, r0);
868 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); 879 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry);
869 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r3, no_reg, 880 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r3, no_reg,
870 BYTECODE_ARRAY_TYPE); 881 BYTECODE_ARRAY_TYPE);
871 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); 882 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry);
872 } 883 }
873 884
(...skipping 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after
2638 __ bkpt(0); 2649 __ bkpt(0);
2639 } 2650 }
2640 } 2651 }
2641 2652
2642 2653
2643 #undef __ 2654 #undef __
2644 } // namespace internal 2655 } // namespace internal
2645 } // namespace v8 2656 } // namespace v8
2646 2657
2647 #endif // V8_TARGET_ARCH_PPC 2658 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698