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

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

Issue 782703002: Cleanup deoptimizer relocation slot preparation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment for x87 port. Created 6 years 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/compiler/x64/code-generator-x64.cc ('k') | src/mips/deoptimizer-mips.cc » ('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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
11 #include "src/full-codegen.h" 11 #include "src/full-codegen.h"
12 #include "src/safepoint-table.h" 12 #include "src/safepoint-table.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 16
17 const int Deoptimizer::table_entry_size_ = 10; 17 const int Deoptimizer::table_entry_size_ = 10;
18 18
19 19
20 int Deoptimizer::patch_size() { 20 int Deoptimizer::patch_size() {
21 return Assembler::kCallInstructionLength; 21 return Assembler::kCallInstructionLength;
22 } 22 }
23 23
24 24
25 void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code) { 25 void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code) {
26 Isolate* isolate = code->GetIsolate(); 26 Isolate* isolate = code->GetIsolate();
27 HandleScope scope(isolate); 27 HandleScope scope(isolate);
28 28
29 // Compute the size of relocation information needed for the code 29 // Compute the size of relocation information needed for the code
30 // patching in Deoptimizer::DeoptimizeFunction. 30 // patching in Deoptimizer::PatchCodeForDeoptimization below.
31 int min_reloc_size = 0; 31 int min_reloc_size = 0;
32 int prev_pc_offset = 0; 32 int prev_pc_offset = 0;
33 DeoptimizationInputData* deopt_data = 33 DeoptimizationInputData* deopt_data =
34 DeoptimizationInputData::cast(code->deoptimization_data()); 34 DeoptimizationInputData::cast(code->deoptimization_data());
35 for (int i = 0; i < deopt_data->DeoptCount(); i++) { 35 for (int i = 0; i < deopt_data->DeoptCount(); i++) {
36 int pc_offset = deopt_data->Pc(i)->value(); 36 int pc_offset = deopt_data->Pc(i)->value();
37 if (pc_offset == -1) continue; 37 if (pc_offset == -1) continue;
38 DCHECK_GE(pc_offset, prev_pc_offset); 38 DCHECK_GE(pc_offset, prev_pc_offset);
39 int pc_delta = pc_offset - prev_pc_offset; 39 int pc_delta = pc_offset - prev_pc_offset;
40 // We use RUNTIME_ENTRY reloc info which has a size of 2 bytes 40 // We use RUNTIME_ENTRY reloc info which has a size of 2 bytes
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 UNREACHABLE(); 423 UNREACHABLE();
424 } 424 }
425 425
426 426
427 #undef __ 427 #undef __
428 428
429 429
430 } } // namespace v8::internal 430 } } // namespace v8::internal
431 431
432 #endif // V8_TARGET_ARCH_IA32 432 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | src/mips/deoptimizer-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698