diff options
Diffstat (limited to 'deps/v8/src/deoptimizer.h')
-rw-r--r-- | deps/v8/src/deoptimizer.h | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/deps/v8/src/deoptimizer.h b/deps/v8/src/deoptimizer.h index 8641261b1..284676c36 100644 --- a/deps/v8/src/deoptimizer.h +++ b/deps/v8/src/deoptimizer.h @@ -86,8 +86,8 @@ class DeoptimizerData { #endif private: - LargeObjectChunk* eager_deoptimization_entry_code_; - LargeObjectChunk* lazy_deoptimization_entry_code_; + MemoryChunk* eager_deoptimization_entry_code_; + MemoryChunk* lazy_deoptimization_entry_code_; Deoptimizer* current_; #ifdef ENABLE_DEBUGGER_SUPPORT @@ -173,7 +173,8 @@ class Deoptimizer : public Malloced { // Patch stack guard check at instruction before pc_after in // the unoptimized code to unconditionally call replacement_code. - static void PatchStackCheckCodeAt(Address pc_after, + static void PatchStackCheckCodeAt(Code* unoptimized_code, + Address pc_after, Code* check_code, Code* replacement_code); @@ -185,7 +186,8 @@ class Deoptimizer : public Malloced { // Change all patched stack guard checks in the unoptimized code // back to a normal stack guard check. - static void RevertStackCheckCodeAt(Address pc_after, + static void RevertStackCheckCodeAt(Code* unoptimized_code, + Address pc_after, Code* check_code, Code* replacement_code); @@ -211,6 +213,11 @@ class Deoptimizer : public Malloced { return OFFSET_OF(Deoptimizer, output_count_); } static int output_offset() { return OFFSET_OF(Deoptimizer, output_); } + static int frame_alignment_marker_offset() { + return OFFSET_OF(Deoptimizer, frame_alignment_marker_); } + static int has_alignment_padding_offset() { + return OFFSET_OF(Deoptimizer, has_alignment_padding_); + } static int GetDeoptimizedCodeCount(Isolate* isolate); @@ -285,7 +292,7 @@ class Deoptimizer : public Malloced { void AddDoubleValue(intptr_t slot_address, double value); - static LargeObjectChunk* CreateCode(BailoutType type); + static MemoryChunk* CreateCode(BailoutType type); static void GenerateDeoptimizationEntries( MacroAssembler* masm, int count, BailoutType type); @@ -315,6 +322,10 @@ class Deoptimizer : public Malloced { // Array of output frame descriptions. FrameDescription** output_; + // Frames can be dynamically padded on ia32 to align untagged doubles. + Object* frame_alignment_marker_; + intptr_t has_alignment_padding_; + List<HeapNumberMaterializationDescriptor> deferred_heap_numbers_; static const int table_entry_size_; @@ -358,7 +369,20 @@ class FrameDescription { } double GetDoubleFrameSlot(unsigned offset) { - return *reinterpret_cast<double*>(GetFrameSlotPointer(offset)); + intptr_t* ptr = GetFrameSlotPointer(offset); +#if V8_TARGET_ARCH_MIPS + // Prevent gcc from using load-double (mips ldc1) on (possibly) + // non-64-bit aligned double. Uses two lwc1 instructions. + union conversion { + double d; + uint32_t u[2]; + } c; + c.u[0] = *reinterpret_cast<uint32_t*>(ptr); + c.u[1] = *(reinterpret_cast<uint32_t*>(ptr) + 1); + return c.d; +#else + return *reinterpret_cast<double*>(ptr); +#endif } void SetFrameSlot(unsigned offset, intptr_t value) { |