Title: [196810] trunk/Source/_javascript_Core
- Revision
- 196810
- Author
- [email protected]
- Date
- 2016-02-19 02:39:34 -0800 (Fri, 19 Feb 2016)
Log Message
Add isJSString(JSCell*) variant to avoid Cell->JSValue->Cell conversion
https://bugs.webkit.org/show_bug.cgi?id=154442
Patch by Joseph Pecoraro <[email protected]> on 2016-02-19
Reviewed by Saam Barati.
* runtime/JSString.h:
(JSC::isJSString):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (196809 => 196810)
--- trunk/Source/_javascript_Core/ChangeLog 2016-02-19 10:30:08 UTC (rev 196809)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-02-19 10:39:34 UTC (rev 196810)
@@ -1,5 +1,15 @@
2016-02-19 Joseph Pecoraro <[email protected]>
+ Add isJSString(JSCell*) variant to avoid Cell->JSValue->Cell conversion
+ https://bugs.webkit.org/show_bug.cgi?id=154442
+
+ Reviewed by Saam Barati.
+
+ * runtime/JSString.h:
+ (JSC::isJSString):
+
+2016-02-19 Joseph Pecoraro <[email protected]>
+
Remove unused SymbolTable::createNameScopeTable
https://bugs.webkit.org/show_bug.cgi?id=154443
Modified: trunk/Source/_javascript_Core/runtime/JSString.h (196809 => 196810)
--- trunk/Source/_javascript_Core/runtime/JSString.h 2016-02-19 10:30:08 UTC (rev 196809)
+++ trunk/Source/_javascript_Core/runtime/JSString.h 2016-02-19 10:39:34 UTC (rev 196810)
@@ -62,6 +62,7 @@
JSRopeString* jsStringBuilder(VM*);
+bool isJSString(JSCell*);
bool isJSString(JSValue);
JSString* asString(JSValue);
@@ -646,9 +647,14 @@
return false;
}
+inline bool isJSString(JSCell* cell)
+{
+ return cell->type() == StringType;
+}
+
inline bool isJSString(JSValue v)
{
- return v.isCell() && v.asCell()->type() == StringType;
+ return v.isCell() && isJSString(v.asCell());
}
ALWAYS_INLINE StringView JSRopeString::unsafeView(ExecState& state) const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes