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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 macro TO_NUMBER_INLINE(arg) = (IS_NUMBER(%IS_VAR(arg)) ? arg : NonNumberToNumber
(arg)); | 164 macro TO_NUMBER_INLINE(arg) = (IS_NUMBER(%IS_VAR(arg)) ? arg : NonNumberToNumber
(arg)); |
165 macro TO_OBJECT_INLINE(arg) = (IS_SPEC_OBJECT(%IS_VAR(arg)) ? arg : ToObject(arg
)); | 165 macro TO_OBJECT_INLINE(arg) = (IS_SPEC_OBJECT(%IS_VAR(arg)) ? arg : ToObject(arg
)); |
166 macro JSON_NUMBER_TO_STRING(arg) = ((%_IsSmi(%IS_VAR(arg)) || arg - arg == 0) ?
%_NumberToString(arg) : "null"); | 166 macro JSON_NUMBER_TO_STRING(arg) = ((%_IsSmi(%IS_VAR(arg)) || arg - arg == 0) ?
%_NumberToString(arg) : "null"); |
167 | 167 |
168 # Private names. | 168 # Private names. |
169 # GET_PRIVATE should only be used if the property is known to exists on obj | 169 # GET_PRIVATE should only be used if the property is known to exists on obj |
170 # itself (it should really use %GetOwnProperty, but that would be way slower). | 170 # itself (it should really use %GetOwnProperty, but that would be way slower). |
171 macro GLOBAL_PRIVATE(name) = (%CreateGlobalPrivateSymbol(name)); | 171 macro GLOBAL_PRIVATE(name) = (%CreateGlobalPrivateSymbol(name)); |
172 macro NEW_PRIVATE(name) = (%CreatePrivateSymbol(name)); | 172 macro NEW_PRIVATE(name) = (%CreatePrivateSymbol(name)); |
173 macro IS_PRIVATE(sym) = (%SymbolIsPrivate(sym)); | 173 macro IS_PRIVATE(sym) = (%SymbolIsPrivate(sym)); |
174 macro HAS_PRIVATE(obj, sym) = (%HasLocalProperty(obj, sym)); | 174 macro HAS_PRIVATE(obj, sym) = (%HasOwnProperty(obj, sym)); |
175 macro GET_PRIVATE(obj, sym) = (obj[sym]); | 175 macro GET_PRIVATE(obj, sym) = (obj[sym]); |
176 macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val); | 176 macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val); |
177 macro DELETE_PRIVATE(obj, sym) = (delete obj[sym]); | 177 macro DELETE_PRIVATE(obj, sym) = (delete obj[sym]); |
178 | 178 |
179 # Constants. The compiler constant folds them. | 179 # Constants. The compiler constant folds them. |
180 const NAN = $NaN; | 180 const NAN = $NaN; |
181 const INFINITY = (1/0); | 181 const INFINITY = (1/0); |
182 const UNDEFINED = (void 0); | 182 const UNDEFINED = (void 0); |
183 | 183 |
184 # Macros implemented in Python. | 184 # Macros implemented in Python. |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 # Matches PropertyAttributes from property-details.h | 276 # Matches PropertyAttributes from property-details.h |
277 const PROPERTY_ATTRIBUTES_NONE = 0; | 277 const PROPERTY_ATTRIBUTES_NONE = 0; |
278 const PROPERTY_ATTRIBUTES_STRING = 8; | 278 const PROPERTY_ATTRIBUTES_STRING = 8; |
279 const PROPERTY_ATTRIBUTES_SYMBOLIC = 16; | 279 const PROPERTY_ATTRIBUTES_SYMBOLIC = 16; |
280 const PROPERTY_ATTRIBUTES_PRIVATE_SYMBOL = 32; | 280 const PROPERTY_ATTRIBUTES_PRIVATE_SYMBOL = 32; |
281 | 281 |
282 # Use for keys, values and entries iterators. | 282 # Use for keys, values and entries iterators. |
283 const ITERATOR_KIND_KEYS = 1; | 283 const ITERATOR_KIND_KEYS = 1; |
284 const ITERATOR_KIND_VALUES = 2; | 284 const ITERATOR_KIND_VALUES = 2; |
285 const ITERATOR_KIND_ENTRIES = 3; | 285 const ITERATOR_KIND_ENTRIES = 3; |
OLD | NEW |