Skip to content

Commit fcbd8db

Browse files
committed
deps: patch V8 to 13.6.233.17
Refs: v8/v8@13.6.233.10...13.6.233.17 PR-URL: #60712 Reviewed-By: Richard Lau <richard.lau@ibm.com>
1 parent 6cd9bdc commit fcbd8db

16 files changed

+175
-28
lines changed

deps/v8/PRESUBMIT.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ def FilterJSFile(affected_file):
136136
input_api, output_api, bot_allowlist=[
137137
'v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com',
138138
'v8-ci-test262-import-export@chops-service-accounts.iam.gserviceaccount.com',
139+
'chrome-cherry-picker@chops-service-accounts.iam.gserviceaccount.com',
139140
]))
140141
return results
141142

deps/v8/include/v8-version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 13
1212
#define V8_MINOR_VERSION 6
1313
#define V8_BUILD_NUMBER 233
14-
#define V8_PATCH_LEVEL 10
14+
#define V8_PATCH_LEVEL 17
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

deps/v8/infra/mb/mb_config.pyl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@
953953
},
954954

955955
'no_reclient': {
956-
'gn_args': 'use_remoteexec=false',
956+
'gn_args': 'use_remoteexec=false use_siso=false',
957957
},
958958

959959
'no_sandbox': {
@@ -968,8 +968,11 @@
968968
'gn_args': 'v8_use_perfetto=true',
969969
},
970970

971+
# TODO(https://crbug.com/414724525): Temporarily use the reclient and siso
972+
# configs synonym. In a follow up we'll drop the reclient parts and replace
973+
# them with SISO configs.
971974
'reclient': {
972-
'gn_args': 'use_remoteexec=true',
975+
'gn_args': 'use_remoteexec=true use_siso=true',
973976
},
974977

