| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 # Macro for ES6 CheckObjectCoercible | 104 # Macro for ES6 CheckObjectCoercible |
| 105 # Will throw a TypeError of the form "[functionName] called on null or undefined
". | 105 # Will throw a TypeError of the form "[functionName] called on null or undefined
". |
| 106 macro CHECK_OBJECT_COERCIBLE(arg, functionName) = if (IS_NULL(%IS_VAR(arg)) || I
S_UNDEFINED(arg)) throw MakeTypeError(kCalledOnNullOrUndefined, functionName); | 106 macro CHECK_OBJECT_COERCIBLE(arg, functionName) = if (IS_NULL(%IS_VAR(arg)) || I
S_UNDEFINED(arg)) throw MakeTypeError(kCalledOnNullOrUndefined, functionName); |
| 107 | 107 |
| 108 # Inline macros. Use %IS_VAR to make sure arg is evaluated only once. | 108 # Inline macros. Use %IS_VAR to make sure arg is evaluated only once. |
| 109 macro NUMBER_IS_NAN(arg) = (!%_IsSmi(%IS_VAR(arg)) && !(arg == arg)); | 109 macro NUMBER_IS_NAN(arg) = (!%_IsSmi(%IS_VAR(arg)) && !(arg == arg)); |
| 110 macro NUMBER_IS_FINITE(arg) = (%_IsSmi(%IS_VAR(arg)) || ((arg == arg) && (arg !=
1/0) && (arg != -1/0))); | 110 macro NUMBER_IS_FINITE(arg) = (%_IsSmi(%IS_VAR(arg)) || ((arg == arg) && (arg !=
1/0) && (arg != -1/0))); |
| 111 macro TO_BOOLEAN(arg) = (!!(arg)); | 111 macro TO_BOOLEAN(arg) = (!!(arg)); |
| 112 macro TO_INTEGER(arg) = (%_ToInteger(arg)); | 112 macro TO_INTEGER(arg) = (%_ToInteger(arg)); |
| 113 macro TO_INTEGER_MAP_MINUS_ZERO(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToI
ntegerMapMinusZero(arg)); | |
| 114 macro TO_INT32(arg) = ((arg) | 0); | 113 macro TO_INT32(arg) = ((arg) | 0); |
| 115 macro TO_UINT32(arg) = ((arg) >>> 0); | 114 macro TO_UINT32(arg) = ((arg) >>> 0); |
| 116 macro INVERT_NEG_ZERO(arg) = ((arg) + 0); | 115 macro INVERT_NEG_ZERO(arg) = ((arg) + 0); |
| 117 macro TO_LENGTH(arg) = (%_ToLength(arg)); | 116 macro TO_LENGTH(arg) = (%_ToLength(arg)); |
| 118 macro TO_STRING(arg) = (%_ToString(arg)); | 117 macro TO_STRING(arg) = (%_ToString(arg)); |
| 119 macro TO_NUMBER(arg) = (%_ToNumber(arg)); | 118 macro TO_NUMBER(arg) = (%_ToNumber(arg)); |
| 120 macro TO_OBJECT(arg) = (%_ToObject(arg)); | 119 macro TO_OBJECT(arg) = (%_ToObject(arg)); |
| 121 macro TO_PRIMITIVE(arg) = (%_ToPrimitive(arg)); | 120 macro TO_PRIMITIVE(arg) = (%_ToPrimitive(arg)); |
| 122 macro TO_PRIMITIVE_NUMBER(arg) = (%_ToPrimitive_Number(arg)); | 121 macro TO_PRIMITIVE_NUMBER(arg) = (%_ToPrimitive_Number(arg)); |
| 123 macro TO_PRIMITIVE_STRING(arg) = (%_ToPrimitive_String(arg)); | 122 macro TO_PRIMITIVE_STRING(arg) = (%_ToPrimitive_String(arg)); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 define kSloppyModeBlockScopedFunctionRedefinition = 22; | 257 define kSloppyModeBlockScopedFunctionRedefinition = 22; |
| 259 define kForInInitializer = 23; | 258 define kForInInitializer = 23; |
| 260 define kArrayProtectorDirtied = 24; | 259 define kArrayProtectorDirtied = 24; |
| 261 define kArraySpeciesModified = 25; | 260 define kArraySpeciesModified = 25; |
| 262 define kArrayPrototypeConstructorModified = 26; | 261 define kArrayPrototypeConstructorModified = 26; |
| 263 define kArrayInstanceProtoModified = 27; | 262 define kArrayInstanceProtoModified = 27; |
| 264 define kArrayInstanceConstructorModified = 28; | 263 define kArrayInstanceConstructorModified = 28; |
| 265 define kLegacyFunctionDeclaration = 29; | 264 define kLegacyFunctionDeclaration = 29; |
| 266 define kRegExpPrototypeSourceGetter = 30; | 265 define kRegExpPrototypeSourceGetter = 30; |
| 267 define kRegExpPrototypeOldFlagGetter = 31; | 266 define kRegExpPrototypeOldFlagGetter = 31; |
| OLD | NEW |