| OLD | NEW |
| 1 # Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 # Copyright 2006-2009 the V8 project authors. All rights reserved. |
| 2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
| 3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
| 4 # met: | 4 # met: |
| 5 # | 5 # |
| 6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
| 9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
| 10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 # values of 'bar'. | 88 # values of 'bar'. |
| 89 macro IS_NULL(arg) = (arg === null); | 89 macro IS_NULL(arg) = (arg === null); |
| 90 macro IS_NULL_OR_UNDEFINED(arg) = (arg == null); | 90 macro IS_NULL_OR_UNDEFINED(arg) = (arg == null); |
| 91 macro IS_UNDEFINED(arg) = (arg === (void 0)); | 91 macro IS_UNDEFINED(arg) = (arg === (void 0)); |
| 92 macro IS_NUMBER(arg) = (typeof(arg) === 'number'); | 92 macro IS_NUMBER(arg) = (typeof(arg) === 'number'); |
| 93 macro IS_STRING(arg) = (typeof(arg) === 'string'); | 93 macro IS_STRING(arg) = (typeof(arg) === 'string'); |
| 94 macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean'); | 94 macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean'); |
| 95 macro IS_SYMBOL(arg) = (typeof(arg) === 'symbol'); | 95 macro IS_SYMBOL(arg) = (typeof(arg) === 'symbol'); |
| 96 macro IS_OBJECT(arg) = (%_IsObject(arg)); | 96 macro IS_OBJECT(arg) = (%_IsObject(arg)); |
| 97 macro IS_ARRAY(arg) = (%_IsArray(arg)); | 97 macro IS_ARRAY(arg) = (%_IsArray(arg)); |
| 98 macro IS_DATE(arg) = (%_IsDate(arg)); |
| 98 macro IS_FUNCTION(arg) = (%_IsFunction(arg)); | 99 macro IS_FUNCTION(arg) = (%_IsFunction(arg)); |
| 99 macro IS_REGEXP(arg) = (%_IsRegExp(arg)); | 100 macro IS_REGEXP(arg) = (%_IsRegExp(arg)); |
| 100 macro IS_SET(arg) = (%_ClassOf(arg) === 'Set'); | 101 macro IS_SET(arg) = (%_ClassOf(arg) === 'Set'); |
| 101 macro IS_MAP(arg) = (%_ClassOf(arg) === 'Map'); | 102 macro IS_MAP(arg) = (%_ClassOf(arg) === 'Map'); |
| 102 macro IS_WEAKMAP(arg) = (%_ClassOf(arg) === 'WeakMap'); | 103 macro IS_WEAKMAP(arg) = (%_ClassOf(arg) === 'WeakMap'); |
| 103 macro IS_WEAKSET(arg) = (%_ClassOf(arg) === 'WeakSet'); | 104 macro IS_WEAKSET(arg) = (%_ClassOf(arg) === 'WeakSet'); |
| 104 macro IS_DATE(arg) = (%_ClassOf(arg) === 'Date'); | |
| 105 macro IS_NUMBER_WRAPPER(arg) = (%_ClassOf(arg) === 'Number'); | 105 macro IS_NUMBER_WRAPPER(arg) = (%_ClassOf(arg) === 'Number'); |
| 106 macro IS_STRING_WRAPPER(arg) = (%_ClassOf(arg) === 'String'); | 106 macro IS_STRING_WRAPPER(arg) = (%_ClassOf(arg) === 'String'); |
| 107 macro IS_SYMBOL_WRAPPER(arg) = (%_ClassOf(arg) === 'Symbol'); | 107 macro IS_SYMBOL_WRAPPER(arg) = (%_ClassOf(arg) === 'Symbol'); |
| 108 macro IS_BOOLEAN_WRAPPER(arg) = (%_ClassOf(arg) === 'Boolean'); | 108 macro IS_BOOLEAN_WRAPPER(arg) = (%_ClassOf(arg) === 'Boolean'); |
| 109 macro IS_ERROR(arg) = (%_ClassOf(arg) === 'Error'); | 109 macro IS_ERROR(arg) = (%_ClassOf(arg) === 'Error'); |
| 110 macro IS_SCRIPT(arg) = (%_ClassOf(arg) === 'Script'); | 110 macro IS_SCRIPT(arg) = (%_ClassOf(arg) === 'Script'); |
| 111 macro IS_ARGUMENTS(arg) = (%_ClassOf(arg) === 'Arguments'); | 111 macro IS_ARGUMENTS(arg) = (%_ClassOf(arg) === 'Arguments'); |
| 112 macro IS_GLOBAL(arg) = (%_ClassOf(arg) === 'global'); | 112 macro IS_GLOBAL(arg) = (%_ClassOf(arg) === 'global'); |
| 113 macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer'); | 113 macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer'); |
| 114 macro IS_DATAVIEW(arg) = (%_ClassOf(arg) === 'DataView'); | 114 macro IS_DATAVIEW(arg) = (%_ClassOf(arg) === 'DataView'); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 # REGEXP_NUMBER_OF_CAPTURES | 184 # REGEXP_NUMBER_OF_CAPTURES |
| 185 macro NUMBER_OF_CAPTURES(array) = ((array)[0]); | 185 macro NUMBER_OF_CAPTURES(array) = ((array)[0]); |
| 186 | 186 |
| 187 # Limit according to ECMA 262 15.9.1.1 | 187 # Limit according to ECMA 262 15.9.1.1 |
| 188 define MAX_TIME_MS = 8640000000000000; | 188 define MAX_TIME_MS = 8640000000000000; |
| 189 # Limit which is MAX_TIME_MS + msPerMonth. | 189 # Limit which is MAX_TIME_MS + msPerMonth. |
| 190 define MAX_TIME_BEFORE_UTC = 8640002592000000; | 190 define MAX_TIME_BEFORE_UTC = 8640002592000000; |
| 191 | 191 |
| 192 # Gets the value of a Date object. If arg is not a Date object | 192 # Gets the value of a Date object. If arg is not a Date object |
| 193 # a type error is thrown. | 193 # a type error is thrown. |
| 194 macro CHECK_DATE(arg) = %_ThrowIfNotADate(arg); | 194 macro CHECK_DATE(arg) = if (%_IsDate(arg)) {} else %_ThrowNotDateError(); |
| 195 macro LOCAL_DATE_VALUE(arg) = (%_DateField(arg, 0) + %_DateField(arg, 21)); | 195 macro LOCAL_DATE_VALUE(arg) = (%_DateField(arg, 0) + %_DateField(arg, 21)); |
| 196 macro UTC_DATE_VALUE(arg) = (%_DateField(arg, 0)); | 196 macro UTC_DATE_VALUE(arg) = (%_DateField(arg, 0)); |
| 197 | 197 |
| 198 macro LOCAL_YEAR(arg) = (%_DateField(arg, 1)); | 198 macro LOCAL_YEAR(arg) = (%_DateField(arg, 1)); |
| 199 macro LOCAL_MONTH(arg) = (%_DateField(arg, 2)); | 199 macro LOCAL_MONTH(arg) = (%_DateField(arg, 2)); |
| 200 macro LOCAL_DAY(arg) = (%_DateField(arg, 3)); | 200 macro LOCAL_DAY(arg) = (%_DateField(arg, 3)); |
| 201 macro LOCAL_WEEKDAY(arg) = (%_DateField(arg, 4)); | 201 macro LOCAL_WEEKDAY(arg) = (%_DateField(arg, 4)); |
| 202 macro LOCAL_HOUR(arg) = (%_DateField(arg, 5)); | 202 macro LOCAL_HOUR(arg) = (%_DateField(arg, 5)); |
| 203 macro LOCAL_MIN(arg) = (%_DateField(arg, 6)); | 203 macro LOCAL_MIN(arg) = (%_DateField(arg, 6)); |
| 204 macro LOCAL_SEC(arg) = (%_DateField(arg, 7)); | 204 macro LOCAL_SEC(arg) = (%_DateField(arg, 7)); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 define NOT_FOUND = -1; | 304 define NOT_FOUND = -1; |
| 305 | 305 |
| 306 # Check whether debug is active. | 306 # Check whether debug is active. |
| 307 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); | 307 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); |
| 308 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup
portsStepping(function)); | 308 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup
portsStepping(function)); |
| 309 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (DEBUG_IS_STEPPING(functi
on)) %DebugPrepareStepInIfStepping(function); | 309 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (DEBUG_IS_STEPPING(functi
on)) %DebugPrepareStepInIfStepping(function); |
| 310 | 310 |
| 311 # SharedFlag equivalents | 311 # SharedFlag equivalents |
| 312 define kNotShared = false; | 312 define kNotShared = false; |
| 313 define kShared = true; | 313 define kShared = true; |
| OLD | NEW |