| 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 const uint32_t kAsciiStringTag = 0x4; | 403 const uint32_t kAsciiStringTag = 0x4; |
| 404 | 404 |
| 405 // If bit 7 is clear, the low-order 2 bits indicate the representation | 405 // If bit 7 is clear, the low-order 2 bits indicate the representation |
| 406 // of the string. | 406 // of the string. |
| 407 const uint32_t kStringRepresentationMask = 0x03; | 407 const uint32_t kStringRepresentationMask = 0x03; |
| 408 enum StringRepresentationTag { | 408 enum StringRepresentationTag { |
| 409 kSeqStringTag = 0x0, | 409 kSeqStringTag = 0x0, |
| 410 kConsStringTag = 0x1, | 410 kConsStringTag = 0x1, |
| 411 kExternalStringTag = 0x3 | 411 kExternalStringTag = 0x3 |
| 412 }; | 412 }; |
| 413 const uint32_t kIsConsStringMask = 0x1; |
| 413 | 414 |
| 414 | 415 |
| 415 // A ConsString with an empty string as the right side is a candidate | 416 // A ConsString with an empty string as the right side is a candidate |
| 416 // for being shortcut by the garbage collector unless it is a | 417 // for being shortcut by the garbage collector unless it is a |
| 417 // symbol. It's not common to have non-flat symbols, so we do not | 418 // symbol. It's not common to have non-flat symbols, so we do not |
| 418 // shortcut them thereby avoiding turning symbols into strings. See | 419 // shortcut them thereby avoiding turning symbols into strings. See |
| 419 // heap.cc and mark-compact.cc. | 420 // heap.cc and mark-compact.cc. |
| 420 const uint32_t kShortcutTypeMask = | 421 const uint32_t kShortcutTypeMask = |
| 421 kIsNotStringMask | | 422 kIsNotStringMask | |
| 422 kIsSymbolMask | | 423 kIsSymbolMask | |
| (...skipping 4828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5251 } else { | 5252 } else { |
| 5252 value &= ~(1 << bit_position); | 5253 value &= ~(1 << bit_position); |
| 5253 } | 5254 } |
| 5254 return value; | 5255 return value; |
| 5255 } | 5256 } |
| 5256 }; | 5257 }; |
| 5257 | 5258 |
| 5258 } } // namespace v8::internal | 5259 } } // namespace v8::internal |
| 5259 | 5260 |
| 5260 #endif // V8_OBJECTS_H_ | 5261 #endif // V8_OBJECTS_H_ |
| OLD | NEW |