| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 kSlicedStringTag = 0x2, | 440 kSlicedStringTag = 0x2, |
| 441 kExternalStringTag = 0x3 | 441 kExternalStringTag = 0x3 |
| 442 }; | 442 }; |
| 443 | 443 |
| 444 | 444 |
| 445 // A ConsString with an empty string as the right side is a candidate | 445 // A ConsString with an empty string as the right side is a candidate |
| 446 // for being shortcut by the garbage collector unless it is a | 446 // for being shortcut by the garbage collector unless it is a |
| 447 // symbol. It's not common to have non-flat symbols, so we do not | 447 // symbol. It's not common to have non-flat symbols, so we do not |
| 448 // shortcut them thereby avoiding turning symbols into strings. See | 448 // shortcut them thereby avoiding turning symbols into strings. See |
| 449 // heap.cc and mark-compact.cc. | 449 // heap.cc and mark-compact.cc. |
| 450 STATIC_ASSERT(kNotStringTag != 0 && kSymbolTag != 0); | |
| 451 const uint32_t kShortcutTypeMask = | 450 const uint32_t kShortcutTypeMask = |
| 452 kIsNotStringMask | | 451 kIsNotStringMask | |
| 453 kIsSymbolMask | | 452 kIsSymbolMask | |
| 454 kStringRepresentationMask; | 453 kStringRepresentationMask; |
| 455 const uint32_t kShortcutTypeTag = kConsStringTag; | 454 const uint32_t kShortcutTypeTag = kConsStringTag; |
| 456 | 455 |
| 457 | 456 |
| 458 enum InstanceType { | 457 enum InstanceType { |
| 459 SHORT_SYMBOL_TYPE = kShortStringTag | kSymbolTag | kSeqStringTag, | 458 SHORT_SYMBOL_TYPE = kShortStringTag | kSymbolTag | kSeqStringTag, |
| 460 MEDIUM_SYMBOL_TYPE = kMediumStringTag | kSymbolTag | kSeqStringTag, | 459 MEDIUM_SYMBOL_TYPE = kMediumStringTag | kSymbolTag | kSeqStringTag, |
| (...skipping 3868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4329 } else { | 4328 } else { |
| 4330 value &= ~(1 << bit_position); | 4329 value &= ~(1 << bit_position); |
| 4331 } | 4330 } |
| 4332 return value; | 4331 return value; |
| 4333 } | 4332 } |
| 4334 }; | 4333 }; |
| 4335 | 4334 |
| 4336 } } // namespace v8::internal | 4335 } } // namespace v8::internal |
| 4337 | 4336 |
| 4338 #endif // V8_OBJECTS_H_ | 4337 #endif // V8_OBJECTS_H_ |
| OLD | NEW |