Title: [241710] releases/WebKitGTK/webkit-2.24/Source/_javascript_Core
Revision
241710
Author
carlo...@webkit.org
Date
2019-02-18 08:16:36 -0800 (Mon, 18 Feb 2019)

Log Message

Merge r241644 - [JSC] Remove unused global private variables
https://bugs.webkit.org/show_bug.cgi?id=194741

Reviewed by Joseph Pecoraro.

There are some private functions and constants that are no longer referenced from builtin JS code.
This patch cleans up them.

* builtins/BuiltinNames.h:
* builtins/ObjectConstructor.js:
(entries):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/ChangeLog (241709 => 241710)


--- releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/ChangeLog	2019-02-18 16:16:32 UTC (rev 241709)
+++ releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/ChangeLog	2019-02-18 16:16:36 UTC (rev 241710)
@@ -1,5 +1,21 @@
 2019-02-15  Yusuke Suzuki  <ysuz...@apple.com>
 
+        [JSC] Remove unused global private variables
+        https://bugs.webkit.org/show_bug.cgi?id=194741
+
+        Reviewed by Joseph Pecoraro.
+
+        There are some private functions and constants that are no longer referenced from builtin JS code.
+        This patch cleans up them.
+
+        * builtins/BuiltinNames.h:
+        * builtins/ObjectConstructor.js:
+        (entries):
+        * runtime/JSGlobalObject.cpp:
+        (JSC::JSGlobalObject::init):
+
+2019-02-15  Yusuke Suzuki  <ysuz...@apple.com>
+
         [JSC] Lazily create empty RegExp
         https://bugs.webkit.org/show_bug.cgi?id=194735
 

Modified: releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/builtins/BuiltinNames.h (241709 => 241710)


--- releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/builtins/BuiltinNames.h	2019-02-18 16:16:32 UTC (rev 241709)
+++ releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/builtins/BuiltinNames.h	2019-02-18 16:16:36 UTC (rev 241710)
@@ -62,14 +62,10 @@
     macro(Number) \
     macro(Array) \
     macro(ArrayBuffer) \
-    macro(String) \
     macro(RegExp) \
-    macro(Map) \
     macro(Promise) \
     macro(Reflect) \
     macro(InternalPromise) \
-    macro(abs) \
-    macro(floor) \
     macro(trunc) \
     macro(create) \
     macro(defineProperty) \
@@ -182,14 +178,6 @@
     macro(hasOwnLengthProperty) \
     macro(importModule) \
     macro(propertyIsEnumerable) \
-    macro(WebAssembly) \
-    macro(Module) \
-    macro(Instance) \
-    macro(Memory) \
-    macro(Table) \
-    macro(CompileError) \
-    macro(LinkError) \
-    macro(RuntimeError) \
     macro(meta) \
     macro(webAssemblyCompileStreamingInternal) \
     macro(webAssemblyInstantiateStreamingInternal) \

Modified: releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/builtins/ObjectConstructor.js (241709 => 241710)


--- releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/builtins/ObjectConstructor.js	2019-02-18 16:16:32 UTC (rev 241709)
+++ releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/builtins/ObjectConstructor.js	2019-02-18 16:16:36 UTC (rev 241710)
@@ -30,7 +30,7 @@
     "use strict";
 
     var obj = @toObject(object, "Object.entries requires that input parameter not be null or undefined");
-    var names = @getOwnPropertyNames(obj);
+    var names = @Object.@getOwnPropertyNames(obj);
     var properties = [];
     for (var i = 0, length = names.length; i < length; ++i) {
         var name = names[i];

Modified: releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/runtime/JSGlobalObject.cpp (241709 => 241710)


--- releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2019-02-18 16:16:32 UTC (rev 241709)
+++ releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2019-02-18 16:16:36 UTC (rev 241710)
@@ -816,11 +816,8 @@
     JSFunction* builtinLog = JSFunction::create(vm, this, 1, vm.propertyNames->emptyIdentifier.string(), globalFuncBuiltinLog);
     JSFunction* builtinDescribe = JSFunction::create(vm, this, 1, vm.propertyNames->emptyIdentifier.string(), globalFuncBuiltinDescribe);
 
-    JSFunction* privateFuncAbs = JSFunction::create(vm, this, 0, String(), mathProtoFuncAbs, AbsIntrinsic);
-    JSFunction* privateFuncFloor = JSFunction::create(vm, this, 0, String(), mathProtoFuncFloor, FloorIntrinsic);
     JSFunction* privateFuncTrunc = JSFunction::create(vm, this, 0, String(), mathProtoFuncTrunc, TruncIntrinsic);
 
-    JSFunction* privateFuncGetOwnPropertyNames = JSFunction::create(vm, this, 0, String(), objectConstructorGetOwnPropertyNames);
     JSFunction* privateFuncPropertyIsEnumerable = JSFunction::create(vm, this, 0, String(), globalFuncPropertyIsEnumerable);
     JSFunction* privateFuncImportModule = JSFunction::create(vm, this, 0, String(), globalFuncImportModule);
     JSFunction* privateFuncTypedArrayLength = JSFunction::create(vm, this, 0, String(), typedArrayViewPrivateFuncLength);
@@ -889,7 +886,6 @@
         GlobalPropertyInfo(vm.propertyNames->NaN, jsNaN(), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->Infinity, jsNumber(std::numeric_limits<double>::infinity()), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->undefinedKeyword, jsUndefined(), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().getOwnPropertyNamesPrivateName(), privateFuncGetOwnPropertyNames, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->builtinNames().propertyIsEnumerablePrivateName(), privateFuncPropertyIsEnumerable, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->builtinNames().importModulePrivateName(), privateFuncImportModule, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->builtinNames().enqueueJobPrivateName(), JSFunction::create(vm, this, 0, String(), enqueueJob), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
@@ -907,9 +903,6 @@
         GlobalPropertyInfo(vm.propertyNames->builtinNames().BuiltinLogPrivateName(), builtinLog, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->builtinNames().BuiltinDescribePrivateName(), builtinDescribe, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->builtinNames().RegExpPrivateName(), regExpConstructor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().StringPrivateName(), stringConstructor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().absPrivateName(), privateFuncAbs, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().floorPrivateName(), privateFuncFloor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->builtinNames().truncPrivateName(), privateFuncTrunc, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->builtinNames().PromisePrivateName(), promiseConstructor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->builtinNames().ReflectPrivateName(), reflectObject, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
@@ -924,7 +917,6 @@
 
         GlobalPropertyInfo(vm.propertyNames->builtinNames().hostPromiseRejectionTrackerPrivateName(), JSFunction::create(vm, this, 2, String(), globalFuncHostPromiseRejectionTracker), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->builtinNames().InspectorInstrumentationPrivateName(), InspectorInstrumentationObject::create(vm, this, InspectorInstrumentationObject::createStructure(vm, this, m_objectPrototype.get())), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
-        GlobalPropertyInfo(vm.propertyNames->builtinNames().MapPrivateName(), mapConstructor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->builtinNames().SetPrivateName(), setConstructor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->builtinNames().thisTimeValuePrivateName(), privateFuncThisTimeValue, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
         GlobalPropertyInfo(vm.propertyNames->builtinNames().thisNumberValuePrivateName(), privateFuncThisNumberValue, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to