Title: [167550] trunk/Source/_javascript_Core
Revision
167550
Author
[email protected]
Date
2014-04-19 15:09:51 -0700 (Sat, 19 Apr 2014)

Log Message

Two little shortcuts to the JSType.
<https://webkit.org/b/131896>

Tweak two sites that take the long road through JSCell::structure()->typeInfo()
to look at data that's already in JSCell::type().

Reviewed by Darin Adler.

* runtime/NameInstance.h:
(JSC::isName):
* runtime/NumberPrototype.cpp:
(JSC::toThisNumber):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (167549 => 167550)


--- trunk/Source/_javascript_Core/ChangeLog	2014-04-19 21:42:40 UTC (rev 167549)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-04-19 22:09:51 UTC (rev 167550)
@@ -1,3 +1,18 @@
+2014-04-19  Andreas Kling  <[email protected]>
+
+        Two little shortcuts to the JSType.
+        <https://webkit.org/b/131896>
+
+        Tweak two sites that take the long road through JSCell::structure()->typeInfo()
+        to look at data that's already in JSCell::type().
+
+        Reviewed by Darin Adler.
+
+        * runtime/NameInstance.h:
+        (JSC::isName):
+        * runtime/NumberPrototype.cpp:
+        (JSC::toThisNumber):
+
 2014-04-19  Filip Pizlo  <[email protected]>
 
         Make it easier to check if an integer sum would overflow

Modified: trunk/Source/_javascript_Core/runtime/NameInstance.h (167549 => 167550)


--- trunk/Source/_javascript_Core/runtime/NameInstance.h	2014-04-19 21:42:40 UTC (rev 167549)
+++ trunk/Source/_javascript_Core/runtime/NameInstance.h	2014-04-19 22:09:51 UTC (rev 167550)
@@ -69,7 +69,7 @@
 
 inline bool isName(JSValue v)
 {
-    return v.isCell() && v.asCell()->structure()->typeInfo().isName();
+    return v.isCell() && v.asCell()->type() == NameInstanceType;
 }
 
 } // namespace JSC

Modified: trunk/Source/_javascript_Core/runtime/NumberPrototype.cpp (167549 => 167550)


--- trunk/Source/_javascript_Core/runtime/NumberPrototype.cpp	2014-04-19 21:42:40 UTC (rev 167549)
+++ trunk/Source/_javascript_Core/runtime/NumberPrototype.cpp	2014-04-19 22:09:51 UTC (rev 167550)
@@ -104,7 +104,7 @@
         return true;
     }
     
-    if (thisValue.isCell() && thisValue.asCell()->structure()->typeInfo().isNumberObject()) {
+    if (thisValue.isCell() && thisValue.asCell()->type() == NumberObjectType) {
         x = static_cast<const NumberObject*>(thisValue.asCell())->internalValue().asNumber();
         return true;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to