Changeset 204218 in webkit


Ignore:
Timestamp:
Aug 5, 2016 8:48:10 PM (8 years ago)
Author:
keith_miller@apple.com
Message:

Add LEBDecoder and tests
https://bugs.webkit.org/show_bug.cgi?id=160625

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Adds a new target testWASM that is currently used to test the LEB decoder.
In the future, if we add more support for WASM we will put more tests
here.

(CommandLine::CommandLine):
(printUsageStatement):
(CommandLine::parseArguments):
(runLEBTests):
(main):

Source/WTF:

Adds some LEB decoder functions to WTF. These are used in the
WASM spec to encode numbers in a semi-compressed format.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/LEBDecoder.h: Added.

(decodeUInt32):
(decodeInt32):

Location:
trunk/Source
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r204209 r204218  
     12016-08-05  Keith Miller  <keith_miller@apple.com>
     2
     3        Add LEBDecoder and tests
     4        https://bugs.webkit.org/show_bug.cgi?id=160625
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        Adds a new target testWASM that is currently used to test the LEB decoder.
     9        In the future, if we add more support for WASM we will put more tests
     10        here.
     11
     12        * JavaScriptCore.xcodeproj/project.pbxproj:
     13        * testWASM.cpp: Added.
     14        (CommandLine::CommandLine):
     15        (printUsageStatement):
     16        (CommandLine::parseArguments):
     17        (runLEBTests):
     18        (main):
     19
    1202016-08-05  Keith Miller  <keith_miller@apple.com>
    221
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r204180 r204218  
    2626                        );
    2727                        dependencies = (
     28                                539EB0831D5560F400C82EF7 /* PBXTargetDependency */,
    2829                                0F6183471C45F67A0072450B /* PBXTargetDependency */,
    2930                                0F93275D1C20BF3A00CF6564 /* PBXTargetDependency */,
     
    11831184                5370B4F61BF26205005C40FC /* AdaptiveInferredPropertyValueWatchpointBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 5370B4F41BF25EA2005C40FC /* AdaptiveInferredPropertyValueWatchpointBase.h */; };
    11841185                53917E7B1B7906FA000EBD33 /* JSGenericTypedArrayViewPrototypeFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 53917E7A1B7906E4000EBD33 /* JSGenericTypedArrayViewPrototypeFunctions.h */; };
     1186                539EB0791D55607000C82EF7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 51F0EB6105C86C6B00E6DF1B /* Foundation.framework */; };
     1187                539EB07A1D55607000C82EF7 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 932F5BD90822A1C700736975 /* JavaScriptCore.framework */; };
     1188                539EB0811D55608A00C82EF7 /* testWASM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 539EB0711D553DF800C82EF7 /* testWASM.cpp */; };
    11851189                539FB8BA1C99DA7C00940FA1 /* JSArrayInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 539FB8B91C99DA7C00940FA1 /* JSArrayInlines.h */; };
    11861190                53F6BF6D1C3F060A00F41E5D /* InternalFunctionAllocationProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 53F6BF6C1C3F060A00F41E5D /* InternalFunctionAllocationProfile.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    21522156                        remoteGlobalIDString = 0F4680A914BA7FD900BFE272;
    21532157                        remoteInfo = "LLInt Offsets";
     2158                };
     2159                539EB0821D5560F400C82EF7 /* PBXContainerItemProxy */ = {
     2160                        isa = PBXContainerItemProxy;
     2161                        containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
     2162                        proxyType = 1;
     2163                        remoteGlobalIDString = 539EB0751D55607000C82EF7;
     2164                        remoteInfo = testWASM;
    21542165                };
    21552166                5D69E911152BE5470028D720 /* PBXContainerItemProxy */ = {
     
    33453356                53917E7C1B791106000EBD33 /* JSTypedArrayViewPrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTypedArrayViewPrototype.h; sourceTree = "<group>"; };
    33463357                53917E831B791CB8000EBD33 /* TypedArrayPrototype.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = TypedArrayPrototype.js; path = builtins/TypedArrayPrototype.js; sourceTree = SOURCE_ROOT; };
     3358                539EB0711D553DF800C82EF7 /* testWASM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = testWASM.cpp; sourceTree = "<group>"; };
     3359                539EB0801D55607000C82EF7 /* testWASM */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testWASM; sourceTree = BUILT_PRODUCTS_DIR; };
    33473360                539FB8B91C99DA7C00940FA1 /* JSArrayInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSArrayInlines.h; sourceTree = "<group>"; };
    33483361                53F256E11B87E28000B4B768 /* JSTypedArrayViewPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTypedArrayViewPrototype.cpp; sourceTree = "<group>"; };
     
    44554468                        runOnlyForDeploymentPostprocessing = 0;
    44564469                };
     4470                539EB0781D55607000C82EF7 /* Frameworks */ = {
     4471                        isa = PBXFrameworksBuildPhase;
     4472                        buildActionMask = 2147483647;
     4473                        files = (
     4474                                539EB0791D55607000C82EF7 /* Foundation.framework in Frameworks */,
     4475                                539EB07A1D55607000C82EF7 /* JavaScriptCore.framework in Frameworks */,
     4476                        );
     4477                        runOnlyForDeploymentPostprocessing = 0;
     4478                };
    44574479                651122FC14046A4C002B101D /* Frameworks */ = {
    44584480                        isa = PBXFrameworksBuildPhase;
     
    45024524                                0F9327591C20BCBA00CF6564 /* dynbench */,
    45034525                                0F6183431C45F62A0072450B /* testair */,
     4526                                539EB0801D55607000C82EF7 /* testWASM */,
    45044527                        );
    45054528                        name = Products;
     
    50015024                                86D22219167EF9440024C804 /* testapi.mm */,
    50025025                                651122E5140469BA002B101D /* testRegExp.cpp */,
     5026                                539EB0711D553DF800C82EF7 /* testWASM.cpp */,
    50035027                        );
    50045028                        name = tests;
     
    83068330                        productType = "com.apple.product-type.tool";
    83078331                };
     8332                539EB0751D55607000C82EF7 /* testWASM */ = {
     8333                        isa = PBXNativeTarget;
     8334                        buildConfigurationList = 539EB07B1D55607000C82EF7 /* Build configuration list for PBXNativeTarget "testWASM" */;
     8335                        buildPhases = (
     8336                                539EB0761D55607000C82EF7 /* Sources */,
     8337                                539EB0781D55607000C82EF7 /* Frameworks */,
     8338                        );
     8339                        buildRules = (
     8340                        );
     8341                        dependencies = (
     8342                        );
     8343                        name = testWASM;
     8344                        productName = testapi;
     8345                        productReference = 539EB0801D55607000C82EF7 /* testWASM */;
     8346                        productType = "com.apple.product-type.tool";
     8347                };
    83088348                651122F714046A4C002B101D /* testRegExp */ = {
    83098349                        isa = PBXNativeTarget;
     
    84078447                                0F93274E1C20BCBA00CF6564 /* dynbench */,
    84088448                                0F6183381C45F62A0072450B /* testair */,
     8449                                539EB0751D55607000C82EF7 /* testWASM */,
    84098450                        );
    84108451                };
     
    86738714                                1440F6100A4F85670005F061 /* testapi.c in Sources */,
    86748715                                86D2221A167EF9440024C804 /* testapi.mm in Sources */,
     8716                        );
     8717                        runOnlyForDeploymentPostprocessing = 0;
     8718                };
     8719                539EB0761D55607000C82EF7 /* Sources */ = {
     8720                        isa = PBXSourcesBuildPhase;
     8721                        buildActionMask = 2147483647;
     8722                        files = (
     8723                                539EB0811D55608A00C82EF7 /* testWASM.cpp in Sources */,
    86758724                        );
    86768725                        runOnlyForDeploymentPostprocessing = 0;
     
    95199568                        targetProxy = 0FF922D214F46B2F0041A24E /* PBXContainerItemProxy */;
    95209569                };
     9570                539EB0831D5560F400C82EF7 /* PBXTargetDependency */ = {
     9571                        isa = PBXTargetDependency;
     9572                        target = 539EB0751D55607000C82EF7 /* testWASM */;
     9573                        targetProxy = 539EB0821D5560F400C82EF7 /* PBXContainerItemProxy */;
     9574                };
    95219575                5D69E912152BE5470028D720 /* PBXTargetDependency */ = {
    95229576                        isa = PBXTargetDependency;
     
    98549908                        name = Production;
    98559909                };
     9910                539EB07C1D55607000C82EF7 /* Debug */ = {
     9911                        isa = XCBuildConfiguration;
     9912                        baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
     9913                        buildSettings = {
     9914                                PRODUCT_NAME = "$(TARGET_NAME)";
     9915                        };
     9916                        name = Debug;
     9917                };
     9918                539EB07D1D55607000C82EF7 /* Release */ = {
     9919                        isa = XCBuildConfiguration;
     9920                        baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
     9921                        buildSettings = {
     9922                                PRODUCT_NAME = "$(TARGET_NAME)";
     9923                        };
     9924                        name = Release;
     9925                };
     9926                539EB07E1D55607000C82EF7 /* Profiling */ = {
     9927                        isa = XCBuildConfiguration;
     9928                        baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
     9929                        buildSettings = {
     9930                                PRODUCT_NAME = "$(TARGET_NAME)";
     9931                        };
     9932                        name = Profiling;
     9933                };
     9934                539EB07F1D55607000C82EF7 /* Production */ = {
     9935                        isa = XCBuildConfiguration;
     9936                        baseConfigurationReference = BC021BF2136900C300FC5467 /* ToolExecutable.xcconfig */;
     9937                        buildSettings = {
     9938                                PRODUCT_NAME = "$(TARGET_NAME)";
     9939                        };
     9940                        name = Production;
     9941                };
    98569942                5D6B2A48152B9E17005231DE /* Debug */ = {
    98579943                        isa = XCBuildConfiguration;
     
    1014510231                        defaultConfigurationName = Production;
    1014610232                };
     10233                539EB07B1D55607000C82EF7 /* Build configuration list for PBXNativeTarget "testWASM" */ = {
     10234                        isa = XCConfigurationList;
     10235                        buildConfigurations = (
     10236                                539EB07C1D55607000C82EF7 /* Debug */,
     10237                                539EB07D1D55607000C82EF7 /* Release */,
     10238                                539EB07E1D55607000C82EF7 /* Profiling */,
     10239                                539EB07F1D55607000C82EF7 /* Production */,
     10240                        );
     10241                        defaultConfigurationIsVisible = 0;
     10242                        defaultConfigurationName = Production;
     10243                };
    1014710244                5D6B2A4C152B9E17005231DE /* Build configuration list for PBXAggregateTarget "Test Tools" */ = {
    1014810245                        isa = XCConfigurationList;
  • trunk/Source/WTF/ChangeLog

    r204180 r204218  
     12016-08-05  Keith Miller  <keith_miller@apple.com>
     2
     3        Add LEBDecoder and tests
     4        https://bugs.webkit.org/show_bug.cgi?id=160625
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        Adds some LEB decoder functions to WTF. These are used in the
     9        WASM spec to encode numbers in a semi-compressed format.
     10
     11        * WTF.xcodeproj/project.pbxproj:
     12        * wtf/LEBDecoder.h: Added.
     13        (decodeUInt32):
     14        (decodeInt32):
     15
    1162016-08-05  Keith Miller  <keith_miller@apple.com>
    217
  • trunk/Source/WTF/WTF.xcodeproj/project.pbxproj

    r203038 r204218  
    115115                515F79501CFC9F4A00CCED93 /* CrossThreadTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 515F794D1CFC9F4A00CCED93 /* CrossThreadTask.h */; };
    116116                515F79561CFD3A6900CCED93 /* CrossThreadQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 515F79551CFD3A6900CCED93 /* CrossThreadQueue.h */; };
     117                539EB0631D55284200C82EF7 /* LEBDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 539EB0621D55284200C82EF7 /* LEBDecoder.h */; };
    117118                553071CA1C40427200384898 /* TinyLRUCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 553071C91C40427200384898 /* TinyLRUCache.h */; };
    118119                5C7C88D41D0A3A0A009D2F6D /* UniqueRef.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C7C88D31D0A3A0A009D2F6D /* UniqueRef.h */; };
     
    451452                515F794D1CFC9F4A00CCED93 /* CrossThreadTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrossThreadTask.h; sourceTree = "<group>"; };
    452453                515F79551CFD3A6900CCED93 /* CrossThreadQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrossThreadQueue.h; sourceTree = "<group>"; };
     454                539EB0621D55284200C82EF7 /* LEBDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LEBDecoder.h; sourceTree = "<group>"; };
    453455                553071C91C40427200384898 /* TinyLRUCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TinyLRUCache.h; sourceTree = "<group>"; };
    454456                5C7C88D31D0A3A0A009D2F6D /* UniqueRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UniqueRef.h; sourceTree = "<group>"; };
     
    902904                                7CDD7FF7186D291E007433CD /* IteratorAdaptors.h */,
    903905                                7CDD7FF9186D2A54007433CD /* IteratorRange.h */,
     906                                539EB0621D55284200C82EF7 /* LEBDecoder.h */,
    904907                                A70DA0831799F04D00529A9B /* ListDump.h */,
    905908                                A8A472C1151A825A004123FF /* ListHashSet.h */,
     
    12161219                                5C7C88D41D0A3A0A009D2F6D /* UniqueRef.h in Headers */,
    12171220                                A8A47434151A825B004123FF /* ASCIIFastPath.h in Headers */,
     1221                                539EB0631D55284200C82EF7 /* LEBDecoder.h in Headers */,
    12181222                                A8A47387151A825B004123FF /* Assertions.h in Headers */,
    12191223                                A8A47388151A825B004123FF /* Atomics.h in Headers */,
Note: See TracChangeset for help on using the changeset viewer.