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

Unified Diff: src/objects.cc

Issue 2101523003: Use source position table for crankshaft code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@sourcepos
Patch Set: rebase Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/crankshaft/x87/lithium-codegen-x87.cc ('k') | src/profiler/profiler-listener.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index ddf62b153cb6e98dbb8291b9184a1ebe35c975e8..c57f4acd207d28d0f3d86f2b0e9d4821be54e5e0 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -13592,7 +13592,7 @@ int Code::SourcePosition(int code_offset) {
code_offset--;
// Find the closest position attached to a pc lower or equal to the current.
// Note that the pc of reloc infos grow monotonically.
- if (kind() == FUNCTION) {
+ if (kind() == FUNCTION || (is_optimized_code() && !is_turbofanned())) {
for (SourcePositionTableIterator it(source_position_table());
!it.done() && it.code_offset() <= code_offset; it.Advance()) {
position = it.source_position();
@@ -13617,7 +13617,7 @@ int Code::SourceStatementPosition(int code_offset) {
int position = SourcePosition(code_offset);
// Now find the closest statement position before the position.
int statement_position = 0;
- if (kind() == FUNCTION) {
+ if (kind() == FUNCTION || (is_optimized_code() && !is_turbofanned())) {
for (SourcePositionTableIterator it(source_position_table()); !it.done();
it.Advance()) {
if (it.is_statement()) {
« no previous file with comments | « src/crankshaft/x87/lithium-codegen-x87.cc ('k') | src/profiler/profiler-listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698