Commit ba77137b authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[objects] Remove AbstractCode::set_source_position_table.

R=bmeurer@chromium.org
BUG=v8:6792

Change-Id: I9f3be5304917215283643385ba4a216023c822ab
Reviewed-on: https://chromium-review.googlesource.com/725800
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48732}
parent 6f93d59d
......@@ -945,13 +945,13 @@ static int TranslatePosition(int original_position,
return original_position + position_diff;
}
void TranslateSourcePositionTable(Handle<AbstractCode> code,
void TranslateSourcePositionTable(Handle<BytecodeArray> code,
Handle<JSArray> position_change_array) {
Isolate* isolate = code->GetIsolate();
Zone zone(isolate->allocator(), ZONE_NAME);
SourcePositionTableBuilder builder(&zone);
Handle<ByteArray> source_position_table(code->source_position_table());
Handle<ByteArray> source_position_table(code->SourcePositionTable());
for (SourcePositionTableIterator iterator(*source_position_table);
!iterator.done(); iterator.Advance()) {
SourcePosition position = iterator.source_position();
......@@ -962,7 +962,7 @@ void TranslateSourcePositionTable(Handle<AbstractCode> code,
}
Handle<ByteArray> new_source_position_table(
builder.ToSourcePositionTable(isolate, code));
builder.ToSourcePositionTable(isolate, Handle<AbstractCode>::cast(code)));
code->set_source_position_table(*new_source_position_table);
}
} // namespace
......@@ -985,9 +985,8 @@ void LiveEdit::PatchFunctionPositions(Handle<JSArray> shared_info_array,
info->set_function_token_position(new_function_token_pos);
if (info->HasBytecodeArray()) {
TranslateSourcePositionTable(
Handle<AbstractCode>(AbstractCode::cast(info->bytecode_array())),
position_change_array);
TranslateSourcePositionTable(handle(info->bytecode_array()),
position_change_array);
}
if (info->HasBreakInfo()) {
// Existing break points will be re-applied. Reset the debug info here.
......
......@@ -42,14 +42,6 @@ ByteArray* AbstractCode::source_position_table() {
}
}
void AbstractCode::set_source_position_table(ByteArray* source_position_table) {
if (IsCode()) {
GetCode()->set_source_position_table(source_position_table);
} else {
GetBytecodeArray()->set_source_position_table(source_position_table);
}
}
Object* AbstractCode::stack_frame_cache() {
Object* maybe_table;
if (IsCode()) {
......
......@@ -560,9 +560,6 @@ class AbstractCode : public HeapObject {
// Return the source position table.
inline ByteArray* source_position_table();
// Set the source position table.
inline void set_source_position_table(ByteArray* source_position_table);
inline Object* stack_frame_cache();
static void SetStackFrameCache(Handle<AbstractCode> abstract_code,
Handle<UnseededNumberDictionary> cache);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment