Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: src/x87/deoptimizer-x87.cc

Issue 1698743002: Make the frame inspector use TranslatedState rather than the full deoptimizer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address review comments, changed some DCHECKs to CHECKs Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/x64/deoptimizer-x64.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 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 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_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/deoptimizer.h" 8 #include "src/deoptimizer.h"
9 #include "src/full-codegen/full-codegen.h" 9 #include "src/full-codegen/full-codegen.h"
10 #include "src/register-configuration.h" 10 #include "src/register-configuration.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 162
163 // Right trim the relocation info to free up remaining space. 163 // Right trim the relocation info to free up remaining space.
164 const int delta = reloc_info->length() - new_reloc_length; 164 const int delta = reloc_info->length() - new_reloc_length;
165 if (delta > 0) { 165 if (delta > 0) {
166 isolate->heap()->RightTrimFixedArray<Heap::SEQUENTIAL_TO_SWEEPER>( 166 isolate->heap()->RightTrimFixedArray<Heap::SEQUENTIAL_TO_SWEEPER>(
167 reloc_info, delta); 167 reloc_info, delta);
168 } 168 }
169 } 169 }
170 170
171 171
172 void Deoptimizer::FillInputFrame(Address tos, JavaScriptFrame* frame) {
173 // Set the register values. The values are not important as there are no
174 // callee saved registers in JavaScript frames, so all registers are
175 // spilled. Registers ebp and esp are set to the correct values though.
176
177 for (int i = 0; i < Register::kNumRegisters; i++) {
178 input_->SetRegister(i, i * 4);
179 }
180 input_->SetRegister(esp.code(), reinterpret_cast<intptr_t>(frame->sp()));
181 input_->SetRegister(ebp.code(), reinterpret_cast<intptr_t>(frame->fp()));
182 for (int i = 0; i < X87Register::kMaxNumRegisters; i++) {
183 input_->SetDoubleRegister(i, 0.0);
184 }
185
186 // Fill the frame content from the actual data on the frame.
187 for (unsigned i = 0; i < input_->GetFrameSize(); i += kPointerSize) {
188 input_->SetFrameSlot(i, Memory::uint32_at(tos + i));
189 }
190 }
191
192
193 void Deoptimizer::SetPlatformCompiledStubRegisters( 172 void Deoptimizer::SetPlatformCompiledStubRegisters(
194 FrameDescription* output_frame, CodeStubDescriptor* descriptor) { 173 FrameDescription* output_frame, CodeStubDescriptor* descriptor) {
195 intptr_t handler = 174 intptr_t handler =
196 reinterpret_cast<intptr_t>(descriptor->deoptimization_handler()); 175 reinterpret_cast<intptr_t>(descriptor->deoptimization_handler());
197 int params = descriptor->GetHandlerParameterCount(); 176 int params = descriptor->GetHandlerParameterCount();
198 output_frame->SetRegister(eax.code(), params); 177 output_frame->SetRegister(eax.code(), params);
199 output_frame->SetRegister(ebx.code(), handler); 178 output_frame->SetRegister(ebx.code(), handler);
200 } 179 }
201 180
202 181
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 } 443 }
465 444
466 445
467 #undef __ 446 #undef __
468 447
469 448
470 } // namespace internal 449 } // namespace internal
471 } // namespace v8 450 } // namespace v8
472 451
473 #endif // V8_TARGET_ARCH_X87 452 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/deoptimizer-x64.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698