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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 macro TO_LENGTH_OR_UINT32(arg) = (FLAG_harmony_tolength ? TO_LENGTH(arg) : TO_UI
NT32(arg)); | 153 macro TO_LENGTH_OR_UINT32(arg) = (FLAG_harmony_tolength ? TO_LENGTH(arg) : TO_UI
NT32(arg)); |
154 macro TO_LENGTH_OR_INTEGER(arg) = (FLAG_harmony_tolength ? TO_LENGTH(arg) : TO_I
NTEGER(arg)); | 154 macro TO_LENGTH_OR_INTEGER(arg) = (FLAG_harmony_tolength ? TO_LENGTH(arg) : TO_I
NTEGER(arg)); |
155 macro TO_STRING(arg) = (%_ToString(arg)); | 155 macro TO_STRING(arg) = (%_ToString(arg)); |
156 macro TO_NUMBER(arg) = (%_ToNumber(arg)); | 156 macro TO_NUMBER(arg) = (%_ToNumber(arg)); |
157 macro TO_OBJECT(arg) = (%_ToObject(arg)); | 157 macro TO_OBJECT(arg) = (%_ToObject(arg)); |
158 macro TO_PRIMITIVE(arg) = (%_ToPrimitive(arg)); | 158 macro TO_PRIMITIVE(arg) = (%_ToPrimitive(arg)); |
159 macro TO_PRIMITIVE_NUMBER(arg) = (%_ToPrimitive_Number(arg)); | 159 macro TO_PRIMITIVE_NUMBER(arg) = (%_ToPrimitive_Number(arg)); |
160 macro TO_PRIMITIVE_STRING(arg) = (%_ToPrimitive_String(arg)); | 160 macro TO_PRIMITIVE_STRING(arg) = (%_ToPrimitive_String(arg)); |
161 macro TO_NAME(arg) = (%_ToName(arg)); | 161 macro TO_NAME(arg) = (%_ToName(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 macro HAS_OWN_PROPERTY(arg, index) = (%_CallFunction(arg, index, ObjectHasOwnPro
perty)); | 163 macro HAS_OWN_PROPERTY(arg, index) = (%_Call(ObjectHasOwnProperty, arg, index)); |
164 macro HAS_INDEX(array, index, is_array) = ((is_array && %_HasFastPackedElements(
%IS_VAR(array))) ? (index < array.length) : (index in array)); | 164 macro HAS_INDEX(array, index, is_array) = ((is_array && %_HasFastPackedElements(
%IS_VAR(array))) ? (index < array.length) : (index in array)); |
165 | 165 |
166 # Private names. | 166 # Private names. |
167 macro IS_PRIVATE(sym) = (%SymbolIsPrivate(sym)); | 167 macro IS_PRIVATE(sym) = (%SymbolIsPrivate(sym)); |
168 macro HAS_PRIVATE(obj, sym) = (%HasOwnProperty(obj, sym)); | 168 macro HAS_PRIVATE(obj, sym) = (%HasOwnProperty(obj, sym)); |
169 macro HAS_DEFINED_PRIVATE(obj, sym) = (!IS_UNDEFINED(obj[sym])); | 169 macro HAS_DEFINED_PRIVATE(obj, sym) = (!IS_UNDEFINED(obj[sym])); |
170 macro GET_PRIVATE(obj, sym) = (obj[sym]); | 170 macro GET_PRIVATE(obj, sym) = (obj[sym]); |
171 macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val); | 171 macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val); |
172 | 172 |
173 # Constants. The compiler constant folds them. | 173 # Constants. The compiler constant folds them. |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 (%_DebugIsActive() != 0)
%DebugPrepareStepInIfStepping(function); | 310 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (%_DebugIsActive() != 0)
%DebugPrepareStepInIfStepping(function); |
311 | 311 |
312 # SharedFlag equivalents | 312 # SharedFlag equivalents |
313 define kNotShared = false; | 313 define kNotShared = false; |
314 define kShared = true; | 314 define kShared = true; |
OLD | NEW |