Title: [226311] trunk/Source/_javascript_Core
Revision
226311
Author
[email protected]
Date
2017-12-30 11:05:32 -0800 (Sat, 30 Dec 2017)

Log Message

[JSC] Remove unused JSTypes
https://bugs.webkit.org/show_bug.cgi?id=181184

Reviewed by Saam Barati.

JSType includes some unused types such as NullType. They are for
primitive values in old days. But now JSType is only used for JSCells.

* runtime/JSType.h:
* runtime/TypedArrayType.cpp:
(JSC::typeForTypedArrayType):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (226310 => 226311)


--- trunk/Source/_javascript_Core/ChangeLog	2017-12-29 07:52:24 UTC (rev 226310)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-12-30 19:05:32 UTC (rev 226311)
@@ -1,3 +1,17 @@
+2017-12-30  Yusuke Suzuki  <[email protected]>
+
+        [JSC] Remove unused JSTypes
+        https://bugs.webkit.org/show_bug.cgi?id=181184
+
+        Reviewed by Saam Barati.
+
+        JSType includes some unused types such as NullType. They are for
+        primitive values in old days. But now JSType is only used for JSCells.
+
+        * runtime/JSType.h:
+        * runtime/TypedArrayType.cpp:
+        (JSC::typeForTypedArrayType):
+
 2017-12-28  Saam Barati  <[email protected]>
 
         Remove op_assert and make @assert in builtins a function call so we have DFG/FTL coverage for builtins that use @assert in debug builds

Modified: trunk/Source/_javascript_Core/runtime/JSType.h (226310 => 226311)


--- trunk/Source/_javascript_Core/runtime/JSType.h	2017-12-29 07:52:24 UTC (rev 226310)
+++ trunk/Source/_javascript_Core/runtime/JSType.h	2017-12-30 19:05:32 UTC (rev 226311)
@@ -23,12 +23,6 @@
 namespace JSC {
 
 enum JSType : uint8_t {
-    UnspecifiedType,
-    UndefinedType,
-    BooleanType,
-    NumberType,
-    NullType,
-
     // The CellType value must come before any JSType that is a JSCell.
     CellType,
     StringType,
@@ -38,13 +32,13 @@
     CustomGetterSetterType,
     APIValueWrapperType,
 
-    EvalExecutableType,
     ProgramExecutableType,
     ModuleProgramExecutableType,
+    EvalExecutableType,
     FunctionExecutableType,
-    WebAssemblyExecutableType,
 
     UnlinkedFunctionExecutableType,
+
     UnlinkedProgramCodeBlockType,
     UnlinkedModuleProgramCodeBlockType,
     UnlinkedEvalCodeBlockType,
@@ -68,6 +62,7 @@
     WithScopeType,
     DirectArgumentsType,
     ScopedArgumentsType,
+    ClonedArgumentsType,
 
     ArrayType,
     DerivedArrayType,
@@ -101,9 +96,6 @@
     JSWeakSetType,
 
     WebAssemblyFunctionType,
-
-    ClonedArgumentsType,
-
     WebAssemblyToJSCalleeType,
 
     LastJSCObjectType = WebAssemblyToJSCalleeType,

Modified: trunk/Source/_javascript_Core/runtime/TypedArrayType.cpp (226310 => 226311)


--- trunk/Source/_javascript_Core/runtime/TypedArrayType.cpp	2017-12-29 07:52:24 UTC (rev 226310)
+++ trunk/Source/_javascript_Core/runtime/TypedArrayType.cpp	2017-12-30 19:05:32 UTC (rev 226311)
@@ -37,7 +37,7 @@
     switch (type) {
     case NotTypedArray:
         RELEASE_ASSERT_NOT_REACHED();
-        return UnspecifiedType;
+        return Int8ArrayType;
     case TypeInt8:
         return Int8ArrayType;
     case TypeUint8:
@@ -61,7 +61,7 @@
 
     default:
         RELEASE_ASSERT_NOT_REACHED();
-        return UnspecifiedType;
+        return Int8ArrayType;
     }
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to