Skip to content

Commit

Permalink
deps: V8: cherry-pick 0f9ebbc672c7
Browse files Browse the repository at this point in the history
Original commit message:

    [flags] Remove --harmony-string-is-well-formed

    The String.prototype.isWellFormed and toWellFormed have shipped
    since M111.

    Bug: v8:13557
    Change-Id: I27e332d2fde0f9ea8ad649c016a84d2d3e0bf592
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4931269
    Reviewed-by: Shu-yu Guo <syg@chromium.org>
    Commit-Queue: Chengzhong Wu (legendecas) <legendecas@gmail.com>
    Cr-Commit-Position: refs/heads/main@{#90398}

Refs: v8/v8@0f9ebbc
PR-URL: #50867
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: #50115
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
legendecas authored and targos committed Jan 4, 2024
1 parent 782addb commit 481a901
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.9',
'v8_embedder_string': '-node.10',

##### V8 defaults for Node.js #####

Expand Down
1 change: 0 additions & 1 deletion deps/v8/src/flags/flag-definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ DEFINE_WEAK_IMPLICATION(harmony_rab_gsab_transfer, harmony_rab_gsab)
#define HARMONY_SHIPPING_BASE(V) \
V(harmony_import_assertions, "harmony import assertions") \
V(harmony_change_array_by_copy, "harmony change-Array-by-copy") \
V(harmony_string_is_well_formed, "harmony String#{is,to}WellFormed") \
V(harmony_rab_gsab, \
"harmony ResizableArrayBuffer / GrowableSharedArrayBuffer") \
V(harmony_regexp_unicode_sets, "harmony RegExp Unicode Sets") \
Expand Down
16 changes: 4 additions & 12 deletions deps/v8/src/init/bootstrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2158,6 +2158,8 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
Builtin::kStringPrototypeIncludes, 1, false);
SimpleInstallFunction(isolate_, prototype, "indexOf",
Builtin::kStringPrototypeIndexOf, 1, false);
SimpleInstallFunction(isolate(), prototype, "isWellFormed",
Builtin::kStringPrototypeIsWellFormed, 0, false);
SimpleInstallFunction(isolate_, prototype, "italics",
Builtin::kStringPrototypeItalics, 0, false);
SimpleInstallFunction(isolate_, prototype, "lastIndexOf",
Expand Down Expand Up @@ -2214,6 +2216,8 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
Builtin::kStringPrototypeStartsWith, 1, false);
SimpleInstallFunction(isolate_, prototype, "toString",
Builtin::kStringPrototypeToString, 0, true);
SimpleInstallFunction(isolate(), prototype, "toWellFormed",
Builtin::kStringPrototypeToWellFormed, 0, false);
SimpleInstallFunction(isolate_, prototype, "trim",
Builtin::kStringPrototypeTrim, 0, false);

Expand Down Expand Up @@ -5068,18 +5072,6 @@ void Genesis::InitializeGlobal_harmony_rab_gsab() {
Builtin::kSharedArrayBufferPrototypeGrow, 1, true);
}

void Genesis::InitializeGlobal_harmony_string_is_well_formed() {
if (!v8_flags.harmony_string_is_well_formed) return;
Handle<JSFunction> string_function(native_context()->string_function(),
isolate());
Handle<JSObject> string_prototype(
JSObject::cast(string_function->initial_map()->prototype()), isolate());
SimpleInstallFunction(isolate(), string_prototype, "isWellFormed",
Builtin::kStringPrototypeIsWellFormed, 0, false);
SimpleInstallFunction(isolate(), string_prototype, "toWellFormed",
Builtin::kStringPrototypeToWellFormed, 0, false);
}

void Genesis::InitializeGlobal_harmony_temporal() {
if (!v8_flags.harmony_temporal) return;
// -- T e m p o r a l
Expand Down

0 comments on commit 481a901

Please sign in to comment.