Home | History | Annotate | Download | only in src

Lines Matching full:macro

102 macro IS_NULL(arg)              = (arg === null);
103 macro IS_NULL_OR_UNDEFINED(arg) = (arg == null);
104 macro IS_UNDEFINED(arg) = (arg === (void 0));
105 macro IS_NUMBER(arg) = (typeof(arg) === 'number');
106 macro IS_STRING(arg) = (typeof(arg) === 'string');
107 macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean');
108 macro IS_SYMBOL(arg) = (typeof(arg) === 'symbol');
109 macro IS_OBJECT(arg) = (%_IsObject(arg));
110 macro IS_ARRAY(arg) = (%_IsArray(arg));
111 macro IS_FUNCTION(arg) = (%_IsFunction(arg));
112 macro IS_REGEXP(arg) = (%_IsRegExp(arg));
113 macro IS_SET(arg) = (%_ClassOf(arg) === 'Set');
114 macro IS_MAP(arg) = (%_ClassOf(arg) === 'Map');
115 macro IS_WEAKMAP(arg) = (%_ClassOf(arg) === 'WeakMap');
116 macro IS_WEAKSET(arg) = (%_ClassOf(arg) === 'WeakSet');
117 macro IS_DATE(arg) = (%_ClassOf(arg) === 'Date');
118 macro IS_NUMBER_WRAPPER(arg) = (%_ClassOf(arg) === 'Number');
119 macro IS_STRING_WRAPPER(arg) = (%_ClassOf(arg) === 'String');
120 macro IS_SYMBOL_WRAPPER(arg) = (%_ClassOf(arg) === 'Symbol');
121 macro IS_BOOLEAN_WRAPPER(arg) = (%_ClassOf(arg) === 'Boolean');
122 macro IS_ERROR(arg) = (%_ClassOf(arg) === 'Error');
123 macro IS_SCRIPT(arg) = (%_ClassOf(arg) === 'Script');
124 macro IS_ARGUMENTS(arg) = (%_ClassOf(arg) === 'Arguments');
125 macro IS_GLOBAL(arg) = (%_ClassOf(arg) === 'global');
126 macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer');
127 macro IS_DATAVIEW(arg) = (%_ClassOf(arg) === 'DataView');
128 macro IS_GENERATOR(arg) = (%_ClassOf(arg) === 'Generator');
129 macro IS_SET_ITERATOR(arg) = (%_ClassOf(arg) === 'Set Iterator');
130 macro IS_MAP_ITERATOR(arg) = (%_ClassOf(arg) === 'Map Iterator');
131 macro IS_UNDETECTABLE(arg) = (%_IsUndetectableObject(arg));
132 macro FLOOR(arg) = $floor(arg);
134 # Macro for ECMAScript 5 queries of the type:
139 macro IS_SPEC_OBJECT(arg) = (%_IsSpecObject(arg));
141 # Macro for ECMAScript 5 queries of the type:
146 macro IS_SPEC_FUNCTION(arg) = (%_ClassOf(arg) === 'Function');
148 # Macro for ES6 CheckObjectCoercible
150 macro CHECK_OBJECT_COERCIBLE(arg, functionName) = if (IS_NULL_OR_UNDEFINED(arg) && !IS_UNDETECTABLE(arg)) throw MakeTypeError('called_on_null_or_undefined', [functionName]);
158 macro NUMBER_IS_NAN(arg) = (!%_IsSmi(%IS_VAR(arg)) && !(arg == arg));
159 macro NUMBER_IS_FINITE(arg) = (%_IsSmi(%IS_VAR(arg)) || ((arg == arg) && (arg != 1/0) && (arg != -1/0)));
160 macro TO_INTEGER(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToInteger(ToNumber(arg)));
161 macro TO_INTEGER_FOR_SIDE_EFFECT(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : ToNumber(arg));
162 macro TO_INTEGER_MAP_MINUS_ZERO(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToIntegerMapMinusZero(ToNumber(arg)));
163 macro TO_INT32(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : (arg >> 0));
164 macro TO_UINT32(arg) = (arg >>> 0);
165 macro TO_STRING_INLINE(arg) = (IS_STRING(%IS_VAR(arg)) ? arg : NonStringToString(arg));
166 macro TO_NUMBER_INLINE(arg) = (IS_NUMBER(%IS_VAR(arg)) ? arg : NonNumberToNumber(arg));
167 macro TO_OBJECT_INLINE(arg) = (IS_SPEC_OBJECT(%IS_VAR(arg)) ? arg : ToObject(arg));
168 macro JSON_NUMBER_TO_STRING(arg) = ((%_IsSmi(%IS_VAR(arg)) || arg - arg == 0) ? %_NumberToString(arg) : "null");
173 macro GLOBAL_PRIVATE(name) = (%CreateGlobalPrivateSymbol(name));
174 macro NEW_PRIVATE(name) = (%CreatePrivateSymbol(name));
175 macro IS_PRIVATE(sym) = (%SymbolIsPrivate(sym));
176 macro HAS_PRIVATE(obj, sym) = (%HasOwnProperty(obj, sym));
177 macro GET_PRIVATE(obj, sym) = (obj[sym]);
178 macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val);
179 macro DELETE_PRIVATE(obj, sym) = (delete obj[sym]);
187 python macro CHAR_CODE(str) = ord(str[1]);
195 macro NUMBER_OF_CAPTURES(array) = ((array)[0]);
204 macro CHECK_DATE(arg) = if (%_ClassOf(arg) !== 'Date') ThrowDateTypeError();
205 macro LOCAL_DATE_VALUE(arg) = (%_DateField(arg, 0) + %_DateField(arg, 21));
206 macro UTC_DATE_VALUE(arg) = (%_DateField(arg, 0));
208 macro LOCAL_YEAR(arg) = (%_DateField(arg, 1));
209 macro LOCAL_MONTH(arg) = (%_DateField(arg, 2));
210 macro LOCAL_DAY(arg) = (%_DateField(arg, 3));
211 macro LOCAL_WEEKDAY(arg) = (%_DateField(arg, 4));
212 macro LOCAL_HOUR(arg) = (%_DateField(arg, 5));
213 macro LOCAL_MIN(arg) = (%_DateField(arg, 6));
214 macro LOCAL_SEC(arg) = (%_DateField(arg, 7));
215 macro LOCAL_MS(arg) = (%_DateField(arg, 8));
216 macro LOCAL_DAYS(arg) = (%_DateField(arg, 9));
217 macro LOCAL_TIME_IN_DAY(arg) = (%_DateField(arg, 10));
219 macro UTC_YEAR(arg) = (%_DateField(arg, 11));
220 macro UTC_MONTH(arg) = (%_DateField(arg, 12));
221 macro UTC_DAY(arg) = (%_DateField(arg, 13));
222 macro UTC_WEEKDAY(arg) = (%_DateField(arg, 14));
223 macro UTC_HOUR(arg) = (%_DateField(arg, 15));
224 macro UTC_MIN(arg) = (%_DateField(arg, 16));
225 macro UTC_SEC(arg) = (%_DateField(arg, 17));
226 macro UTC_MS(arg) = (%_DateField(arg, 18));
227 macro UTC_DAYS(arg) = (%_DateField(arg, 19));
228 macro UTC_TIME_IN_DAY(arg) = (%_DateField(arg, 20));
230 macro TIMEZONE_OFFSET(arg) = (%_DateField(arg, 21));
232 macro SET_UTC_DATE_VALUE(arg, value) = (%DateSetValue(arg, value, 1));
233 macro SET_LOCAL_DATE_VALUE(arg, value) = (%DateSetValue(arg, value, 0));
237 macro LAST_SUBJECT(array) = ((array)[1]);
238 macro LAST_INPUT(array) = ((array)[2]);
241 macro CAPTURE(index) = (3 + (index));
248 macro OVERRIDE_MATCH(override) = ((override)[0]);
249 macro OVERRIDE_POS(override) = ((override)[(override).length - 2]);
250 macro OVERRIDE_SUBJECT(override) = ((override)[(override).length - 1]);
252 macro OVERRIDE_CAPTURE(override, index) = ((override)[(index)]);