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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 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)); |
156 macro TO_INTEGER_MAP_MINUS_ZERO(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToI
ntegerMapMinusZero(ToNumber(arg))); | 156 macro TO_INTEGER_MAP_MINUS_ZERO(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToI
ntegerMapMinusZero(ToNumber(arg))); |
157 macro TO_INT32(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : (arg >> 0)); | 157 macro TO_INT32(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : (arg >> 0)); |
158 macro TO_UINT32(arg) = (arg >>> 0); | 158 macro TO_UINT32(arg) = (arg >>> 0); |
159 macro TO_STRING_INLINE(arg) = (IS_STRING(%IS_VAR(arg)) ? arg : NonStringToString
(arg)); | 159 macro TO_STRING_INLINE(arg) = (IS_STRING(%IS_VAR(arg)) ? arg : NonStringToString
(arg)); |
160 macro TO_NUMBER_INLINE(arg) = (IS_NUMBER(%IS_VAR(arg)) ? arg : NonNumberToNumber
(arg)); | 160 macro TO_NUMBER_INLINE(arg) = (IS_NUMBER(%IS_VAR(arg)) ? arg : NonNumberToNumber
(arg)); |
161 macro TO_OBJECT_INLINE(arg) = (IS_SPEC_OBJECT(%IS_VAR(arg)) ? arg : ToObject(arg
)); | 161 macro TO_OBJECT_INLINE(arg) = (IS_SPEC_OBJECT(%IS_VAR(arg)) ? arg : ToObject(arg
)); |
162 macro JSON_NUMBER_TO_STRING(arg) = ((%_IsSmi(%IS_VAR(arg)) || arg - arg == 0) ?
%_NumberToString(arg) : "null"); | 162 macro JSON_NUMBER_TO_STRING(arg) = ((%_IsSmi(%IS_VAR(arg)) || arg - arg == 0) ?
%_NumberToString(arg) : "null"); |
163 | 163 |
164 # Private names. | 164 # Private names. |
| 165 macro GLOBAL_PRIVATE(name) = (%CreateGlobalPrivateSymbol(name)); |
165 macro NEW_PRIVATE(name) = (%CreatePrivateSymbol(name)); | 166 macro NEW_PRIVATE(name) = (%CreatePrivateSymbol(name)); |
166 macro IS_PRIVATE(sym) = (%SymbolIsPrivate(sym)); | 167 macro IS_PRIVATE(sym) = (%SymbolIsPrivate(sym)); |
167 macro HAS_PRIVATE(obj, sym) = (sym in obj); | 168 macro HAS_PRIVATE(obj, sym) = (sym in obj); |
168 macro GET_PRIVATE(obj, sym) = (obj[sym]); | 169 macro GET_PRIVATE(obj, sym) = (obj[sym]); |
169 macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val); | 170 macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val); |
170 macro DELETE_PRIVATE(obj, sym) = (delete obj[sym]); | 171 macro DELETE_PRIVATE(obj, sym) = (delete obj[sym]); |
171 | 172 |
172 # Constants. The compiler constant folds them. | 173 # Constants. The compiler constant folds them. |
173 const NAN = $NaN; | 174 const NAN = $NaN; |
174 const INFINITY = (1/0); | 175 const INFINITY = (1/0); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 const COMPILATION_TYPE_JSON = 2; | 265 const COMPILATION_TYPE_JSON = 2; |
265 | 266 |
266 # Matches Messages::kNoLineNumberInfo from v8.h | 267 # Matches Messages::kNoLineNumberInfo from v8.h |
267 const kNoLineNumberInfo = 0; | 268 const kNoLineNumberInfo = 0; |
268 | 269 |
269 # Matches PropertyAttributes from property-details.h | 270 # Matches PropertyAttributes from property-details.h |
270 const PROPERTY_ATTRIBUTES_NONE = 0; | 271 const PROPERTY_ATTRIBUTES_NONE = 0; |
271 const PROPERTY_ATTRIBUTES_STRING = 8; | 272 const PROPERTY_ATTRIBUTES_STRING = 8; |
272 const PROPERTY_ATTRIBUTES_SYMBOLIC = 16; | 273 const PROPERTY_ATTRIBUTES_SYMBOLIC = 16; |
273 const PROPERTY_ATTRIBUTES_PRIVATE_SYMBOL = 32; | 274 const PROPERTY_ATTRIBUTES_PRIVATE_SYMBOL = 32; |
OLD | NEW |