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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 macro NUMBER_IS_FINITE(arg) = (%_IsSmi(%IS_VAR(arg)) || ((arg == arg) && (arg !=
1/0) && (arg != -1/0))); | 146 macro NUMBER_IS_FINITE(arg) = (%_IsSmi(%IS_VAR(arg)) || ((arg == arg) && (arg !=
1/0) && (arg != -1/0))); |
147 macro TO_INTEGER(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToInteger($toNumbe
r(arg))); | 147 macro TO_INTEGER(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToInteger($toNumbe
r(arg))); |
148 macro TO_INTEGER_FOR_SIDE_EFFECT(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : $toNumber
(arg)); | 148 macro TO_INTEGER_FOR_SIDE_EFFECT(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : $toNumber
(arg)); |
149 macro TO_INTEGER_MAP_MINUS_ZERO(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToI
ntegerMapMinusZero($toNumber(arg))); | 149 macro TO_INTEGER_MAP_MINUS_ZERO(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToI
ntegerMapMinusZero($toNumber(arg))); |
150 macro TO_INT32(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : (arg >> 0)); | 150 macro TO_INT32(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : (arg >> 0)); |
151 macro TO_UINT32(arg) = (arg >>> 0); | 151 macro TO_UINT32(arg) = (arg >>> 0); |
152 macro TO_STRING_INLINE(arg) = (IS_STRING(%IS_VAR(arg)) ? arg : $nonStringToStrin
g(arg)); | 152 macro TO_STRING_INLINE(arg) = (IS_STRING(%IS_VAR(arg)) ? arg : $nonStringToStrin
g(arg)); |
153 macro TO_NUMBER_INLINE(arg) = (IS_NUMBER(%IS_VAR(arg)) ? arg : $nonNumberToNumbe
r(arg)); | 153 macro TO_NUMBER_INLINE(arg) = (IS_NUMBER(%IS_VAR(arg)) ? arg : $nonNumberToNumbe
r(arg)); |
154 macro TO_OBJECT_INLINE(arg) = (IS_SPEC_OBJECT(%IS_VAR(arg)) ? arg : $toObject(ar
g)); | 154 macro TO_OBJECT_INLINE(arg) = (IS_SPEC_OBJECT(%IS_VAR(arg)) ? arg : $toObject(ar
g)); |
155 macro JSON_NUMBER_TO_STRING(arg) = ((%_IsSmi(%IS_VAR(arg)) || arg - arg == 0) ?
%_NumberToString(arg) : "null"); | 155 macro JSON_NUMBER_TO_STRING(arg) = ((%_IsSmi(%IS_VAR(arg)) || arg - arg == 0) ?
%_NumberToString(arg) : "null"); |
156 macro HAS_OWN_PROPERTY(arg, index) = (%_CallFunction(arg, index, $objectHasOwnPr
operty)); | 156 macro HAS_OWN_PROPERTY(arg, index) = (%_CallFunction(arg, index, ObjectHasOwnPro
perty)); |
157 macro SHOULD_CREATE_WRAPPER(functionName, receiver) = (!IS_SPEC_OBJECT(receiver)
&& %IsSloppyModeFunction(functionName)); | 157 macro SHOULD_CREATE_WRAPPER(functionName, receiver) = (!IS_SPEC_OBJECT(receiver)
&& %IsSloppyModeFunction(functionName)); |
158 macro HAS_INDEX(array, index, is_array) = ((is_array && %_HasFastPackedElements(
%IS_VAR(array))) ? (index < array.length) : (index in array)); | 158 macro HAS_INDEX(array, index, is_array) = ((is_array && %_HasFastPackedElements(
%IS_VAR(array))) ? (index < array.length) : (index in array)); |
159 | 159 |
160 # Private names. | 160 # Private names. |
161 # GET_PRIVATE should only be used if the property is known to exists on obj | 161 # GET_PRIVATE should only be used if the property is known to exists on obj |
162 # itself (it should really use %GetOwnProperty, but that would be way slower). | 162 # itself (it should really use %GetOwnProperty, but that would be way slower). |
163 macro GLOBAL_PRIVATE(name) = (%CreateGlobalPrivateOwnSymbol(name)); | 163 macro GLOBAL_PRIVATE(name) = (%CreateGlobalPrivateOwnSymbol(name)); |
164 macro NEW_PRIVATE_OWN(name) = (%CreatePrivateOwnSymbol(name)); | 164 macro NEW_PRIVATE_OWN(name) = (%CreatePrivateOwnSymbol(name)); |
165 macro IS_PRIVATE(sym) = (%SymbolIsPrivate(sym)); | 165 macro IS_PRIVATE(sym) = (%SymbolIsPrivate(sym)); |
166 macro HAS_PRIVATE(obj, sym) = (%HasOwnProperty(obj, sym)); | 166 macro HAS_PRIVATE(obj, sym) = (%HasOwnProperty(obj, sym)); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 macro ORDERED_HASH_MAP_VALUE_AT(table, entry, numBuckets) = (FIXED_ARRAY_GET(tab
le, ORDERED_HASH_MAP_ENTRY_TO_INDEX(entry, numBuckets) + 1)); | 301 macro ORDERED_HASH_MAP_VALUE_AT(table, entry, numBuckets) = (FIXED_ARRAY_GET(tab
le, ORDERED_HASH_MAP_ENTRY_TO_INDEX(entry, numBuckets) + 1)); |
302 macro ORDERED_HASH_MAP_CHAIN_AT(table, entry, numBuckets) = (FIXED_ARRAY_GET(tab
le, ORDERED_HASH_MAP_ENTRY_TO_INDEX(entry, numBuckets) + 2)); | 302 macro ORDERED_HASH_MAP_CHAIN_AT(table, entry, numBuckets) = (FIXED_ARRAY_GET(tab
le, ORDERED_HASH_MAP_ENTRY_TO_INDEX(entry, numBuckets) + 2)); |
303 | 303 |
304 # Must match OrderedHashTable::kNotFound. | 304 # Must match OrderedHashTable::kNotFound. |
305 define NOT_FOUND = -1; | 305 define NOT_FOUND = -1; |
306 | 306 |
307 # Check whether debug is active. | 307 # Check whether debug is active. |
308 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); | 308 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); |
309 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup
portsStepping(function)); | 309 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup
portsStepping(function)); |
310 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (DEBUG_IS_STEPPING(functi
on)) %DebugPrepareStepInIfStepping(function); | 310 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (DEBUG_IS_STEPPING(functi
on)) %DebugPrepareStepInIfStepping(function); |
OLD | NEW |