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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 macro MIN_SIMPLE(argA, argB) = (argA < argB ? argA : argB); | 162 macro MIN_SIMPLE(argA, argB) = (argA < argB ? argA : argB); |
163 | 163 |
164 # Private names. | 164 # Private names. |
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)); |
167 macro HAS_DEFINED_PRIVATE(obj, sym) = (!IS_UNDEFINED(obj[sym])); | 167 macro HAS_DEFINED_PRIVATE(obj, sym) = (!IS_UNDEFINED(obj[sym])); |
168 macro GET_PRIVATE(obj, sym) = (obj[sym]); | 168 macro GET_PRIVATE(obj, sym) = (obj[sym]); |
169 macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val); | 169 macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val); |
170 | 170 |
171 # Constants. The compiler constant folds them. | 171 # Constants. The compiler constant folds them. |
172 define NAN = $NaN; | |
173 define INFINITY = (1/0); | 172 define INFINITY = (1/0); |
174 define UNDEFINED = (void 0); | 173 define UNDEFINED = (void 0); |
175 | 174 |
176 # Macros implemented in Python. | 175 # Macros implemented in Python. |
177 python macro CHAR_CODE(str) = ord(str[1]); | 176 python macro CHAR_CODE(str) = ord(str[1]); |
178 | 177 |
179 # Constants used on an array to implement the properties of the RegExp object. | 178 # Constants used on an array to implement the properties of the RegExp object. |
180 define REGEXP_NUMBER_OF_CAPTURES = 0; | 179 define REGEXP_NUMBER_OF_CAPTURES = 0; |
181 define REGEXP_FIRST_CAPTURE = 3; | 180 define REGEXP_FIRST_CAPTURE = 3; |
182 | 181 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 define NOT_FOUND = -1; | 303 define NOT_FOUND = -1; |
305 | 304 |
306 # Check whether debug is active. | 305 # Check whether debug is active. |
307 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); | 306 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); |
308 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup
portsStepping(function)); | 307 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup
portsStepping(function)); |
309 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (DEBUG_IS_STEPPING(functi
on)) %DebugPrepareStepInIfStepping(function); | 308 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (DEBUG_IS_STEPPING(functi
on)) %DebugPrepareStepInIfStepping(function); |
310 | 309 |
311 # SharedFlag equivalents | 310 # SharedFlag equivalents |
312 define kNotShared = false; | 311 define kNotShared = false; |
313 define kShared = true; | 312 define kShared = true; |
OLD | NEW |