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

Side by Side Diff: src/debug/liveedit.cc

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: fixed gcmole issue Created 4 years, 1 month 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
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/debug/liveedit.h" 5 #include "src/debug/liveedit.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compilation-cache.h" 9 #include "src/compilation-cache.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 1104
1105 void TranslateSourcePositionTable(Handle<AbstractCode> code, 1105 void TranslateSourcePositionTable(Handle<AbstractCode> code,
1106 Handle<JSArray> position_change_array) { 1106 Handle<JSArray> position_change_array) {
1107 Isolate* isolate = code->GetIsolate(); 1107 Isolate* isolate = code->GetIsolate();
1108 Zone zone(isolate->allocator(), ZONE_NAME); 1108 Zone zone(isolate->allocator(), ZONE_NAME);
1109 SourcePositionTableBuilder builder(&zone); 1109 SourcePositionTableBuilder builder(&zone);
1110 1110
1111 Handle<ByteArray> source_position_table(code->source_position_table()); 1111 Handle<ByteArray> source_position_table(code->source_position_table());
1112 for (SourcePositionTableIterator iterator(*source_position_table); 1112 for (SourcePositionTableIterator iterator(*source_position_table);
1113 !iterator.done(); iterator.Advance()) { 1113 !iterator.done(); iterator.Advance()) {
1114 int position = iterator.source_position(); 1114 SourcePosition position = iterator.source_position();
1115 int new_position = TranslatePosition(position, position_change_array); 1115 position.SetScriptOffset(
1116 builder.AddPosition(iterator.code_offset(), new_position, 1116 TranslatePosition(position.ScriptOffset(), position_change_array));
1117 builder.AddPosition(iterator.code_offset(), position,
1117 iterator.is_statement()); 1118 iterator.is_statement());
1118 } 1119 }
1119 1120
1120 Handle<ByteArray> new_source_position_table( 1121 Handle<ByteArray> new_source_position_table(
1121 builder.ToSourcePositionTable(isolate, code)); 1122 builder.ToSourcePositionTable(isolate, code));
1122 code->set_source_position_table(*new_source_position_table); 1123 code->set_source_position_table(*new_source_position_table);
1123 } 1124 }
1124 } // namespace 1125 } // namespace
1125 1126
1126 void LiveEdit::PatchFunctionPositions(Handle<JSArray> shared_info_array, 1127 void LiveEdit::PatchFunctionPositions(Handle<JSArray> shared_info_array,
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1914 scope_info_length++; 1915 scope_info_length++;
1915 1916
1916 current_scope = current_scope->outer_scope(); 1917 current_scope = current_scope->outer_scope();
1917 } 1918 }
1918 1919
1919 return scope_info_list; 1920 return scope_info_list;
1920 } 1921 }
1921 1922
1922 } // namespace internal 1923 } // namespace internal
1923 } // namespace v8 1924 } // namespace v8
OLDNEW
« src/crankshaft/hydrogen.cc ('K') | « src/debug/debug.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698