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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 const PROPERTY_ATTRIBUTES_NONE = 0; | 265 const PROPERTY_ATTRIBUTES_NONE = 0; |
266 const PROPERTY_ATTRIBUTES_STRING = 8; | 266 const PROPERTY_ATTRIBUTES_STRING = 8; |
267 const PROPERTY_ATTRIBUTES_SYMBOLIC = 16; | 267 const PROPERTY_ATTRIBUTES_SYMBOLIC = 16; |
268 const PROPERTY_ATTRIBUTES_PRIVATE_SYMBOL = 32; | 268 const PROPERTY_ATTRIBUTES_PRIVATE_SYMBOL = 32; |
269 | 269 |
270 # Use for keys, values and entries iterators. | 270 # Use for keys, values and entries iterators. |
271 const ITERATOR_KIND_KEYS = 1; | 271 const ITERATOR_KIND_KEYS = 1; |
272 const ITERATOR_KIND_VALUES = 2; | 272 const ITERATOR_KIND_VALUES = 2; |
273 const ITERATOR_KIND_ENTRIES = 3; | 273 const ITERATOR_KIND_ENTRIES = 3; |
274 | 274 |
| 275 # Needs prefixing |
| 276 const NUMBER_OF_BUCKETS_INDEX = 0; |
| 277 const NUMBER_OF_ELEMENTS_INDEX = 1; |
| 278 const NUMBER_OF_DELETED_ELEMENTS_INDEX = 2; |
| 279 const HASH_TABLE_START_INDEX = 3; |
| 280 const NOT_FOUND = -1; |
| 281 # For sets |
| 282 const SET_CHAIN_OFFSET = 1; |
| 283 const MAP_CHAIN_OFFSET = 2; |
| 284 |
| 285 macro SET_ENTRY_TO_INDEX(entry, numBuckets) = (3 + numBuckets + (entry << 1)); |
| 286 macro SET_KEY_AT(table, entry, numBuckets) = (%_FixedArrayGet(table, SET_ENTRY_T
O_INDEX(entry, numBuckets))); |
| 287 macro SET_CHAIN_AT(table, entry, numBuckets) = (%_FixedArrayGet(table, SET_ENTRY
_TO_INDEX(entry, numBuckets) + 1)); |
| 288 |
| 289 # TODO(adamk): Need to make multiplications not create HeapNumbers |
| 290 macro MAP_ENTRY_TO_INDEX(entry, numBuckets) = (3 + numBuckets + ((entry * 3) | 0
)); |
| 291 macro MAP_KEY_AT(table, entry, numBuckets) = (%_FixedArrayGet(table, MAP_ENTRY_T
O_INDEX(entry, numBuckets))); |
| 292 macro MAP_VALUE_AT(table, entry, numBuckets) = (%_FixedArrayGet(table, MAP_ENTRY
_TO_INDEX(entry, numBuckets) + 1)); |
| 293 macro MAP_CHAIN_AT(table, entry, numBuckets) = (%_FixedArrayGet(table, MAP_ENTRY
_TO_INDEX(entry, numBuckets) + 2)); |
| 294 |
275 # Check whether debug is active. | 295 # Check whether debug is active. |
276 const DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); | 296 const DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); |
277 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup
portsStepping(function)); | 297 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup
portsStepping(function)); |
278 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (DEBUG_IS_STEPPING(functi
on)) %DebugPrepareStepInIfStepping(function); | 298 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (DEBUG_IS_STEPPING(functi
on)) %DebugPrepareStepInIfStepping(function); |
OLD | NEW |