diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-08-11 23:59:21 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-08-11 23:59:21 -0700 |
commit | 89bed195134317a10e6ffffe23a90473790f0a7f (patch) | |
tree | 2e3d714711c151458e9ff18bbfa9d04859939ba1 /deps/v8/src/arm/deoptimizer-arm.cc | |
parent | fb7faefbf53f2e27aa2e9cf9dbd88163eeaefb38 (diff) | |
download | node-new-89bed195134317a10e6ffffe23a90473790f0a7f.tar.gz |
Upgrade V8 to v3.5.4
Diffstat (limited to 'deps/v8/src/arm/deoptimizer-arm.cc')
-rw-r--r-- | deps/v8/src/arm/deoptimizer-arm.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/deps/v8/src/arm/deoptimizer-arm.cc b/deps/v8/src/arm/deoptimizer-arm.cc index cd70e6de82..9d9c045ff1 100644 --- a/deps/v8/src/arm/deoptimizer-arm.cc +++ b/deps/v8/src/arm/deoptimizer-arm.cc @@ -35,7 +35,7 @@ namespace v8 { namespace internal { -int Deoptimizer::table_entry_size_ = 16; +const int Deoptimizer::table_entry_size_ = 16; int Deoptimizer::patch_size() { @@ -65,8 +65,6 @@ void Deoptimizer::DeoptimizeFunction(JSFunction* function) { // For each return after a safepoint insert an absolute call to the // corresponding deoptimization entry. - ASSERT(patch_size() % Assembler::kInstrSize == 0); - int call_size_in_words = patch_size() / Assembler::kInstrSize; unsigned last_pc_offset = 0; SafepointTable table(function->code()); for (unsigned i = 0; i < table.length(); i++) { @@ -87,13 +85,18 @@ void Deoptimizer::DeoptimizeFunction(JSFunction* function) { #endif last_pc_offset = pc_offset; if (deoptimization_index != Safepoint::kNoDeoptimizationIndex) { + Address deoptimization_entry = Deoptimizer::GetDeoptimizationEntry( + deoptimization_index, Deoptimizer::LAZY); last_pc_offset += gap_code_size; + int call_size_in_bytes = MacroAssembler::CallSize(deoptimization_entry, + RelocInfo::NONE); + int call_size_in_words = call_size_in_bytes / Assembler::kInstrSize; + ASSERT(call_size_in_bytes % Assembler::kInstrSize == 0); + ASSERT(call_size_in_bytes <= patch_size()); CodePatcher patcher(code->instruction_start() + last_pc_offset, call_size_in_words); - Address deoptimization_entry = Deoptimizer::GetDeoptimizationEntry( - deoptimization_index, Deoptimizer::LAZY); patcher.masm()->Call(deoptimization_entry, RelocInfo::NONE); - last_pc_offset += patch_size(); + last_pc_offset += call_size_in_bytes; } } @@ -530,8 +533,6 @@ void Deoptimizer::DoComputeFrame(TranslationIterator* iterator, output_frame->SetContinuation( reinterpret_cast<uint32_t>(continuation->entry())); } - - if (output_count_ - 1 == frame_index) iterator->Done(); } |