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

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

Issue 2927813004: PPC/s390: [debug] Untangle DebugInfo from break point support (Closed)
Patch Set: Created 3 years, 6 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 | « src/builtins/ppc/builtins-ppc.cc ('k') | 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_S390 5 #if V8_TARGET_ARCH_S390
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 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 __ LoadP( 1071 __ LoadP(
1072 optimized_code_entry, 1072 optimized_code_entry,
1073 FieldMemOperand(r2, FeedbackVector::kOptimizedCodeIndex * kPointerSize + 1073 FieldMemOperand(r2, FeedbackVector::kOptimizedCodeIndex * kPointerSize +
1074 FeedbackVector::kHeaderSize)); 1074 FeedbackVector::kHeaderSize));
1075 __ LoadP(optimized_code_entry, 1075 __ LoadP(optimized_code_entry,
1076 FieldMemOperand(optimized_code_entry, WeakCell::kValueOffset)); 1076 FieldMemOperand(optimized_code_entry, WeakCell::kValueOffset));
1077 __ JumpIfNotSmi(optimized_code_entry, &switch_to_optimized_code); 1077 __ JumpIfNotSmi(optimized_code_entry, &switch_to_optimized_code);
1078 1078
1079 // Get the bytecode array from the function object (or from the DebugInfo if 1079 // Get the bytecode array from the function object (or from the DebugInfo if
1080 // it is present) and load it into kInterpreterBytecodeArrayRegister. 1080 // it is present) and load it into kInterpreterBytecodeArrayRegister.
1081 Label maybe_load_debug_bytecode_array, bytecode_array_loaded;
1081 __ LoadP(r2, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset)); 1082 __ LoadP(r2, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset));
1082 Label array_done;
1083 Register debug_info = r4;
1084 DCHECK(!debug_info.is(r2));
1085 __ LoadP(debug_info,
1086 FieldMemOperand(r2, SharedFunctionInfo::kDebugInfoOffset));
1087 // Load original bytecode array or the debug copy. 1083 // Load original bytecode array or the debug copy.
1088 __ LoadP(kInterpreterBytecodeArrayRegister, 1084 __ LoadP(kInterpreterBytecodeArrayRegister,
1089 FieldMemOperand(r2, SharedFunctionInfo::kFunctionDataOffset)); 1085 FieldMemOperand(r2, SharedFunctionInfo::kFunctionDataOffset));
1090 __ TestIfSmi(debug_info); 1086 __ LoadP(r4, FieldMemOperand(r2, SharedFunctionInfo::kDebugInfoOffset));
1091 __ beq(&array_done); 1087
1092 __ LoadP(kInterpreterBytecodeArrayRegister, 1088 __ TestIfSmi(r4);
1093 FieldMemOperand(debug_info, DebugInfo::kDebugBytecodeArrayOffset)); 1089 __ bne(&maybe_load_debug_bytecode_array);
1094 __ bind(&array_done); 1090 __ bind(&bytecode_array_loaded);
1095 1091
1096 // Check whether we should continue to use the interpreter. 1092 // Check whether we should continue to use the interpreter.
1097 // TODO(rmcilroy) Remove self healing once liveedit only has to deal with 1093 // TODO(rmcilroy) Remove self healing once liveedit only has to deal with
1098 // Ignition bytecode. 1094 // Ignition bytecode.
1099 Label switch_to_different_code_kind; 1095 Label switch_to_different_code_kind;
1100 __ LoadP(r2, FieldMemOperand(r2, SharedFunctionInfo::kCodeOffset)); 1096 __ LoadP(r2, FieldMemOperand(r2, SharedFunctionInfo::kCodeOffset));
1101 __ CmpP(r2, Operand(masm->CodeObject())); // Self-reference to this code. 1097 __ CmpP(r2, Operand(masm->CodeObject())); // Self-reference to this code.
1102 __ bne(&switch_to_different_code_kind); 1098 __ bne(&switch_to_different_code_kind);
1103 1099
1104 // Increment invocation count for the function. 1100 // Increment invocation count for the function.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 __ ShiftLeftP(ip, r3, Operand(kPointerSizeLog2)); 1173 __ ShiftLeftP(ip, r3, Operand(kPointerSizeLog2));
1178 __ LoadP(ip, MemOperand(kInterpreterDispatchTableRegister, ip)); 1174 __ LoadP(ip, MemOperand(kInterpreterDispatchTableRegister, ip));
1179 __ Call(ip); 1175 __ Call(ip);
1180 1176
1181 masm->isolate()->heap()->SetInterpreterEntryReturnPCOffset(masm->pc_offset()); 1177 masm->isolate()->heap()->SetInterpreterEntryReturnPCOffset(masm->pc_offset());
1182 1178
1183 // The return value is in r2. 1179 // The return value is in r2.
1184 LeaveInterpreterFrame(masm, r4); 1180 LeaveInterpreterFrame(masm, r4);
1185 __ Ret(); 1181 __ Ret();
1186 1182
1183 // Load debug copy of the bytecode array if it exists.
1184 // kInterpreterBytecodeArrayRegister is already loaded with
1185 // SharedFunctionInfo::kFunctionDataOffset.
1186 Label done;
1187 __ bind(&maybe_load_debug_bytecode_array);
1188 __ LoadP(ip, FieldMemOperand(r4, DebugInfo::kFlagsOffset));
1189 __ SmiUntag(ip);
1190 __ tmll(ip, Operand(DebugInfo::kHasBreakInfo));
1191 __ beq(&done);
1192 __ LoadP(kInterpreterBytecodeArrayRegister,
1193 FieldMemOperand(r4, DebugInfo::kDebugBytecodeArrayOffset));
1194 __ bind(&done);
1195 __ b(&bytecode_array_loaded);
1196
1187 // If the shared code is no longer this entry trampoline, then the underlying 1197 // If the shared code is no longer this entry trampoline, then the underlying
1188 // function has been switched to a different kind of code and we heal the 1198 // function has been switched to a different kind of code and we heal the
1189 // closure by switching the code entry field over to the new code as well. 1199 // closure by switching the code entry field over to the new code as well.
1190 __ bind(&switch_to_different_code_kind); 1200 __ bind(&switch_to_different_code_kind);
1191 __ LeaveFrame(StackFrame::JAVA_SCRIPT); 1201 __ LeaveFrame(StackFrame::JAVA_SCRIPT);
1192 __ LoadP(r6, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset)); 1202 __ LoadP(r6, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset));
1193 __ LoadP(r6, FieldMemOperand(r6, SharedFunctionInfo::kCodeOffset)); 1203 __ LoadP(r6, FieldMemOperand(r6, SharedFunctionInfo::kCodeOffset));
1194 __ AddP(r6, r6, Operand(Code::kHeaderSize - kHeapObjectTag)); 1204 __ AddP(r6, r6, Operand(Code::kHeaderSize - kHeapObjectTag));
1195 __ StoreP(r6, FieldMemOperand(r3, JSFunction::kCodeEntryOffset), r0); 1205 __ StoreP(r6, FieldMemOperand(r3, JSFunction::kCodeEntryOffset), r0);
1196 __ RecordWriteCodeEntryField(r3, r6, r7); 1206 __ RecordWriteCodeEntryField(r3, r6, r7);
(...skipping 1983 matching lines...) Expand 10 before | Expand all | Expand 10 after
3180 // Now jump to the instructions of the returned code object. 3190 // Now jump to the instructions of the returned code object.
3181 __ Jump(ip); 3191 __ Jump(ip);
3182 } 3192 }
3183 3193
3184 #undef __ 3194 #undef __
3185 3195
3186 } // namespace internal 3196 } // namespace internal
3187 } // namespace v8 3197 } // namespace v8
3188 3198
3189 #endif // V8_TARGET_ARCH_S390 3199 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/builtins/ppc/builtins-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698