| OLD | NEW | 
|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 | 
| 6 | 6 | 
| 7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" | 
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" | 
| 9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" | 
| 10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" | 
| (...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1147   __ bind(&switch_to_different_code_kind); | 1147   __ bind(&switch_to_different_code_kind); | 
| 1148   __ LeaveFrame(StackFrame::JAVA_SCRIPT); | 1148   __ LeaveFrame(StackFrame::JAVA_SCRIPT); | 
| 1149   __ Ldr(x7, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset)); | 1149   __ Ldr(x7, FieldMemOperand(x1, JSFunction::kSharedFunctionInfoOffset)); | 
| 1150   __ Ldr(x7, FieldMemOperand(x7, SharedFunctionInfo::kCodeOffset)); | 1150   __ Ldr(x7, FieldMemOperand(x7, SharedFunctionInfo::kCodeOffset)); | 
| 1151   __ Add(x7, x7, Operand(Code::kHeaderSize - kHeapObjectTag)); | 1151   __ Add(x7, x7, Operand(Code::kHeaderSize - kHeapObjectTag)); | 
| 1152   __ Str(x7, FieldMemOperand(x1, JSFunction::kCodeEntryOffset)); | 1152   __ Str(x7, FieldMemOperand(x1, JSFunction::kCodeEntryOffset)); | 
| 1153   __ RecordWriteCodeEntryField(x1, x7, x5); | 1153   __ RecordWriteCodeEntryField(x1, x7, x5); | 
| 1154   __ Jump(x7); | 1154   __ Jump(x7); | 
| 1155 } | 1155 } | 
| 1156 | 1156 | 
| 1157 void Builtins::Generate_InterpreterMarkBaselineOnReturn(MacroAssembler* masm) { |  | 
| 1158   // Save the function and context for call to CompileBaseline. |  | 
| 1159   __ ldr(x1, MemOperand(fp, StandardFrameConstants::kFunctionOffset)); |  | 
| 1160   __ ldr(kContextRegister, |  | 
| 1161          MemOperand(fp, StandardFrameConstants::kContextOffset)); |  | 
| 1162 |  | 
| 1163   // Leave the frame before recompiling for baseline so that we don't count as |  | 
| 1164   // an activation on the stack. |  | 
| 1165   LeaveInterpreterFrame(masm, x2); |  | 
| 1166 |  | 
| 1167   { |  | 
| 1168     FrameScope frame_scope(masm, StackFrame::INTERNAL); |  | 
| 1169     // Push return value. |  | 
| 1170     __ push(x0); |  | 
| 1171 |  | 
| 1172     // Push function as argument and compile for baseline. |  | 
| 1173     __ push(x1); |  | 
| 1174     __ CallRuntime(Runtime::kCompileBaseline); |  | 
| 1175 |  | 
| 1176     // Restore return value. |  | 
| 1177     __ pop(x0); |  | 
| 1178   } |  | 
| 1179   __ Ret(); |  | 
| 1180 } |  | 
| 1181 |  | 
| 1182 static void Generate_StackOverflowCheck(MacroAssembler* masm, Register num_args, | 1157 static void Generate_StackOverflowCheck(MacroAssembler* masm, Register num_args, | 
| 1183                                         Register scratch, | 1158                                         Register scratch, | 
| 1184                                         Label* stack_overflow) { | 1159                                         Label* stack_overflow) { | 
| 1185   // Check the stack for overflow. | 1160   // Check the stack for overflow. | 
| 1186   // We are not trying to catch interruptions (e.g. debug break and | 1161   // We are not trying to catch interruptions (e.g. debug break and | 
| 1187   // preemption) here, so the "real stack limit" is checked. | 1162   // preemption) here, so the "real stack limit" is checked. | 
| 1188   Label enough_stack_space; | 1163   Label enough_stack_space; | 
| 1189   __ LoadRoot(scratch, Heap::kRealStackLimitRootIndex); | 1164   __ LoadRoot(scratch, Heap::kRealStackLimitRootIndex); | 
| 1190   // Make scratch the space we have left. The stack might already be overflowed | 1165   // Make scratch the space we have left. The stack might already be overflowed | 
| 1191   // here which will cause scratch to become negative. | 1166   // here which will cause scratch to become negative. | 
| (...skipping 1819 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3011     __ Unreachable(); | 2986     __ Unreachable(); | 
| 3012   } | 2987   } | 
| 3013 } | 2988 } | 
| 3014 | 2989 | 
| 3015 #undef __ | 2990 #undef __ | 
| 3016 | 2991 | 
| 3017 }  // namespace internal | 2992 }  // namespace internal | 
| 3018 }  // namespace v8 | 2993 }  // namespace v8 | 
| 3019 | 2994 | 
| 3020 #endif  // V8_TARGET_ARCH_ARM | 2995 #endif  // V8_TARGET_ARCH_ARM | 
| OLD | NEW | 
|---|