• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "src/deoptimizer/deoptimizer.h"
6 
7 namespace v8 {
8 namespace internal {
9 
10 const bool Deoptimizer::kSupportsFixedDeoptExitSizes = true;
11 const int Deoptimizer::kNonLazyDeoptExitSize = 2 * kInstrSize;
12 const int Deoptimizer::kLazyDeoptExitSize = 2 * kInstrSize;
13 
GetFloatRegister(unsigned n) const14 Float32 RegisterValues::GetFloatRegister(unsigned n) const {
15   const int kShift = n % 2 == 0 ? 0 : 32;
16 
17   return Float32::FromBits(
18       static_cast<uint32_t>(double_registers_[n / 2].get_bits() >> kShift));
19 }
20 
SetCallerPc(unsigned offset,intptr_t value)21 void FrameDescription::SetCallerPc(unsigned offset, intptr_t value) {
22   SetFrameSlot(offset, value);
23 }
24 
SetCallerFp(unsigned offset,intptr_t value)25 void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) {
26   SetFrameSlot(offset, value);
27 }
28 
SetCallerConstantPool(unsigned offset,intptr_t value)29 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) {
30   // No embedded constant pool support.
31   UNREACHABLE();
32 }
33 
SetPc(intptr_t pc)34 void FrameDescription::SetPc(intptr_t pc) { pc_ = pc; }
35 
36 }  // namespace internal
37 }  // namespace v8
38