Commit a7189c43 authored by Jaroslav Sevcik's avatar Jaroslav Sevcik Committed by Commit Bot

Revert "[turbofan] Serialize source position table"

This reverts commit 16c1cb83.

Reason for revert: ClusterFuzz failure

Original change's description:
> [turbofan] Serialize source position table
> 
> ... for concurrent graph building.
> 
> Bug: v8:7790
> Change-Id: I55eb419bda843670eff7de31e942dd8406c792f9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1682027
> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#62455}

TBR=jarin@chromium.org,neis@chromium.org,mslekova@chromium.org

Change-Id: Ib8ecd9f4e654b34036ad3157910e19d8ef034c52
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7790
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1682571Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62456}
parent 16c1cb83
......@@ -958,8 +958,8 @@ BytecodeGraphBuilder::BytecodeGraphBuilder(
bytecode_array.parameter_count(), bytecode_array.register_count(),
shared_info)),
source_position_iterator_(
Vector<const byte>(bytecode_array.source_positions_address(),
bytecode_array.source_positions_size())),
handle(bytecode_array.object()->SourcePositionTableIfCollected(),
isolate())),
bytecode_iterator_(
base::make_unique<OffHeapBytecodeArray>(bytecode_array)),
bytecode_analysis_(
......
......@@ -1358,22 +1358,9 @@ class BytecodeArrayData : public FixedArrayBaseData {
constant_pool_.push_back(broker->GetOrCreateData(constant_pool->get(i)));
}
Handle<ByteArray> source_position_table(
bytecode_array->SourcePositionTableIfCollected(), broker->isolate());
source_positions_.reserve(source_position_table->length());
for (int i = 0; i < source_position_table->length(); i++) {
source_positions_.push_back(source_position_table->get(i));
}
is_serialized_for_compilation_ = true;
}
const byte* source_positions_address() const {
return source_positions_.data();
}
size_t source_positions_size() const { return source_positions_.size(); }
BytecodeArrayData(JSHeapBroker* broker, ObjectData** storage,
Handle<BytecodeArray> object)
: FixedArrayBaseData(broker, storage, object),
......@@ -1382,7 +1369,6 @@ class BytecodeArrayData : public FixedArrayBaseData {
incoming_new_target_or_generator_register_(
object->incoming_new_target_or_generator_register()),
bytecodes_(broker->zone()),
source_positions_(broker->zone()),
constant_pool_(broker->zone()) {}
private:
......@@ -1392,7 +1378,6 @@ class BytecodeArrayData : public FixedArrayBaseData {
bool is_serialized_for_compilation_ = false;
ZoneVector<uint8_t> bytecodes_;
ZoneVector<uint8_t> source_positions_;
ZoneVector<ObjectData*> constant_pool_;
};
......@@ -2766,22 +2751,6 @@ void BytecodeArrayRef::SerializeForCompilation() {
data()->AsBytecodeArray()->SerializeForCompilation(broker());
}
const byte* BytecodeArrayRef::source_positions_address() const {
if (broker()->mode() == JSHeapBroker::kDisabled) {
AllowHandleDereference allow_handle_dereference;
return object()->SourcePositionTableIfCollected().GetDataStartAddress();
}
return data()->AsBytecodeArray()->source_positions_address();
}
int BytecodeArrayRef::source_positions_size() const {
if (broker()->mode() == JSHeapBroker::kDisabled) {
AllowHandleDereference allow_handle_dereference;
return object()->SourcePositionTableIfCollected().length();
}
return static_cast<int>(data()->AsBytecodeArray()->source_positions_size());
}
#define IF_BROKER_DISABLED_ACCESS_HANDLE_C(holder, name) \
if (broker()->mode() == JSHeapBroker::kDisabled) { \
AllowHandleAllocation handle_allocation; \
......
......@@ -611,10 +611,6 @@ class BytecodeArrayRef : public FixedArrayBaseRef {
uint8_t get(int index) const;
Address GetFirstBytecodeAddress() const;
// Source position table.
const byte* source_positions_address() const;
int source_positions_size() const;
// Constant pool access.
Handle<Object> GetConstantAtIndex(int index) const;
bool IsConstantAtIndexSmi(int index) const;
......
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