Skip to content

Commit eeba676

Browse files
verwaestV8 LUCI CQ
authored andcommitted
[streaming] Use UniqueIdInScript instead of StartPosition
Bug: 352682970 Change-Id: I243fa2e6c1b853c230d6e2548b74439241bf2f6b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5703781 Reviewed-by: Leszek Swirski <[email protected]> Auto-Submit: Toon Verwaest <[email protected]> Commit-Queue: Leszek Swirski <[email protected]> Commit-Queue: Toon Verwaest <[email protected]> Cr-Commit-Position: refs/heads/main@{#95029}
1 parent 778309d commit eeba676

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/codegen/compiler.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2026,11 +2026,11 @@ class ConstantPoolPointerForwarder {
20262026
if (!old_sfi->HasOuterScopeInfo()) return;
20272027
Tagged<ScopeInfo> scope_info = old_sfi->GetOuterScopeInfo();
20282028
while (true) {
2029-
if (scope_infos_to_update_.find(scope_info->StartPosition()) !=
2029+
if (scope_infos_to_update_.find(scope_info->UniqueIdInScript()) !=
20302030
scope_infos_to_update_.end()) {
20312031
return;
20322032
}
2033-
scope_infos_to_update_[scope_info->StartPosition()] =
2033+
scope_infos_to_update_[scope_info->UniqueIdInScript()] =
20342034
handle(scope_info, local_heap_);
20352035
if (!scope_info->HasOuterScopeInfo()) break;
20362036
scope_info = scope_info->OuterScopeInfo();
@@ -2059,7 +2059,7 @@ class ConstantPoolPointerForwarder {
20592059
void UpdateOuterScopeInfo(Tagged<SharedFunctionInfo> sfi) {
20602060
if (!sfi->HasOuterScopeInfo()) return;
20612061
Tagged<ScopeInfo> outer_info = sfi->GetOuterScopeInfo();
2062-
auto it = scope_infos_to_update_.find(outer_info->StartPosition());
2062+
auto it = scope_infos_to_update_.find(outer_info->UniqueIdInScript());
20632063
if (it == scope_infos_to_update_.end()) return;
20642064
if (outer_info == *it->second) return;
20652065
VerifyScopeInfo(outer_info, *it->second);
@@ -2111,7 +2111,7 @@ class ConstantPoolPointerForwarder {
21112111
template <typename TArray>
21122112
void VisitScopeInfo(Tagged<TArray> constant_pool, int i,
21132113
Tagged<ScopeInfo> scope_info) {
2114-
auto it = scope_infos_to_update_.find(scope_info->StartPosition());
2114+
auto it = scope_infos_to_update_.find(scope_info->UniqueIdInScript());
21152115
// Try to replace the scope info itself with an already existing version.
21162116
if (it != scope_infos_to_update_.end()) {
21172117
if (scope_info != *it->second) {
@@ -2124,7 +2124,7 @@ class ConstantPoolPointerForwarder {
21242124
// info. We only need to look at the direct outer scope info since we'll
21252125
// process all scope infos that are created by this compilation task.
21262126
Tagged<ScopeInfo> outer = scope_info->OuterScopeInfo();
2127-
it = scope_infos_to_update_.find(outer->StartPosition());
2127+
it = scope_infos_to_update_.find(outer->UniqueIdInScript());
21282128
if (it != scope_infos_to_update_.end() && outer != *it->second) {
21292129
VerifyScopeInfo(outer, *it->second);
21302130
scope_info->set_outer_scope_info(*it->second);

0 commit comments

Comments
 (0)