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

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

Issue 2109673003: Use source position table in turbofan code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: drive-by fix for relocation info size reservation Created 4 years, 5 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/profiler/profiler-listener.cc ('k') | no next file » | 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 17 matching lines...) Expand all
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::PatchCodeForDeoptimization below. 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 pc_offset = pc_offset + 1; // We will encode the pc offset after the call.
38 DCHECK_GE(pc_offset, prev_pc_offset); 39 DCHECK_GE(pc_offset, prev_pc_offset);
39 int pc_delta = pc_offset - prev_pc_offset; 40 int pc_delta = pc_offset - prev_pc_offset;
40 // We use RUNTIME_ENTRY reloc info which has a size of 2 bytes 41 // We use RUNTIME_ENTRY reloc info which has a size of 2 bytes
41 // if encodable with small pc delta encoding and up to 6 bytes 42 // if encodable with small pc delta encoding and up to 6 bytes
42 // otherwise. 43 // otherwise.
43 if (pc_delta <= RelocInfo::kMaxSmallPCDelta) { 44 if (pc_delta <= RelocInfo::kMaxSmallPCDelta) {
44 min_reloc_size += 2; 45 min_reloc_size += 2;
45 } else { 46 } else {
46 min_reloc_size += 6; 47 min_reloc_size += 6;
47 } 48 }
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 } 423 }
423 424
424 425
425 #undef __ 426 #undef __
426 427
427 428
428 } // namespace internal 429 } // namespace internal
429 } // namespace v8 430 } // namespace v8
430 431
431 #endif // V8_TARGET_ARCH_X87 432 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/profiler/profiler-listener.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698