Index: src/macros.py |
=================================================================== |
--- src/macros.py (revision 4624) |
+++ src/macros.py (working copy) |
@@ -112,6 +112,11 @@ |
macro IS_UNDETECTABLE(arg) = (%_IsUndetectableObject(arg)); |
macro FLOOR(arg) = $floor(arg); |
+# Macro for ECMAScript 5 queries of the type: |
+# "Type(O) is object." |
+# This is the same as being either a function or an object in V8 terminology. |
+macro IS_SPEC_OBJECT_OR_NULL(arg) = (%_IsObject(arg) || %_IsFunction(arg)); |
+ |
# Inline macros. Use %IS_VAR to make sure arg is evaluated only once. |
macro NUMBER_IS_NAN(arg) = (!%_IsSmi(%IS_VAR(arg)) && !(arg == arg)); |
macro TO_INTEGER(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : ToInteger(arg)); |