summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/runtime/JSImmediate.h
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptCore/runtime/JSImmediate.h')
-rw-r--r--JavaScriptCore/runtime/JSImmediate.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/JavaScriptCore/runtime/JSImmediate.h b/JavaScriptCore/runtime/JSImmediate.h
index 9127b6a..f33d9fe 100644
--- a/JavaScriptCore/runtime/JSImmediate.h
+++ b/JavaScriptCore/runtime/JSImmediate.h
@@ -44,6 +44,8 @@ namespace JSC {
class JSObject;
class UString;
+ extern const size_t CELL_MASK;
+
#if USE(JSVALUE64)
inline intptr_t reinterpretDoubleToIntptr(double value)
{
@@ -595,7 +597,13 @@ namespace JSC {
inline bool JSValue::isCell() const
{
+#ifndef NDEBUG
+ bool r = !JSImmediate::isImmediate(asValue());
+ ASSERT(!r || !(JSImmediate::rawValue(asValue()) & CELL_MASK));
+ return r;
+#else
return !JSImmediate::isImmediate(asValue());
+#endif
}
inline bool JSValue::isInt32() const