Title: [238016] trunk/Source/_javascript_Core
- Revision
- 238016
- Author
- [email protected]
- Date
- 2018-11-08 21:30:48 -0800 (Thu, 08 Nov 2018)
Log Message
[JSC] isStrWhiteSpace seems redundant with Lexer<UChar>::isWhiteSpace
https://bugs.webkit.org/show_bug.cgi?id=191439
Reviewed by Saam Barati.
* CMakeLists.txt:
* runtime/ParseInt.h:
(JSC::isStrWhiteSpace):
Define isStrWhiteSpace in terms of isWhiteSpace and isLineTerminator.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/CMakeLists.txt (238015 => 238016)
--- trunk/Source/_javascript_Core/CMakeLists.txt 2018-11-09 03:23:17 UTC (rev 238015)
+++ trunk/Source/_javascript_Core/CMakeLists.txt 2018-11-09 05:30:48 UTC (rev 238016)
@@ -692,6 +692,8 @@
llint/LLIntOpcode.h
+ parser/Lexer.h
+ parser/ParserArena.h
parser/ParserError.h
parser/ParserModes.h
parser/ParserTokens.h
Modified: trunk/Source/_javascript_Core/ChangeLog (238015 => 238016)
--- trunk/Source/_javascript_Core/ChangeLog 2018-11-09 03:23:17 UTC (rev 238015)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-11-09 05:30:48 UTC (rev 238016)
@@ -1,3 +1,15 @@
+2018-11-08 Ross Kirsling <[email protected]>
+
+ [JSC] isStrWhiteSpace seems redundant with Lexer<UChar>::isWhiteSpace
+ https://bugs.webkit.org/show_bug.cgi?id=191439
+
+ Reviewed by Saam Barati.
+
+ * CMakeLists.txt:
+ * runtime/ParseInt.h:
+ (JSC::isStrWhiteSpace):
+ Define isStrWhiteSpace in terms of isWhiteSpace and isLineTerminator.
+
2018-11-08 Michael Saboff <[email protected]>
Options::useRegExpJIT() should use jitEnabledByDefault() just like useJIT()
Modified: trunk/Source/_javascript_Core/runtime/ParseInt.h (238015 => 238016)
--- trunk/Source/_javascript_Core/runtime/ParseInt.h 2018-11-09 03:23:17 UTC (rev 238015)
+++ trunk/Source/_javascript_Core/runtime/ParseInt.h 2018-11-09 05:30:48 UTC (rev 238016)
@@ -26,6 +26,7 @@
#pragma once
#include "JSCJSValue.h"
+#include "Lexer.h"
#include <wtf/dtoa.h>
namespace JSC {
@@ -101,22 +102,8 @@
ALWAYS_INLINE static bool isStrWhiteSpace(UChar c)
{
- switch (c) {
- // ECMA-262-5th 7.2 & 7.3
- case 0x0009:
- case 0x000A:
- case 0x000B:
- case 0x000C:
- case 0x000D:
- case 0x0020:
- case 0x00A0:
- case 0x2028:
- case 0x2029:
- case 0xFEFF:
- return true;
- default:
- return c > 0xFF && u_charType(c) == U_SPACE_SEPARATOR;
- }
+ // https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type
+ return Lexer<UChar>::isWhiteSpace(c) || Lexer<UChar>::isLineTerminator(c);
}
// ES5.1 15.1.2.2
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes