Changeset 239398 in webkit
- Timestamp:
- Dec 19, 2018, 3:27:45 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 added
- 3 edited
-
ChangeLog (modified) (1 diff)
-
Modules/webgpu/WHLSL (added)
-
Modules/webgpu/WHLSL/WHLSLLexer.cpp (added)
-
Modules/webgpu/WHLSL/WHLSLLexer.h (added)
-
Sources.txt (modified) (1 diff)
-
WebCore.xcodeproj/project.pbxproj (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r239397 r239398 1 2018-12-19 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [WHLSL] Add a handwritten lexer 4 https://bugs.webkit.org/show_bug.cgi?id=192294 5 6 Reviewed by Jon Lee. 7 8 This is infrastructure necessary for https://bugs.webkit.org/show_bug.cgi?id=192355. The 9 implementation matches the lexing rules in the spec (specifically, the rules that start 10 with an uppercase letter). The spec is at 11 https://github.com/gpuweb/WHLSL/blob/master/Spec/WHLSL.g4. 12 13 This patch also modifies the lexer according to https://github.com/gpuweb/WHLSL/pull/283. 14 15 No new tests because the lexer isn't hooked up yet; there are tests in the parser, 16 once that gets committed. 17 18 * Modules/webgpu/WHLSL/WHLSLLexer.cpp: Added. 19 (WebCore::WHLSL::Lexer::Token::typeName): 20 (WebCore::WHLSL::Lexer::recognizeKeyword): 21 (WebCore::WHLSL::Lexer::consumeTokenFromStream): 22 (WebCore::WHLSL::Lexer::skipWhitespaceAndComments): 23 (WebCore::WHLSL::isWhitespace): 24 (WebCore::WHLSL::isNewline): 25 (WebCore::WHLSL::Lexer::skipWhitespace): 26 (WebCore::WHLSL::Lexer::skipLineComment): 27 (WebCore::WHLSL::Lexer::skipLongComment): 28 (WebCore::WHLSL::Lexer::coreDecimalIntLiteral const): 29 (WebCore::WHLSL::Lexer::decimalIntLiteral const): 30 (WebCore::WHLSL::Lexer::decimalUintLiteral const): 31 (WebCore::WHLSL::isHexadecimalCharacter): 32 (WebCore::WHLSL::Lexer::coreHexadecimalIntLiteral const): 33 (WebCore::WHLSL::Lexer::hexadecimalIntLiteral const): 34 (WebCore::WHLSL::Lexer::hexadecimalUintLiteral const): 35 (WebCore::WHLSL::Lexer::intLiteral const): 36 (WebCore::WHLSL::Lexer::uintLiteral const): 37 (WebCore::WHLSL::Lexer::digit const): 38 (WebCore::WHLSL::Lexer::digitStar const): 39 (WebCore::WHLSL::Lexer::character const): 40 (WebCore::WHLSL::Lexer::coreFloatLiteralType1 const): 41 (WebCore::WHLSL::Lexer::coreFloatLiteral const): 42 (WebCore::WHLSL::Lexer::floatLiteral const): 43 (WebCore::WHLSL::Lexer::validIdentifier const): 44 (WebCore::WHLSL::Lexer::identifier const): 45 (WebCore::WHLSL::Lexer::operatorName const): 46 * Modules/webgpu/WHLSL/WHLSLLexer.h: Added. 47 (WebCore::WHLSL::Lexer::Lexer): 48 (WebCore::WHLSL::Lexer::consumeToken): 49 (WebCore::WHLSL::Lexer::unconsumeToken): 50 (WebCore::WHLSL::Lexer::state const): 51 (WebCore::WHLSL::Lexer::setState): 52 (WebCore::WHLSL::Lexer::isFullyConsumed const): 53 (WebCore::WHLSL::Lexer::errorString): 54 (WebCore::WHLSL::Lexer::string const): 55 (WebCore::WHLSL::Lexer::anyCharacter const): 56 * Sources.txt: 57 * WebCore.xcodeproj/project.pbxproj: 58 1 59 2018-12-18 Simon Fraser <simon.fraser@apple.com> 2 60 -
trunk/Source/WebCore/Sources.txt
r239351 r239398 302 302 303 303 Modules/webgpu/DOMWindowWebGPU.cpp 304 Modules/webgpu/WHLSL/WHLSLLexer.cpp 304 305 Modules/webgpu/WebGPU.cpp 305 306 Modules/webgpu/WebGPUAdapter.cpp -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r239351 r239398 13213 13213 C1E1D235203DF15400584665 /* ScreenProperties.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScreenProperties.h; sourceTree = "<group>"; }; 13214 13214 C2015C091BE6FE2C00822389 /* FontVariantBuilder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FontVariantBuilder.h; sourceTree = "<group>"; }; 13215 C210E91121B4BD1000B7F83D /* WHLSLLexer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLLexer.cpp; sourceTree = "<group>"; }; 13216 C210E91221B4BD1000B7F83D /* WHLSLLexer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLLexer.h; sourceTree = "<group>"; }; 13215 13217 C21DF2E71D9E4E9900F5B24C /* CSSFontVariationValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSFontVariationValue.cpp; sourceTree = "<group>"; }; 13216 13218 C21DF2E81D9E4E9900F5B24C /* CSSFontVariationValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFontVariationValue.h; sourceTree = "<group>"; }; … … 25218 25220 usesTabs = 0; 25219 25221 }; 25222 C210E90D21B4BCA400B7F83D /* WHLSL */ = { 25223 isa = PBXGroup; 25224 children = ( 25225 C210E91121B4BD1000B7F83D /* WHLSLLexer.cpp */, 25226 C210E91221B4BD1000B7F83D /* WHLSLLexer.h */, 25227 ); 25228 path = WHLSL; 25229 sourceTree = "<group>"; 25230 }; 25220 25231 C96F5EBF1B5872260091EA9D /* mediasession */ = { 25221 25232 isa = PBXGroup; … … 25560 25571 isa = PBXGroup; 25561 25572 children = ( 25573 C210E90D21B4BCA400B7F83D /* WHLSL */, 25562 25574 D00F5941216ECC7A000D71DB /* DOMWindowWebGPU.cpp */, 25563 25575 D00F5940216ECC7A000D71DB /* DOMWindowWebGPU.h */,
Note:
See TracChangeset
for help on using the changeset viewer.