Chromium Code Reviews| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 152 macro TO_INTEGER_MAP_MINUS_ZERO(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToI ntegerMapMinusZero(ToNumber(arg))); | 152 macro TO_INTEGER_MAP_MINUS_ZERO(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToI ntegerMapMinusZero(ToNumber(arg))); |
| 153 macro TO_INT32(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : (arg >> 0)); | 153 macro TO_INT32(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : (arg >> 0)); |
| 154 macro TO_UINT32(arg) = (arg >>> 0); | 154 macro TO_UINT32(arg) = (arg >>> 0); |
| 155 macro TO_STRING_INLINE(arg) = (IS_STRING(%IS_VAR(arg)) ? arg : NonStringToString (arg)); | 155 macro TO_STRING_INLINE(arg) = (IS_STRING(%IS_VAR(arg)) ? arg : NonStringToString (arg)); |
| 156 macro TO_NUMBER_INLINE(arg) = (IS_NUMBER(%IS_VAR(arg)) ? arg : NonNumberToNumber (arg)); | 156 macro TO_NUMBER_INLINE(arg) = (IS_NUMBER(%IS_VAR(arg)) ? arg : NonNumberToNumber (arg)); |
| 157 macro TO_OBJECT_INLINE(arg) = (IS_SPEC_OBJECT(%IS_VAR(arg)) ? arg : ToObject(arg )); | 157 macro TO_OBJECT_INLINE(arg) = (IS_SPEC_OBJECT(%IS_VAR(arg)) ? arg : ToObject(arg )); |
| 158 macro JSON_NUMBER_TO_STRING(arg) = ((%_IsSmi(%IS_VAR(arg)) || arg - arg == 0) ? %_NumberToString(arg) : "null"); | 158 macro JSON_NUMBER_TO_STRING(arg) = ((%_IsSmi(%IS_VAR(arg)) || arg - arg == 0) ? %_NumberToString(arg) : "null"); |
| 159 | 159 |
| 160 # Private names. | 160 # Private names. |
| 161 macro NEW_PRIVATE(name) = (%CreatePrivateSymbol(name)); | 161 macro NEW_PRIVATE(name) = (%CreatePrivateSymbol(name)); |
| 162 macro IS_PRIVATE(arg) = (%SymbolIsPrivate(arg)); | |
|
rossberg
2013/12/12 15:37:59
Nit: s/arg/sym/
arv (Not doing code reviews)
2013/12/16 21:51:21
Done.
| |
| 162 macro HAS_PRIVATE(obj, sym) = (sym in obj); | 163 macro HAS_PRIVATE(obj, sym) = (sym in obj); |
| 163 macro GET_PRIVATE(obj, sym) = (obj[sym]); | 164 macro GET_PRIVATE(obj, sym) = (obj[sym]); |
| 164 macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val); | 165 macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val); |
| 165 macro DELETE_PRIVATE(obj, sym) = (delete obj[sym]); | 166 macro DELETE_PRIVATE(obj, sym) = (delete obj[sym]); |
| 166 | 167 |
| 167 # Constants. The compiler constant folds them. | 168 # Constants. The compiler constant folds them. |
| 168 const NAN = $NaN; | 169 const NAN = $NaN; |
| 169 const INFINITY = (1/0); | 170 const INFINITY = (1/0); |
| 170 const UNDEFINED = (void 0); | 171 const UNDEFINED = (void 0); |
| 171 | 172 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 253 const TYPE_EXTENSION = 1; | 254 const TYPE_EXTENSION = 1; |
| 254 const TYPE_NORMAL = 2; | 255 const TYPE_NORMAL = 2; |
| 255 | 256 |
| 256 # Matches Script::CompilationType from objects.h | 257 # Matches Script::CompilationType from objects.h |
| 257 const COMPILATION_TYPE_HOST = 0; | 258 const COMPILATION_TYPE_HOST = 0; |
| 258 const COMPILATION_TYPE_EVAL = 1; | 259 const COMPILATION_TYPE_EVAL = 1; |
| 259 const COMPILATION_TYPE_JSON = 2; | 260 const COMPILATION_TYPE_JSON = 2; |
| 260 | 261 |
| 261 # Matches Messages::kNoLineNumberInfo from v8.h | 262 # Matches Messages::kNoLineNumberInfo from v8.h |
| 262 const kNoLineNumberInfo = 0; | 263 const kNoLineNumberInfo = 0; |
| 264 | |
| 265 # Mathches Runtime::LocalPropertyKeyType from runtime.h | |
| 266 const PROPERTY_KEY_STRING = 1; | |
| 267 const PROPERTY_KEY_SYMBOL = 2; | |
| OLD | NEW |