Skip to content

Commit 6afc0dc

Browse files
mi-acCommit bot
authored andcommitted
Revert of Reland "Wrap v8natives.js into a function." (patchset v8#2 id:20001 of https://codereview.chromium.org/1123703002/)
Reason for revert: [Sheriff] Speculative revert for braking arm64 nosnap: http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20nosnap%20-%20debug%20-%202/builds/2314 (reverted already titzer's CL which didn't help) Original issue's description: > Reland "Wrap v8natives.js into a function." > > Committed: https://crrev.com/72ab42172979b60a1b784ea0c6a495d7ee2bba67 > Cr-Commit-Position: refs/heads/master@{#28193} TBR=jkummerow@chromium.org,yangguo@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1127543003 Cr-Commit-Position: refs/heads/master@{#28208}
1 parent 17dca16 commit 6afc0dc

34 files changed

Lines changed: 372 additions & 435 deletions

src/api.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3589,7 +3589,7 @@ MaybeLocal<Value> v8::Object::GetOwnPropertyDescriptor(Local<Context> context,
35893589
i::Handle<i::Object> args[] = { obj, key_name };
35903590
i::Handle<i::Object> result;
35913591
has_pending_exception =
3592-
!CallV8HeapFunction(isolate, "$objectGetOwnPropertyDescriptor",
3592+
!CallV8HeapFunction(isolate, "ObjectGetOwnPropertyDescriptor",
35933593
isolate->factory()->undefined_value(),
35943594
arraysize(args), args).ToHandle(&result);
35953595
RETURN_ON_FAILED_EXECUTION(Value);

src/array-iterator.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,16 @@ function ArrayKeys() {
125125
%FunctionSetPrototype(ArrayIterator, new GlobalObject());
126126
%FunctionSetInstanceClassName(ArrayIterator, 'Array Iterator');
127127

128-
$installFunctions(ArrayIterator.prototype, DONT_ENUM, [
128+
InstallFunctions(ArrayIterator.prototype, DONT_ENUM, [
129129
'next', ArrayIteratorNext
130130
]);
131-
$setFunctionName(ArrayIteratorIterator, symbolIterator);
131+
SetFunctionName(ArrayIteratorIterator, symbolIterator);
132132
%AddNamedProperty(ArrayIterator.prototype, symbolIterator,
133133
ArrayIteratorIterator, DONT_ENUM);
134134
%AddNamedProperty(ArrayIterator.prototype, symbolToStringTag,
135135
"Array Iterator", READ_ONLY | DONT_ENUM);
136136

137-
$installFunctions(GlobalArray.prototype, DONT_ENUM, [
137+
InstallFunctions(GlobalArray.prototype, DONT_ENUM, [
138138
// No 'values' since it breaks webcompat: http://crbug.com/409858
139139
'entries', ArrayEntries,
140140
'keys', ArrayKeys

src/array.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ function ArrayToString() {
372372
func = array.join;
373373
}
374374
if (!IS_SPEC_FUNCTION(func)) {
375-
return %_CallFunction(array, $objectToString);
375+
return %_CallFunction(array, ObjectToString);
376376
}
377377
return %_CallFunction(array, func);
378378
}
@@ -447,7 +447,7 @@ function ArrayPop() {
447447

448448
n--;
449449
var value = array[n];
450-
$delete(array, ToName(n), true);
450+
Delete(array, ToName(n), true);
451451
array.length = n;
452452
return value;
453453
}
@@ -620,7 +620,7 @@ function ArrayShift() {
620620
return;
621621
}
622622

623-
if ($objectIsSealed(array)) throw MakeTypeError(kArrayFunctionsOnSealed);
623+
if (ObjectIsSealed(array)) throw MakeTypeError(kArrayFunctionsOnSealed);
624624

625625
if (%IsObserved(array))
626626
return ObservedArrayShift.call(array, len);
@@ -671,7 +671,7 @@ function ArrayUnshift(arg1) { // length == 1
671671
var num_arguments = %_ArgumentsLength();
672672

673673
if (len > 0 && UseSparseVariant(array, len, IS_ARRAY(array), len) &&
674-
!$objectIsSealed(array)) {
674+
!ObjectIsSealed(array)) {
675675
SparseMove(array, 0, 0, len, num_arguments);
676676
} else {
677677
SimpleMove(array, 0, 0, len, num_arguments);
@@ -817,9 +817,9 @@ function ArraySplice(start, delete_count) {
817817
deleted_elements.length = del_count;
818818
var num_elements_to_add = num_arguments > 2 ? num_arguments - 2 : 0;
819819

820-
if (del_count != num_elements_to_add && $objectIsSealed(array)) {
820+
if (del_count != num_elements_to_add && ObjectIsSealed(array)) {
821821
throw MakeTypeError(kArrayFunctionsOnSealed);
822-
} else if (del_count > 0 && $objectIsFrozen(array)) {
822+
} else if (del_count > 0 && ObjectIsFrozen(array)) {
823823
throw MakeTypeError(kArrayFunctionsOnFrozen);
824824
}
825825

@@ -1523,7 +1523,7 @@ var unscopables = {
15231523
DONT_ENUM | READ_ONLY);
15241524

15251525
// Set up non-enumerable functions on the Array object.
1526-
$installFunctions(GlobalArray, DONT_ENUM, [
1526+
InstallFunctions(GlobalArray, DONT_ENUM, [
15271527
"isArray", ArrayIsArray
15281528
]);
15291529

@@ -1544,7 +1544,7 @@ var getFunction = function(name, jsBuiltin, len) {
15441544
// set their names.
15451545
// Manipulate the length of some of the functions to meet
15461546
// expectations set by ECMA-262 or Mozilla.
1547-
$installFunctions(GlobalArray.prototype, DONT_ENUM, [
1547+
InstallFunctions(GlobalArray.prototype, DONT_ENUM, [
15481548
"toString", getFunction("toString", ArrayToString),
15491549
"toLocaleString", getFunction("toLocaleString", ArrayToLocaleString),
15501550
"join", getFunction("join", ArrayJoin),
@@ -1573,7 +1573,7 @@ $installFunctions(GlobalArray.prototype, DONT_ENUM, [
15731573
// The internal Array prototype doesn't need to be fancy, since it's never
15741574
// exposed to user code.
15751575
// Adding only the functions that are actually used.
1576-
$setUpLockedPrototype(InternalArray, GlobalArray(), [
1576+
SetUpLockedPrototype(InternalArray, GlobalArray(), [
15771577
"concat", getFunction("concat", ArrayConcatJS),
15781578
"indexOf", getFunction("indexOf", ArrayIndexOf),
15791579
"join", getFunction("join", ArrayJoin),
@@ -1583,7 +1583,7 @@ $setUpLockedPrototype(InternalArray, GlobalArray(), [
15831583
"splice", getFunction("splice", ArraySplice)
15841584
]);
15851585

1586-
$setUpLockedPrototype(InternalPackedArray, GlobalArray(), [
1586+
SetUpLockedPrototype(InternalPackedArray, GlobalArray(), [
15871587
"join", getFunction("join", ArrayJoin),
15881588
"pop", getFunction("pop", ArrayPop),
15891589
"push", getFunction("push", ArrayPush),

src/arraybuffer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ function ArrayBufferIsViewJS(obj) {
8383
%AddNamedProperty(GlobalArrayBuffer.prototype,
8484
symbolToStringTag, "ArrayBuffer", DONT_ENUM | READ_ONLY);
8585

86-
$installGetter(GlobalArrayBuffer.prototype, "byteLength", ArrayBufferGetByteLen);
86+
InstallGetter(GlobalArrayBuffer.prototype, "byteLength", ArrayBufferGetByteLen);
8787

88-
$installFunctions(GlobalArrayBuffer, DONT_ENUM, [
88+
InstallFunctions(GlobalArrayBuffer, DONT_ENUM, [
8989
"isView", ArrayBufferIsViewJS
9090
]);
9191

92-
$installFunctions(GlobalArrayBuffer.prototype, DONT_ENUM, [
92+
InstallFunctions(GlobalArrayBuffer.prototype, DONT_ENUM, [
9393
"slice", ArrayBufferSlice
9494
]);
9595

src/bootstrapper.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,9 +1573,9 @@ void Genesis::InstallNativeFunctions() {
15731573
INSTALL_NATIVE(JSFunction, "ToInt32", to_int32_fun);
15741574
INSTALL_NATIVE(JSFunction, "ToLength", to_length_fun);
15751575

1576-
INSTALL_NATIVE(JSFunction, "$globalEval", global_eval_fun);
1576+
INSTALL_NATIVE(JSFunction, "GlobalEval", global_eval_fun);
15771577
INSTALL_NATIVE(JSFunction, "$getStackTraceLine", get_stack_trace_line_fun);
1578-
INSTALL_NATIVE(JSFunction, "$toCompletePropertyDescriptor",
1578+
INSTALL_NATIVE(JSFunction, "ToCompletePropertyDescriptor",
15791579
to_complete_property_descriptor);
15801580

15811581
INSTALL_NATIVE(Symbol, "$promiseStatus", promise_status);

src/collection-iterator.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,17 @@ function SetValues() {
7676
%SetCode(SetIterator, SetIteratorConstructor);
7777
%FunctionSetPrototype(SetIterator, new GlobalObject());
7878
%FunctionSetInstanceClassName(SetIterator, 'Set Iterator');
79-
$installFunctions(SetIterator.prototype, DONT_ENUM, [
79+
InstallFunctions(SetIterator.prototype, DONT_ENUM, [
8080
'next', SetIteratorNextJS
8181
]);
8282

83-
$setFunctionName(SetIteratorSymbolIterator, symbolIterator);
83+
SetFunctionName(SetIteratorSymbolIterator, symbolIterator);
8484
%AddNamedProperty(SetIterator.prototype, symbolIterator,
8585
SetIteratorSymbolIterator, DONT_ENUM);
8686
%AddNamedProperty(SetIterator.prototype, symbolToStringTag,
8787
"Set Iterator", READ_ONLY | DONT_ENUM);
8888

89-
$installFunctions(GlobalSet.prototype, DONT_ENUM, [
89+
InstallFunctions(GlobalSet.prototype, DONT_ENUM, [
9090
'entries', SetEntries,
9191
'keys', SetValues,
9292
'values', SetValues
@@ -166,18 +166,18 @@ function MapValues() {
166166
%SetCode(MapIterator, MapIteratorConstructor);
167167
%FunctionSetPrototype(MapIterator, new GlobalObject());
168168
%FunctionSetInstanceClassName(MapIterator, 'Map Iterator');
169-
$installFunctions(MapIterator.prototype, DONT_ENUM, [
169+
InstallFunctions(MapIterator.prototype, DONT_ENUM, [
170170
'next', MapIteratorNextJS
171171
]);
172172

173-
$setFunctionName(MapIteratorSymbolIterator, symbolIterator);
173+
SetFunctionName(MapIteratorSymbolIterator, symbolIterator);
174174
%AddNamedProperty(MapIterator.prototype, symbolIterator,
175175
MapIteratorSymbolIterator, DONT_ENUM);
176176
%AddNamedProperty(MapIterator.prototype, symbolToStringTag,
177177
"Map Iterator", READ_ONLY | DONT_ENUM);
178178

179179

180-
$installFunctions(GlobalMap.prototype, DONT_ENUM, [
180+
InstallFunctions(GlobalMap.prototype, DONT_ENUM, [
181181
'entries', MapEntries,
182182
'keys', MapKeys,
183183
'values', MapValues

src/collection.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ function HashToEntry(table, hash, numBuckets) {
2222

2323

2424
function SetFindEntry(table, numBuckets, key, hash) {
25-
var keyIsNaN = $numberIsNaN(key);
25+
var keyIsNaN = NumberIsNaN(key);
2626
for (var entry = HashToEntry(table, hash, numBuckets);
2727
entry !== NOT_FOUND;
2828
entry = ORDERED_HASH_SET_CHAIN_AT(table, entry, numBuckets)) {
2929
var candidate = ORDERED_HASH_SET_KEY_AT(table, entry, numBuckets);
3030
if (key === candidate) {
3131
return entry;
3232
}
33-
if (keyIsNaN && $numberIsNaN(candidate)) {
33+
if (keyIsNaN && NumberIsNaN(candidate)) {
3434
return entry;
3535
}
3636
}
@@ -40,15 +40,15 @@ function SetFindEntry(table, numBuckets, key, hash) {
4040

4141

4242
function MapFindEntry(table, numBuckets, key, hash) {
43-
var keyIsNaN = $numberIsNaN(key);
43+
var keyIsNaN = NumberIsNaN(key);
4444
for (var entry = HashToEntry(table, hash, numBuckets);
4545
entry !== NOT_FOUND;
4646
entry = ORDERED_HASH_MAP_CHAIN_AT(table, entry, numBuckets)) {
4747
var candidate = ORDERED_HASH_MAP_KEY_AT(table, entry, numBuckets);
4848
if (key === candidate) {
4949
return entry;
5050
}
51-
if (keyIsNaN && $numberIsNaN(candidate)) {
51+
if (keyIsNaN && NumberIsNaN(candidate)) {
5252
return entry;
5353
}
5454
}
@@ -239,8 +239,8 @@ function SetForEach(f, receiver) {
239239
%FunctionSetLength(SetForEach, 1);
240240

241241
// Set up the non-enumerable functions on the Set prototype object.
242-
$installGetter(GlobalSet.prototype, "size", SetGetSize);
243-
$installFunctions(GlobalSet.prototype, DONT_ENUM, [
242+
InstallGetter(GlobalSet.prototype, "size", SetGetSize);
243+
InstallFunctions(GlobalSet.prototype, DONT_ENUM, [
244244
"add", SetAdd,
245245
"has", SetHas,
246246
"delete", SetDelete,
@@ -427,8 +427,8 @@ function MapForEach(f, receiver) {
427427
%FunctionSetLength(MapForEach, 1);
428428

429429
// Set up the non-enumerable functions on the Map prototype object.
430-
$installGetter(GlobalMap.prototype, "size", MapGetSize);
431-
$installFunctions(GlobalMap.prototype, DONT_ENUM, [
430+
InstallGetter(GlobalMap.prototype, "size", MapGetSize);
431+
InstallFunctions(GlobalMap.prototype, DONT_ENUM, [
432432
"get", MapGet,
433433
"set", MapSet,
434434
"has", MapHas,

src/date.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ function CreateDate(time) {
760760
%FunctionSetPrototype(GlobalDate, new GlobalDate(NAN));
761761

762762
// Set up non-enumerable properties of the Date object itself.
763-
$installFunctions(GlobalDate, DONT_ENUM, [
763+
InstallFunctions(GlobalDate, DONT_ENUM, [
764764
"UTC", DateUTC,
765765
"parse", DateParse,
766766
"now", DateNow
@@ -771,7 +771,7 @@ $installFunctions(GlobalDate, DONT_ENUM, [
771771

772772
// Set up non-enumerable functions of the Date prototype object and
773773
// set their names.
774-
$installFunctions(GlobalDate.prototype, DONT_ENUM, [
774+
InstallFunctions(GlobalDate.prototype, DONT_ENUM, [
775775
"toString", DateToString,
776776
"toDateString", DateToDateString,
777777
"toTimeString", DateToTimeString,

src/generator.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function GeneratorObjectIterator() {
7272

7373

7474
function GeneratorFunctionConstructor(arg1) { // length == 1
75-
var source = $newFunctionString(arguments, 'function*');
75+
var source = NewFunctionString(arguments, 'function*');
7676
var global_proxy = %GlobalProxy(global);
7777
// Compile the string in the constructor and not a helper so that errors
7878
// appear to come from here.
@@ -90,12 +90,12 @@ function GeneratorFunctionConstructor(arg1) { // length == 1
9090

9191
// Set up non-enumerable functions on the generator prototype object.
9292
var GeneratorObjectPrototype = GeneratorFunctionPrototype.prototype;
93-
$installFunctions(GeneratorObjectPrototype,
93+
InstallFunctions(GeneratorObjectPrototype,
9494
DONT_ENUM,
9595
["next", GeneratorObjectNext,
9696
"throw", GeneratorObjectThrow]);
9797

98-
$setFunctionName(GeneratorObjectIterator, symbolIterator);
98+
SetFunctionName(GeneratorObjectIterator, symbolIterator);
9999
%AddNamedProperty(GeneratorObjectPrototype, symbolIterator,
100100
GeneratorObjectIterator, DONT_ENUM | DONT_DELETE | READ_ONLY);
101101
%AddNamedProperty(GeneratorObjectPrototype, "constructor",

src/harmony-array-includes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function ArrayIncludes(searchElement, fromIndex) {
5252
%FunctionSetLength(ArrayIncludes, 1);
5353

5454
// Set up the non-enumerable functions on the Array prototype object.
55-
$installFunctions(GlobalArray.prototype, DONT_ENUM, [
55+
InstallFunctions(GlobalArray.prototype, DONT_ENUM, [
5656
"includes", ArrayIncludes
5757
]);
5858

0 commit comments

Comments
 (0)