| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 132 # In addition, an undetectable object is also included by this. | 132 # In addition, an undetectable object is also included by this. | 
| 133 macro IS_SPEC_OBJECT(arg)   = (%_IsSpecObject(arg)); | 133 macro IS_SPEC_OBJECT(arg)   = (%_IsSpecObject(arg)); | 
| 134 | 134 | 
| 135 # Macro for ECMAScript 5 queries of the type: | 135 # Macro for ECMAScript 5 queries of the type: | 
| 136 # "IsCallable(O)" | 136 # "IsCallable(O)" | 
| 137 # We assume here that this is the same as being either a function or a function | 137 # We assume here that this is the same as being either a function or a function | 
| 138 # proxy. That ignores host objects with [[Call]] methods, but in most situations | 138 # proxy. That ignores host objects with [[Call]] methods, but in most situations | 
| 139 # we cannot handle those anyway. | 139 # we cannot handle those anyway. | 
| 140 macro IS_SPEC_FUNCTION(arg) = (%_ClassOf(arg) === 'Function'); | 140 macro IS_SPEC_FUNCTION(arg) = (%_ClassOf(arg) === 'Function'); | 
| 141 | 141 | 
|  | 142 # Macro for ES6 CheckObjectCoercible | 
|  | 143 # Will throw a TypeError of the form "[functionName] called on null or undefined
     ". | 
|  | 144 macro CHECK_OBJECT_COERCIBLE(arg, functionName) = if (IS_NULL_OR_UNDEFINED(arg) 
     && !IS_UNDETECTABLE(arg)) throw MakeTypeError('called_on_null_or_undefined', [fu
     nctionName]); | 
|  | 145 | 
| 142 # Indices in bound function info retrieved by %BoundFunctionGetBindings(...). | 146 # Indices in bound function info retrieved by %BoundFunctionGetBindings(...). | 
| 143 const kBoundFunctionIndex = 0; | 147 const kBoundFunctionIndex = 0; | 
| 144 const kBoundThisIndex = 1; | 148 const kBoundThisIndex = 1; | 
| 145 const kBoundArgumentsStartIndex = 2; | 149 const kBoundArgumentsStartIndex = 2; | 
| 146 | 150 | 
| 147 # Inline macros. Use %IS_VAR to make sure arg is evaluated only once. | 151 # Inline macros. Use %IS_VAR to make sure arg is evaluated only once. | 
| 148 macro NUMBER_IS_NAN(arg) = (!%_IsSmi(%IS_VAR(arg)) && !(arg == arg)); | 152 macro NUMBER_IS_NAN(arg) = (!%_IsSmi(%IS_VAR(arg)) && !(arg == arg)); | 
| 149 macro NUMBER_IS_FINITE(arg) = (%_IsSmi(%IS_VAR(arg)) || ((arg == arg) && (arg !=
      1/0) && (arg != -1/0))); | 153 macro NUMBER_IS_FINITE(arg) = (%_IsSmi(%IS_VAR(arg)) || ((arg == arg) && (arg !=
      1/0) && (arg != -1/0))); | 
| 150 macro TO_INTEGER(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToInteger(ToNumber
     (arg))); | 154 macro TO_INTEGER(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToInteger(ToNumber
     (arg))); | 
| 151 macro TO_INTEGER_FOR_SIDE_EFFECT(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : ToNumber(
     arg)); | 155 macro TO_INTEGER_FOR_SIDE_EFFECT(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : ToNumber(
     arg)); | 
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 260 const COMPILATION_TYPE_JSON = 2; | 264 const COMPILATION_TYPE_JSON = 2; | 
| 261 | 265 | 
| 262 # Matches Messages::kNoLineNumberInfo from v8.h | 266 # Matches Messages::kNoLineNumberInfo from v8.h | 
| 263 const kNoLineNumberInfo = 0; | 267 const kNoLineNumberInfo = 0; | 
| 264 | 268 | 
| 265 # Matches PropertyAttributes from property-details.h | 269 # Matches PropertyAttributes from property-details.h | 
| 266 const PROPERTY_ATTRIBUTES_NONE = 0; | 270 const PROPERTY_ATTRIBUTES_NONE = 0; | 
| 267 const PROPERTY_ATTRIBUTES_STRING = 8; | 271 const PROPERTY_ATTRIBUTES_STRING = 8; | 
| 268 const PROPERTY_ATTRIBUTES_SYMBOLIC = 16; | 272 const PROPERTY_ATTRIBUTES_SYMBOLIC = 16; | 
| 269 const PROPERTY_ATTRIBUTES_PRIVATE_SYMBOL = 32; | 273 const PROPERTY_ATTRIBUTES_PRIVATE_SYMBOL = 32; | 
| OLD | NEW | 
|---|