Title: [199513] trunk/Source/_javascript_Core
- Revision
- 199513
- Author
- [email protected]
- Date
- 2016-04-13 13:49:57 -0700 (Wed, 13 Apr 2016)
Log Message
isJSArray should use ArrayType rather than the ClassInfo
https://bugs.webkit.org/show_bug.cgi?id=156551
Reviewed by Filip Pizlo.
Using the JSType rather than the ClassInfo should be slightly faster
since the type is inline on the cell whereas the ClassInfo is only
on the structure.
* runtime/JSArray.h:
(JSC::isJSArray):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (199512 => 199513)
--- trunk/Source/_javascript_Core/ChangeLog 2016-04-13 20:40:07 UTC (rev 199512)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-04-13 20:49:57 UTC (rev 199513)
@@ -1,3 +1,17 @@
+2016-04-13 Keith Miller <[email protected]>
+
+ isJSArray should use ArrayType rather than the ClassInfo
+ https://bugs.webkit.org/show_bug.cgi?id=156551
+
+ Reviewed by Filip Pizlo.
+
+ Using the JSType rather than the ClassInfo should be slightly faster
+ since the type is inline on the cell whereas the ClassInfo is only
+ on the structure.
+
+ * runtime/JSArray.h:
+ (JSC::isJSArray):
+
2016-04-13 Mark Lam <[email protected]>
ES6: Implement RegExp.prototype[@@search].
Modified: trunk/Source/_javascript_Core/runtime/JSArray.h (199512 => 199513)
--- trunk/Source/_javascript_Core/runtime/JSArray.h 2016-04-13 20:40:07 UTC (rev 199512)
+++ trunk/Source/_javascript_Core/runtime/JSArray.h 2016-04-13 20:49:57 UTC (rev 199513)
@@ -287,7 +287,12 @@
return asArray(value.asCell());
}
-inline bool isJSArray(JSCell* cell) { return cell->classInfo() == JSArray::info(); }
+inline bool isJSArray(JSCell* cell)
+{
+ ASSERT((cell->classInfo() == JSArray::info()) == (cell->type() == ArrayType));
+ return cell->type() == ArrayType;
+}
+
inline bool isJSArray(JSValue v) { return v.isCell() && isJSArray(v.asCell()); }
inline JSArray* constructArray(ExecState* exec, Structure* arrayStructure, const ArgList& values)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes