Index: src/macros.py |
diff --git a/src/macros.py b/src/macros.py |
index 69f36c09c050a7f7ddd4c81d969b9901f6c96786..f112994d3fd030041c59aa08b189b9b9f4eba18f 100644 |
--- a/src/macros.py |
+++ b/src/macros.py |
@@ -127,7 +127,7 @@ macro TO_INT32(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : (arg >> 0)); |
macro TO_UINT32(arg) = (arg >>> 0); |
macro TO_STRING_INLINE(arg) = (IS_STRING(%IS_VAR(arg)) ? arg : NonStringToString(arg)); |
macro TO_NUMBER_INLINE(arg) = (IS_NUMBER(%IS_VAR(arg)) ? arg : NonNumberToNumber(arg)); |
- |
+macro TO_OBJECT_INLINE(arg) = ((IS_OBJECT(%IS_VAR(arg)) && !IS_NULL_OR_UNDEFINED(arg)) ? arg : ToObject(arg)); |
Mads Ager (chromium)
2011/05/12 16:11:05
I wonder if what we should be using here is %_IsSp
Vitaly Repeshko
2011/05/12 16:19:24
You're right. It's simpler.
|
# Macros implemented in Python. |
python macro CHAR_CODE(str) = ord(str[1]); |