| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 # Native cache ids. | 90 # Native cache ids. |
| 91 const STRING_TO_REGEXP_CACHE_ID = 0; | 91 const STRING_TO_REGEXP_CACHE_ID = 0; |
| 92 | 92 |
| 93 # Type query macros. | 93 # Type query macros. |
| 94 # | 94 # |
| 95 # Note: We have special support for typeof(foo) === 'bar' in the compiler. | 95 # Note: We have special support for typeof(foo) === 'bar' in the compiler. |
| 96 # It will *not* generate a runtime typeof call for the most important | 96 # It will *not* generate a runtime typeof call for the most important |
| 97 # values of 'bar'. | 97 # values of 'bar'. |
| 98 macro IS_NULL(arg) = (arg === null); | 98 macro IS_NULL(arg) = (arg === null); |
| 99 macro IS_NULL_OR_UNDEFINED(arg) = (arg == null); | 99 macro IS_NULL_OR_UNDEFINED(arg) = (arg == null); |
| 100 macro IS_UNDEFINED(arg) = (typeof(arg) === 'undefined'); | 100 macro IS_UNDEFINED(arg) = (arg === (void 0)); |
| 101 macro IS_NUMBER(arg) = (typeof(arg) === 'number'); | 101 macro IS_NUMBER(arg) = (typeof(arg) === 'number'); |
| 102 macro IS_STRING(arg) = (typeof(arg) === 'string'); | 102 macro IS_STRING(arg) = (typeof(arg) === 'string'); |
| 103 macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean'); | 103 macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean'); |
| 104 macro IS_SYMBOL(arg) = (typeof(arg) === 'symbol'); | 104 macro IS_SYMBOL(arg) = (typeof(arg) === 'symbol'); |
| 105 macro IS_OBJECT(arg) = (%_IsObject(arg)); | 105 macro IS_OBJECT(arg) = (%_IsObject(arg)); |
| 106 macro IS_ARRAY(arg) = (%_IsArray(arg)); | 106 macro IS_ARRAY(arg) = (%_IsArray(arg)); |
| 107 macro IS_FUNCTION(arg) = (%_IsFunction(arg)); | 107 macro IS_FUNCTION(arg) = (%_IsFunction(arg)); |
| 108 macro IS_REGEXP(arg) = (%_IsRegExp(arg)); | 108 macro IS_REGEXP(arg) = (%_IsRegExp(arg)); |
| 109 macro IS_SET(arg) = (%_ClassOf(arg) === 'Set'); | 109 macro IS_SET(arg) = (%_ClassOf(arg) === 'Set'); |
| 110 macro IS_MAP(arg) = (%_ClassOf(arg) === 'Map'); | 110 macro IS_MAP(arg) = (%_ClassOf(arg) === 'Map'); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 const COMPILATION_TYPE_JSON = 2; | 265 const COMPILATION_TYPE_JSON = 2; |
| 266 | 266 |
| 267 # Matches Messages::kNoLineNumberInfo from v8.h | 267 # Matches Messages::kNoLineNumberInfo from v8.h |
| 268 const kNoLineNumberInfo = 0; | 268 const kNoLineNumberInfo = 0; |
| 269 | 269 |
| 270 # Matches PropertyAttributes from property-details.h | 270 # Matches PropertyAttributes from property-details.h |
| 271 const PROPERTY_ATTRIBUTES_NONE = 0; | 271 const PROPERTY_ATTRIBUTES_NONE = 0; |
| 272 const PROPERTY_ATTRIBUTES_STRING = 8; | 272 const PROPERTY_ATTRIBUTES_STRING = 8; |
| 273 const PROPERTY_ATTRIBUTES_SYMBOLIC = 16; | 273 const PROPERTY_ATTRIBUTES_SYMBOLIC = 16; |
| 274 const PROPERTY_ATTRIBUTES_PRIVATE_SYMBOL = 32; | 274 const PROPERTY_ATTRIBUTES_PRIVATE_SYMBOL = 32; |
| OLD | NEW |