975978
'release': {

deps/v8/src/compiler/representation-change.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,12 @@ Node* RepresentationChanger::GetWord64RepresentationFor(
13231323
}
13241324
} else if (output_rep == MachineRepresentation::kTaggedSigned) {
13251325
if (output_type.Is(Type::SignedSmall())) {
1326-
op = simplified()->ChangeTaggedSignedToInt64();
1326+
if (output_type.IsRange() && output_type.AsRange()->Min() >= 0) {
1327+
node = InsertChangeTaggedSignedToInt32(node);
1328+
op = machine()->ChangeUint32ToUint64();
1329+
} else {
1330+
op = simplified()->ChangeTaggedSignedToInt64();
1331+
}
13271332
} else {
13281333
return TypeError(node, output_rep, output_type,
13291334
MachineRepresentation::kWord64);

deps/v8/src/compiler/turboshaft/late-load-elimination-reducer.cc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,11 +409,17 @@ void LateLoadEliminationAnalyzer::ProcessStore(OpIndex op_idx,
409409
non_aliasing_objects_.Set(value, false);
410410
}
411411

412-
// If we just stored a map, invalidate the maps for this base.
412+
// If we just stored a map, invalidate all object_maps_.
413413
if (store.offset == HeapObject::kMapOffset && !store.index().valid()) {
414-
if (object_maps_.HasKeyFor(store.base())) {
415-
TRACE(">> Wiping map\n");
416-
object_maps_.Set(store.base(), MapMaskAndOr{});
414+
// TODO(dmercadier): can we only do this for objects that are potentially
415+
// aliasing with the `base` (based on their maps and the maps of `base`)?
416+
// Also, it might be worth to record a new map if this is actually a map
417+
// store.
418+
// TODO(dmercadier): do this only if `value` is a Constant with kind
419+
// kHeapObject, since all map stores should store a known constant maps.
420+
TRACE(">> Wiping all maps\n");
421+
for (auto it : object_maps_) {
422+
object_maps_.Set(it.second, MapMaskAndOr{});
417423
}
418424
}
419425
}

deps/v8/src/compiler/turboshaft/snapshot-table-opindex.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ class SparseOpIndexSnapshotTable : public SnapshotTable<Value, KeyData> {
6060
return std::nullopt;
6161
}
6262

63+
auto begin() { return indices_to_keys_.begin(); }
64+
auto end() { return indices_to_keys_.end(); }
65+
6366
private:
6467
Key GetOrCreateKey(OpIndex idx) {
6568
auto it = indices_to_keys_.find(idx);

deps/v8/src/compiler/turboshaft/store-store-elimination-phase.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
namespace v8::internal::compiler::turboshaft {
1919

2020
void StoreStoreEliminationPhase::Run(PipelineData* data, Zone* temp_zone) {
21+
UnparkedScopeIfNeeded unparked_scope(
22+
data->broker(), v8_flags.turboshaft_trace_load_elimination);
23+
2124
turboshaft::CopyingPhase<
2225
LoopStackCheckElisionReducer, StoreStoreEliminationReducer,
2326
LateLoadEliminationReducer, MachineOptimizationReducer,

deps/v8/src/compiler/turboshaft/store-store-elimination-reducer-inl.h

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,11 @@ class RedundantStoreAnalysis {
325325
// TODO(nicohartmann@): Use the new effect flags to distinguish heap
326326
// access once available.
327327
const bool is_on_heap_store = store.kind.tagged_base;
328-
const bool is_field_store = !store.index().valid();
328+
const bool is_fixed_offset_store = !store.index().valid();
329329
const uint8_t size = store.stored_rep.SizeInBytes();
330-
// For now we consider only stores of fields of objects on the heap.
331-
if (is_on_heap_store && is_field_store) {
330+
// For now we consider only stores of fixed offsets of objects on the
331+
// heap.
332+
if (is_on_heap_store && is_fixed_offset_store) {
332333
bool is_eliminable_store = false;
333334
switch (table_.GetObservability(store.base(), store.offset, size)) {
334335
case StoreObservability::kUnobservable:
@@ -415,11 +416,16 @@ class RedundantStoreAnalysis {
415416
// TODO(nicohartmann@): Use the new effect flags to distinguish heap
416417
// access once available.
417418
const bool is_on_heap_load = load.kind.tagged_base;
418-
const bool is_field_load = !load.index().valid();
419+
const bool is_fixed_offset_load = !load.index().valid();
419420
// For now we consider only loads of fields of objects on the heap.
420-
if (is_on_heap_load && is_field_load) {
421-
table_.MarkPotentiallyAliasingStoresAsObservable(load.base(),
422-
load.offset);
421+
if (is_on_heap_load) {
422+
if (is_fixed_offset_load) {
423+
table_.MarkPotentiallyAliasingStoresAsObservable(load.base(),
424+
load.offset);
425+
} else {
426+
// A dynamically indexed load might alias any fixed offset.
427+
table_.MarkAllStoresAsObservable();
428+
}
423429
}
424430
break;
425431
}

deps/v8/src/flags/flag-definitions.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,6 +1618,8 @@ DEFINE_BOOL_READONLY(turboshaft_trace_emitted, false,
16181618
"trace emitted Turboshaft instructions")
16191619
DEFINE_BOOL_READONLY(turboshaft_trace_intermediate_reductions, false,
16201620
"trace intermediate Turboshaft reduction steps")
1621+
DEFINE_BOOL_READONLY(turboshaft_trace_load_elimination, false,
1622+
"trace Turboshaft's late load elimination")
16211623
#endif // DEBUG
16221624

16231625
DEFINE_BOOL(profile_guided_optimization, true, "profile guided optimization")

deps/v8/src/objects/js-regexp.cc

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,14 @@ bool IsLineTerminator(int c) {
190190
// WriteEscapedRegExpSource into a single function to deduplicate dispatch logic
191191
// and move related code closer to each other.
192192
template <typename Char>
193-
int CountAdditionalEscapeChars(DirectHandle<String> source,
194-
bool* needs_escapes_out) {
193+
uint32_t CountAdditionalEscapeChars(DirectHandle<String> source,
194+
bool* needs_escapes_out) {
195195
DisallowGarbageCollection no_gc;
196-
int escapes = 0;
196+
uint32_t escapes = 0;
197+
// The maximum growth-factor is 5 (for \u2028 and \u2029). Make sure that we
198+
// won't overflow |escapes| given the current constraints on string length.
199+
static_assert(uint64_t{String::kMaxLength} * 5 <
200+
std::numeric_limits<decltype(escapes)>::max());
197201
bool needs_escapes = false;
198202
bool in_character_class = false;
199203
base::Vector<const Char> src = source->GetCharVector<Char>(no_gc);
@@ -232,14 +236,14 @@ int CountAdditionalEscapeChars(DirectHandle<String> source,
232236
}
233237
}
234238
DCHECK(!in_character_class);
235-
DCHECK_GE(escapes, 0);
236239
DCHECK_IMPLIES(escapes != 0, needs_escapes);
237240
*needs_escapes_out = needs_escapes;
238241
return escapes;
239242
}
240243

241244
template <typename Char>
242-
void WriteStringToCharVector(base::Vector<Char> v, int* d, const char* string) {
245+
void WriteStringToCharVector(base::Vector<Char> v, uint32_t* d,
246+
const char* string) {
243247
int s = 0;
244248
while (string[s] != '\0') v[(*d)++] = string[s++];
245249
}
@@ -250,21 +254,21 @@ DirectHandle<StringType> WriteEscapedRegExpSource(
250254
DisallowGarbageCollection no_gc;
251255
base::Vector<const Char> src = source->GetCharVector<Char>(no_gc);
252256
base::Vector<Char> dst(result->GetChars(no_gc), result->length());
253-
int s = 0;
254-
int d = 0;
257+
uint32_t s = 0;
258+
uint32_t d = 0;
255259
bool in_character_class = false;
256-
while (s < src.length()) {
260+
while (s < src.size()) {
257261
const Char c = src[s];
258262
if (c == '\\') {
259-
if (s + 1 < src.length() && IsLineTerminator(src[s + 1])) {
263+
if (s + 1 < src.size() && IsLineTerminator(src[s + 1])) {
260264
// This '\' is ignored since the next character itself will be escaped.
261265
s++;
262266
continue;
263267
} else {
264268
// Escape. Copy this and next character.
265269
dst[d++] = src[s++];
266270
}
267-
if (s == src.length()) break;
271+
if (s == src.size()) break;
268272
} else if (c == '/' && !in_character_class) {
269273
// Not escaped forward-slash needs escape.
270274
dst[d++] = '\\';
@@ -304,11 +308,13 @@ MaybeDirectHandle<String> EscapeRegExpSource(Isolate* isolate,
304308
if (source->length() == 0) return isolate->factory()->query_colon_string();
305309
bool one_byte = String::IsOneByteRepresentationUnderneath(*source);
306310
bool needs_escapes = false;
307-
int additional_escape_chars =
311+
uint32_t additional_escape_chars =
308312
one_byte ? CountAdditionalEscapeChars<uint8_t>(source, &needs_escapes)
309313
: CountAdditionalEscapeChars<base::uc16>(source, &needs_escapes);
310314
if (!needs_escapes) return source;
311-
int length = source->length() + additional_escape_chars;
315+
DCHECK_LE(static_cast<uint64_t>(source->length()) + additional_escape_chars,
316+
std::numeric_limits<uint32_t>::max());
317+
uint32_t length = source->length() + additional_escape_chars;
312318
if (one_byte) {
313319
DirectHandle<SeqOneByteString> result;
314320
ASSIGN_RETURN_ON_EXCEPTION(isolate, result,

0 commit comments

Comments
 (0)