Chromium Code Reviews| Index: src/macros.py |
| diff --git a/src/macros.py b/src/macros.py |
| index 91b4132563911144361c1e9b41e995601113bdf3..52a3e948a5b2ecc14668d467cf60eb0571266b34 100644 |
| --- a/src/macros.py |
| +++ b/src/macros.py |
| @@ -91,6 +91,12 @@ macro IS_NULL_OR_UNDEFINED(arg) = (arg == null); |
| macro IS_UNDEFINED(arg) = (arg === (void 0)); |
| macro IS_NUMBER(arg) = (typeof(arg) === 'number'); |
| macro IS_FLOAT32X4(arg) = (typeof(arg) === 'float32x4'); |
| +macro IS_INT32X4(arg) = (typeof(arg) === 'int32x4'); |
| +macro IS_BOOL32X4(arg) = (typeof(arg) === 'bool32x4'); |
| +macro IS_INT16X8(arg) = (typeof(arg) === 'int16x8'); |
| +macro IS_BOOL16X8(arg) = (typeof(arg) === 'bool16x8'); |
| +macro IS_INT8X16(arg) = (typeof(arg) === 'int8x16'); |
| +macro IS_BOOL8X16(arg) = (typeof(arg) === 'bool8x16'); |
| macro IS_STRING(arg) = (typeof(arg) === 'string'); |
| macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean'); |
| macro IS_SYMBOL(arg) = (typeof(arg) === 'symbol'); |
| @@ -105,6 +111,12 @@ macro IS_WEAKMAP(arg) = (%_ClassOf(arg) === 'WeakMap'); |
| macro IS_WEAKSET(arg) = (%_ClassOf(arg) === 'WeakSet'); |
| macro IS_NUMBER_WRAPPER(arg) = (%_ClassOf(arg) === 'Number'); |
| macro IS_FLOAT32X4_WRAPPER(arg) = (%_ClassOf(arg) === 'Float32x4'); |
| +macro IS_INT32X4_WRAPPER(arg) = (%_ClassOf(arg) === 'Int32x4'); |
| +macro IS_BOOL32X4_WRAPPER(arg) = (%_ClassOf(arg) === 'Bool32x4'); |
| +macro IS_INT16X8_WRAPPER(arg) = (%_ClassOf(arg) === 'Int16x8'); |
| +macro IS_BOOL16X8_WRAPPER(arg) = (%_ClassOf(arg) === 'Bool16x8'); |
| +macro IS_INT8X16_WRAPPER(arg) = (%_ClassOf(arg) === 'Int8x16'); |
| +macro IS_BOOL8X16_WRAPPER(arg) = (%_ClassOf(arg) === 'Bool8x16'); |
| macro IS_STRING_WRAPPER(arg) = (%_ClassOf(arg) === 'String'); |
| macro IS_SYMBOL_WRAPPER(arg) = (%_ClassOf(arg) === 'Symbol'); |
| macro IS_BOOLEAN_WRAPPER(arg) = (%_ClassOf(arg) === 'Boolean'); |
| @@ -121,6 +133,9 @@ macro IS_MAP_ITERATOR(arg) = (%_ClassOf(arg) === 'Map Iterator'); |
| macro IS_UNDETECTABLE(arg) = (%_IsUndetectableObject(arg)); |
| macro IS_STRONG(arg) = (%IsStrong(arg)); |
| +macro IS_SIMD_VALUE(arg) = (IS_FLOAT32X4(arg) || IS_INT32X4(arg) || IS_BOOL32X4(arg) || IS_INT16X8(arg) || IS_BOOL16X8(arg) || IS_INT8X16(arg) || IS_BOOL8X16(arg)); |
|
rossberg
2015/07/29 14:37:55
Hm, this seems rather expensive. It is used on som
bbudge
2015/07/30 13:46:58
I don't like those perf bugs, so I'll use your sug
rossberg
2015/07/30 15:12:24
Ah, note the difference between assembly intrinsic
|
| +macro IS_SIMD_VALUE_WRAPPER(arg) = (IS_FLOAT32X4_WRAPPER(arg) || IS_INT32X4_WRAPPER(arg) || IS_BOOL32X4_WRAPPER(arg) || IS_INT16X8_WRAPPER(arg) || IS_BOOL16X8_WRAPPER(arg) || IS_INT8X16_WRAPPER(arg) || IS_BOOL8X16_WRAPPER(arg)); |
|
rossberg
2015/07/29 14:37:55
Is this actually used?
bbudge
2015/07/30 13:46:58
Nope. Deleted.
|
| + |
| # 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 |