blob: c569e6615b097b5f5b84a0a9c0294b687844cab8 [file] [log] [blame]
Ben Murdoch3ef787d2012-04-12 10:51:47 +01001// Copyright 2012 the V8 project authors. All rights reserved.
Ben Murdochb8a8cc12014-11-26 15:28:44 +00002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
Ben Murdochb0fe1622011-05-05 13:52:32 +01004
Ben Murdochb8a8cc12014-11-26 15:28:44 +00005#include "src/codegen.h"
6#include "src/deoptimizer.h"
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00007#include "src/full-codegen/full-codegen.h"
8#include "src/register-configuration.h"
Ben Murdochb8a8cc12014-11-26 15:28:44 +00009#include "src/safepoint-table.h"
Ben Murdochb0fe1622011-05-05 13:52:32 +010010
11namespace v8 {
12namespace internal {
13
Ben Murdochb8a8cc12014-11-26 15:28:44 +000014const int Deoptimizer::table_entry_size_ = 8;
Ben Murdochb0fe1622011-05-05 13:52:32 +010015
Steve Block1e0659c2011-05-24 12:43:12 +010016
17int Deoptimizer::patch_size() {
18 const int kCallInstructionSizeInWords = 3;
19 return kCallInstructionSizeInWords * Assembler::kInstrSize;
20}
21
22
Emily Bernierd0a1eb72015-03-24 16:35:39 -040023void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code) {
24 // Empty because there is no need for relocation information for the code
25 // patching in Deoptimizer::PatchCodeForDeoptimization below.
26}
27
28
Ben Murdochb8a8cc12014-11-26 15:28:44 +000029void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) {
Ben Murdoch2b4ba112012-01-20 14:57:15 +000030 Address code_start_address = code->instruction_start();
Ben Murdochb0fe1622011-05-05 13:52:32 +010031 // Invalidate the relocation information, as it will become invalid by the
32 // code patching below, and is not needed any more.
33 code->InvalidateRelocation();
34
Ben Murdochb8a8cc12014-11-26 15:28:44 +000035 if (FLAG_zap_code_space) {
36 // Fail hard and early if we enter this code object again.
37 byte* pointer = code->FindCodeAgeSequence();
38 if (pointer != NULL) {
39 pointer += kNoCodeAgeSequenceLength;
40 } else {
41 pointer = code->instruction_start();
42 }
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000043 CodePatcher patcher(isolate, pointer, 1);
Ben Murdochb8a8cc12014-11-26 15:28:44 +000044 patcher.masm()->bkpt(0);
45
46 DeoptimizationInputData* data =
47 DeoptimizationInputData::cast(code->deoptimization_data());
48 int osr_offset = data->OsrPcOffset()->value();
49 if (osr_offset > 0) {
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000050 CodePatcher osr_patcher(isolate, code->instruction_start() + osr_offset,
51 1);
Ben Murdochb8a8cc12014-11-26 15:28:44 +000052 osr_patcher.masm()->bkpt(0);
53 }
54 }
55
Ben Murdoch2b4ba112012-01-20 14:57:15 +000056 DeoptimizationInputData* deopt_data =
57 DeoptimizationInputData::cast(code->deoptimization_data());
Ben Murdochb0fe1622011-05-05 13:52:32 +010058#ifdef DEBUG
Ben Murdoch2b4ba112012-01-20 14:57:15 +000059 Address prev_call_address = NULL;
Ben Murdochb0fe1622011-05-05 13:52:32 +010060#endif
Ben Murdochb8a8cc12014-11-26 15:28:44 +000061 // For each LLazyBailout instruction insert a call to the corresponding
62 // deoptimization entry.
Ben Murdoch2b4ba112012-01-20 14:57:15 +000063 for (int i = 0; i < deopt_data->DeoptCount(); i++) {
64 if (deopt_data->Pc(i)->value() == -1) continue;
65 Address call_address = code_start_address + deopt_data->Pc(i)->value();
Ben Murdochb8a8cc12014-11-26 15:28:44 +000066 Address deopt_entry = GetDeoptimizationEntry(isolate, i, LAZY);
67 // We need calls to have a predictable size in the unoptimized code, but
68 // this is optimized code, so we don't have to have a predictable size.
Ben Murdoch61f157c2016-09-16 13:49:30 +010069 int call_size_in_bytes = MacroAssembler::CallDeoptimizerSize();
Ben Murdoch2b4ba112012-01-20 14:57:15 +000070 int call_size_in_words = call_size_in_bytes / Assembler::kInstrSize;
Ben Murdochb8a8cc12014-11-26 15:28:44 +000071 DCHECK(call_size_in_bytes % Assembler::kInstrSize == 0);
72 DCHECK(call_size_in_bytes <= patch_size());
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000073 CodePatcher patcher(isolate, call_address, call_size_in_words);
Ben Murdoch61f157c2016-09-16 13:49:30 +010074 patcher.masm()->CallDeoptimizer(deopt_entry);
Ben Murdochb8a8cc12014-11-26 15:28:44 +000075 DCHECK(prev_call_address == NULL ||
Ben Murdoch2b4ba112012-01-20 14:57:15 +000076 call_address >= prev_call_address + patch_size());
Ben Murdochb8a8cc12014-11-26 15:28:44 +000077 DCHECK(call_address + patch_size() <= code->instruction_end());
Ben Murdochb0fe1622011-05-05 13:52:32 +010078#ifdef DEBUG
Ben Murdoch2b4ba112012-01-20 14:57:15 +000079 prev_call_address = call_address;
Ben Murdochb0fe1622011-05-05 13:52:32 +010080#endif
Ben Murdoch2b4ba112012-01-20 14:57:15 +000081 }
Ben Murdochb0fe1622011-05-05 13:52:32 +010082}
83
84
Ben Murdochb8a8cc12014-11-26 15:28:44 +000085void Deoptimizer::SetPlatformCompiledStubRegisters(
86 FrameDescription* output_frame, CodeStubDescriptor* descriptor) {
87 ApiFunction function(descriptor->deoptimization_handler());
88 ExternalReference xref(&function, ExternalReference::BUILTIN_CALL, isolate_);
89 intptr_t handler = reinterpret_cast<intptr_t>(xref.address());
90 int params = descriptor->GetHandlerParameterCount();
91 output_frame->SetRegister(r0.code(), params);
92 output_frame->SetRegister(r1.code(), handler);
93}
94
95
96void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) {
97 for (int i = 0; i < DwVfpRegister::kMaxNumRegisters; ++i) {
98 double double_value = input_->GetDoubleRegister(i);
99 output_frame->SetDoubleRegister(i, double_value);
100 }
101}
102
Ben Murdoch3fb3ca82011-12-02 17:19:32 +0000103#define __ masm()->
Ben Murdochb0fe1622011-05-05 13:52:32 +0100104
105// This code tries to be close to ia32 code so that any changes can be
106// easily ported.
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000107void Deoptimizer::TableEntryGenerator::Generate() {
Ben Murdochb0fe1622011-05-05 13:52:32 +0100108 GeneratePrologue();
Steve Block44f0eee2011-05-26 01:26:41 +0100109
Ben Murdochb0fe1622011-05-05 13:52:32 +0100110 // Save all general purpose registers before messing with them.
111 const int kNumberOfRegisters = Register::kNumRegisters;
112
113 // Everything but pc, lr and ip which will be saved but not restored.
114 RegList restored_regs = kJSCallerSaved | kCalleeSaved | ip.bit();
115
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000116 const int kDoubleRegsSize = kDoubleSize * DwVfpRegister::kMaxNumRegisters;
Ben Murdochb0fe1622011-05-05 13:52:32 +0100117
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000118 // Save all allocatable VFP registers before messing with them.
119 DCHECK(kDoubleRegZero.code() == 14);
120 DCHECK(kScratchDoubleReg.code() == 15);
121
122 // Check CPU flags for number of registers, setting the Z condition flag.
123 __ CheckFor32DRegs(ip);
124
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000125 // Push registers d0-d15, and possibly d16-d31, on the stack.
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000126 // If d16-d31 are not pushed, decrease the stack pointer instead.
127 __ vstm(db_w, sp, d16, d31, ne);
128 __ sub(sp, sp, Operand(16 * kDoubleSize), LeaveCC, eq);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000129 __ vstm(db_w, sp, d0, d15);
Ben Murdochb0fe1622011-05-05 13:52:32 +0100130
131 // Push all 16 registers (needed to populate FrameDescription::registers_).
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000132 // TODO(1588) Note that using pc with stm is deprecated, so we should perhaps
133 // handle this a bit differently.
Ben Murdochb0fe1622011-05-05 13:52:32 +0100134 __ stm(db_w, sp, restored_regs | sp.bit() | lr.bit() | pc.bit());
135
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000136 __ mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
137 __ str(fp, MemOperand(ip));
138
Ben Murdochb0fe1622011-05-05 13:52:32 +0100139 const int kSavedRegistersAreaSize =
140 (kNumberOfRegisters * kPointerSize) + kDoubleRegsSize;
141
142 // Get the bailout id from the stack.
143 __ ldr(r2, MemOperand(sp, kSavedRegistersAreaSize));
144
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000145 // Get the address of the location in the code object (r3) (return
Ben Murdochb0fe1622011-05-05 13:52:32 +0100146 // address for lazy deoptimization) and compute the fp-to-sp delta in
147 // register r4.
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000148 __ mov(r3, lr);
149 // Correct one word for bailout id.
150 __ add(r4, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize)));
Ben Murdochb0fe1622011-05-05 13:52:32 +0100151 __ sub(r4, fp, r4);
152
153 // Allocate a new deoptimizer object.
154 // Pass four arguments in r0 to r3 and fifth argument on stack.
Ben Murdoch8b112d22011-06-08 16:22:53 +0100155 __ PrepareCallCFunction(6, r5);
Ben Murdochda12d292016-06-02 14:46:10 +0100156 __ mov(r0, Operand(0));
157 Label context_check;
158 __ ldr(r1, MemOperand(fp, CommonFrameConstants::kContextOrFrameTypeOffset));
159 __ JumpIfSmi(r1, &context_check);
Ben Murdochb0fe1622011-05-05 13:52:32 +0100160 __ ldr(r0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
Ben Murdochda12d292016-06-02 14:46:10 +0100161 __ bind(&context_check);
Ben Murdochb0fe1622011-05-05 13:52:32 +0100162 __ mov(r1, Operand(type())); // bailout type,
163 // r2: bailout id already loaded.
164 // r3: code address or 0 already loaded.
165 __ str(r4, MemOperand(sp, 0 * kPointerSize)); // Fp-to-sp delta.
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000166 __ mov(r5, Operand(ExternalReference::isolate_address(isolate())));
Ben Murdoch8b112d22011-06-08 16:22:53 +0100167 __ str(r5, MemOperand(sp, 1 * kPointerSize)); // Isolate.
Ben Murdochb0fe1622011-05-05 13:52:32 +0100168 // Call Deoptimizer::New().
Ben Murdoch3ef787d2012-04-12 10:51:47 +0100169 {
170 AllowExternalCallThatCantCauseGC scope(masm());
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000171 __ CallCFunction(ExternalReference::new_deoptimizer_function(isolate()), 6);
Ben Murdoch3ef787d2012-04-12 10:51:47 +0100172 }
Ben Murdochb0fe1622011-05-05 13:52:32 +0100173
174 // Preserve "deoptimizer" object in register r0 and get the input
175 // frame descriptor pointer to r1 (deoptimizer->input_);
176 __ ldr(r1, MemOperand(r0, Deoptimizer::input_offset()));
177
Ben Murdochb0fe1622011-05-05 13:52:32 +0100178 // Copy core registers into FrameDescription::registers_[kNumRegisters].
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000179 DCHECK(Register::kNumRegisters == kNumberOfRegisters);
Ben Murdochb0fe1622011-05-05 13:52:32 +0100180 for (int i = 0; i < kNumberOfRegisters; i++) {
Steve Block1e0659c2011-05-24 12:43:12 +0100181 int offset = (i * kPointerSize) + FrameDescription::registers_offset();
Ben Murdochb0fe1622011-05-05 13:52:32 +0100182 __ ldr(r2, MemOperand(sp, i * kPointerSize));
183 __ str(r2, MemOperand(r1, offset));
184 }
185
186 // Copy VFP registers to
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000187 // double_registers_[DoubleRegister::kMaxNumAllocatableRegisters]
Ben Murdochb0fe1622011-05-05 13:52:32 +0100188 int double_regs_offset = FrameDescription::double_registers_offset();
Ben Murdoch61f157c2016-09-16 13:49:30 +0100189 const RegisterConfiguration* config = RegisterConfiguration::Crankshaft();
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000190 for (int i = 0; i < config->num_allocatable_double_registers(); ++i) {
191 int code = config->GetAllocatableDoubleCode(i);
192 int dst_offset = code * kDoubleSize + double_regs_offset;
193 int src_offset = code * kDoubleSize + kNumberOfRegisters * kPointerSize;
Ben Murdochb0fe1622011-05-05 13:52:32 +0100194 __ vldr(d0, sp, src_offset);
195 __ vstr(d0, r1, dst_offset);
196 }
197
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000198 // Remove the bailout id and the saved registers from the stack.
199 __ add(sp, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize)));
Ben Murdochb0fe1622011-05-05 13:52:32 +0100200
201 // Compute a pointer to the unwinding limit in register r2; that is
202 // the first stack slot not part of the input frame.
203 __ ldr(r2, MemOperand(r1, FrameDescription::frame_size_offset()));
204 __ add(r2, r2, sp);
205
206 // Unwind the stack down to - but not including - the unwinding
207 // limit and copy the contents of the activation frame to the input
208 // frame description.
209 __ add(r3, r1, Operand(FrameDescription::frame_content_offset()));
210 Label pop_loop;
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000211 Label pop_loop_header;
212 __ b(&pop_loop_header);
Ben Murdochb0fe1622011-05-05 13:52:32 +0100213 __ bind(&pop_loop);
214 __ pop(r4);
215 __ str(r4, MemOperand(r3, 0));
216 __ add(r3, r3, Operand(sizeof(uint32_t)));
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000217 __ bind(&pop_loop_header);
Ben Murdochb0fe1622011-05-05 13:52:32 +0100218 __ cmp(r2, sp);
219 __ b(ne, &pop_loop);
220
221 // Compute the output frame in the deoptimizer.
222 __ push(r0); // Preserve deoptimizer object across call.
223 // r0: deoptimizer object; r1: scratch.
224 __ PrepareCallCFunction(1, r1);
225 // Call Deoptimizer::ComputeOutputFrames().
Ben Murdoch3ef787d2012-04-12 10:51:47 +0100226 {
227 AllowExternalCallThatCantCauseGC scope(masm());
228 __ CallCFunction(
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000229 ExternalReference::compute_output_frames_function(isolate()), 1);
Ben Murdoch3ef787d2012-04-12 10:51:47 +0100230 }
Ben Murdochb0fe1622011-05-05 13:52:32 +0100231 __ pop(r0); // Restore deoptimizer object (class Deoptimizer).
232
Ben Murdochda12d292016-06-02 14:46:10 +0100233 __ ldr(sp, MemOperand(r0, Deoptimizer::caller_frame_top_offset()));
234
Ben Murdochb0fe1622011-05-05 13:52:32 +0100235 // Replace the current (input) frame with the output frames.
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000236 Label outer_push_loop, inner_push_loop,
237 outer_loop_header, inner_loop_header;
238 // Outer loop state: r4 = current "FrameDescription** output_",
Ben Murdochb0fe1622011-05-05 13:52:32 +0100239 // r1 = one past the last FrameDescription**.
240 __ ldr(r1, MemOperand(r0, Deoptimizer::output_count_offset()));
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000241 __ ldr(r4, MemOperand(r0, Deoptimizer::output_offset())); // r4 is output_.
242 __ add(r1, r4, Operand(r1, LSL, 2));
243 __ jmp(&outer_loop_header);
Ben Murdochb0fe1622011-05-05 13:52:32 +0100244 __ bind(&outer_push_loop);
245 // Inner loop state: r2 = current FrameDescription*, r3 = loop index.
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000246 __ ldr(r2, MemOperand(r4, 0)); // output_[ix]
Ben Murdochb0fe1622011-05-05 13:52:32 +0100247 __ ldr(r3, MemOperand(r2, FrameDescription::frame_size_offset()));
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000248 __ jmp(&inner_loop_header);
Ben Murdochb0fe1622011-05-05 13:52:32 +0100249 __ bind(&inner_push_loop);
250 __ sub(r3, r3, Operand(sizeof(uint32_t)));
Ben Murdochb0fe1622011-05-05 13:52:32 +0100251 __ add(r6, r2, Operand(r3));
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000252 __ ldr(r6, MemOperand(r6, FrameDescription::frame_content_offset()));
253 __ push(r6);
254 __ bind(&inner_loop_header);
255 __ cmp(r3, Operand::Zero());
Ben Murdochb0fe1622011-05-05 13:52:32 +0100256 __ b(ne, &inner_push_loop); // test for gt?
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000257 __ add(r4, r4, Operand(kPointerSize));
258 __ bind(&outer_loop_header);
259 __ cmp(r4, r1);
Ben Murdochb0fe1622011-05-05 13:52:32 +0100260 __ b(lt, &outer_push_loop);
261
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000262 // Check CPU flags for number of registers, setting the Z condition flag.
263 __ CheckFor32DRegs(ip);
264
265 __ ldr(r1, MemOperand(r0, Deoptimizer::input_offset()));
Ben Murdoch097c5b22016-05-18 11:27:45 +0100266 for (int i = 0; i < config->num_allocatable_double_registers(); ++i) {
267 int code = config->GetAllocatableDoubleCode(i);
268 DwVfpRegister reg = DwVfpRegister::from_code(code);
269 int src_offset = code * kDoubleSize + double_regs_offset;
270 __ vldr(reg, r1, src_offset);
Ben Murdochb0fe1622011-05-05 13:52:32 +0100271 }
272
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000273 // Push state, pc, and continuation from the last output frame.
274 __ ldr(r6, MemOperand(r2, FrameDescription::state_offset()));
275 __ push(r6);
Ben Murdochb0fe1622011-05-05 13:52:32 +0100276 __ ldr(r6, MemOperand(r2, FrameDescription::pc_offset()));
277 __ push(r6);
278 __ ldr(r6, MemOperand(r2, FrameDescription::continuation_offset()));
279 __ push(r6);
280
281 // Push the registers from the last output frame.
282 for (int i = kNumberOfRegisters - 1; i >= 0; i--) {
Steve Block1e0659c2011-05-24 12:43:12 +0100283 int offset = (i * kPointerSize) + FrameDescription::registers_offset();
Ben Murdochb0fe1622011-05-05 13:52:32 +0100284 __ ldr(r6, MemOperand(r2, offset));
285 __ push(r6);
286 }
287
288 // Restore the registers from the stack.
289 __ ldm(ia_w, sp, restored_regs); // all but pc registers.
290 __ pop(ip); // remove sp
291 __ pop(ip); // remove lr
292
Ben Murdochc7cc0282012-03-05 14:35:55 +0000293 __ InitializeRootRegister();
Ben Murdochb0fe1622011-05-05 13:52:32 +0100294
295 __ pop(ip); // remove pc
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000296 __ pop(ip); // get continuation, leave pc on stack
Ben Murdochb0fe1622011-05-05 13:52:32 +0100297 __ pop(lr);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000298 __ Jump(ip);
Ben Murdochb0fe1622011-05-05 13:52:32 +0100299 __ stop("Unreachable.");
300}
301
302
303void Deoptimizer::TableEntryGenerator::GeneratePrologue() {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000304 // Create a sequence of deoptimization entries.
305 // Note that registers are still live when jumping to an entry.
Ben Murdoch61f157c2016-09-16 13:49:30 +0100306
307 // We need to be able to generate immediates up to kMaxNumberOfEntries. On
308 // ARMv7, we can use movw (with a maximum immediate of 0xffff). On ARMv6, we
309 // need two instructions.
310 STATIC_ASSERT((kMaxNumberOfEntries - 1) <= 0xffff);
311 if (CpuFeatures::IsSupported(ARMv7)) {
312 CpuFeatureScope scope(masm(), ARMv7);
313 Label done;
314 for (int i = 0; i < count(); i++) {
315 int start = masm()->pc_offset();
316 USE(start);
317 __ movw(ip, i);
318 __ b(&done);
319 DCHECK_EQ(table_entry_size_, masm()->pc_offset() - start);
320 }
321 __ bind(&done);
322 } else {
323 // We want to keep table_entry_size_ == 8 (since this is the common case),
324 // but we need two instructions to load most immediates over 0xff. To handle
325 // this, we set the low byte in the main table, and then set the high byte
326 // in a separate table if necessary.
327 Label high_fixes[256];
328 int high_fix_max = (count() - 1) >> 8;
329 DCHECK_GT(arraysize(high_fixes), high_fix_max);
330 for (int i = 0; i < count(); i++) {
331 int start = masm()->pc_offset();
332 USE(start);
333 __ mov(ip, Operand(i & 0xff)); // Set the low byte.
334 __ b(&high_fixes[i >> 8]); // Jump to the secondary table.
335 DCHECK_EQ(table_entry_size_, masm()->pc_offset() - start);
336 }
337 // Generate the secondary table, to set the high byte.
338 for (int high = 1; high <= high_fix_max; high++) {
339 __ bind(&high_fixes[high]);
340 __ orr(ip, ip, Operand(high << 8));
341 // If this isn't the last entry, emit a branch to the end of the table.
342 // The last entry can just fall through.
343 if (high < high_fix_max) __ b(&high_fixes[0]);
344 }
345 // Bind high_fixes[0] last, for indices like 0x00**. This case requires no
346 // fix-up, so for (common) small tables we can jump here, then just fall
347 // through with no additional branch.
348 __ bind(&high_fixes[0]);
Ben Murdochb0fe1622011-05-05 13:52:32 +0100349 }
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000350 __ push(ip);
Ben Murdochb0fe1622011-05-05 13:52:32 +0100351}
352
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000353
354void FrameDescription::SetCallerPc(unsigned offset, intptr_t value) {
355 SetFrameSlot(offset, value);
356}
357
358
359void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) {
360 SetFrameSlot(offset, value);
361}
362
363
364void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) {
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000365 DCHECK(FLAG_enable_embedded_constant_pool);
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000366 SetFrameSlot(offset, value);
367}
368
369
Ben Murdochb0fe1622011-05-05 13:52:32 +0100370#undef __
371
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000372} // namespace internal
373} // namespace v8