OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 const uint32_t kShortcutTypeMask = | 523 const uint32_t kShortcutTypeMask = |
524 kIsNotStringMask | | 524 kIsNotStringMask | |
525 kIsSymbolMask | | 525 kIsSymbolMask | |
526 kStringRepresentationMask; | 526 kStringRepresentationMask; |
527 const uint32_t kShortcutTypeTag = kConsStringTag; | 527 const uint32_t kShortcutTypeTag = kConsStringTag; |
528 | 528 |
529 | 529 |
530 enum InstanceType { | 530 enum InstanceType { |
531 // String types. | 531 // String types. |
532 SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kSeqStringTag, | 532 SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kSeqStringTag, |
533 ASCII_SYMBOL_TYPE = kOneByteStringTag | kSymbolTag | kSeqStringTag, | 533 ASCII_SYMBOL_TYPE = kOneByteStringTag | kAsciiDataHintTag | kSymbolTag | |
| 534 kSeqStringTag, |
534 CONS_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kConsStringTag, | 535 CONS_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kConsStringTag, |
535 CONS_ASCII_SYMBOL_TYPE = kOneByteStringTag | kSymbolTag | kConsStringTag, | 536 CONS_ASCII_SYMBOL_TYPE = kOneByteStringTag | kAsciiDataHintTag | kSymbolTag | |
| 537 kConsStringTag, |
536 SHORT_EXTERNAL_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | | 538 SHORT_EXTERNAL_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | |
537 kExternalStringTag | kShortExternalStringTag, | 539 kExternalStringTag | kShortExternalStringTag, |
538 SHORT_EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE = | 540 SHORT_EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE = |
539 kTwoByteStringTag | kSymbolTag | kExternalStringTag | | 541 kTwoByteStringTag | kSymbolTag | kExternalStringTag | |
540 kAsciiDataHintTag | kShortExternalStringTag, | 542 kAsciiDataHintTag | kShortExternalStringTag, |
541 SHORT_EXTERNAL_ASCII_SYMBOL_TYPE = kOneByteStringTag | kExternalStringTag | | 543 SHORT_EXTERNAL_ASCII_SYMBOL_TYPE = kOneByteStringTag | kAsciiDataHintTag | |
542 kSymbolTag | kShortExternalStringTag, | 544 kExternalStringTag | kSymbolTag | |
| 545 kShortExternalStringTag, |
543 EXTERNAL_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kExternalStringTag, | 546 EXTERNAL_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kExternalStringTag, |
544 EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE = | 547 EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE = |
545 kTwoByteStringTag | kSymbolTag | kExternalStringTag | kAsciiDataHintTag, | 548 kTwoByteStringTag | kSymbolTag | kExternalStringTag | kAsciiDataHintTag, |
546 EXTERNAL_ASCII_SYMBOL_TYPE = | 549 EXTERNAL_ASCII_SYMBOL_TYPE = |
547 kOneByteStringTag | kSymbolTag | kExternalStringTag, | 550 kOneByteStringTag | kAsciiDataHintTag | kSymbolTag | kExternalStringTag, |
548 STRING_TYPE = kTwoByteStringTag | kSeqStringTag, | 551 STRING_TYPE = kTwoByteStringTag | kSeqStringTag, |
549 ASCII_STRING_TYPE = kOneByteStringTag | kSeqStringTag, | 552 ASCII_STRING_TYPE = kOneByteStringTag | kAsciiDataHintTag | kSeqStringTag, |
550 CONS_STRING_TYPE = kTwoByteStringTag | kConsStringTag, | 553 CONS_STRING_TYPE = kTwoByteStringTag | kConsStringTag, |
551 CONS_ASCII_STRING_TYPE = kOneByteStringTag | kConsStringTag, | 554 CONS_ASCII_STRING_TYPE = |
| 555 kOneByteStringTag | kAsciiDataHintTag | kConsStringTag, |
552 SLICED_STRING_TYPE = kTwoByteStringTag | kSlicedStringTag, | 556 SLICED_STRING_TYPE = kTwoByteStringTag | kSlicedStringTag, |
553 SLICED_ASCII_STRING_TYPE = kOneByteStringTag | kSlicedStringTag, | 557 SLICED_ASCII_STRING_TYPE = |
| 558 kOneByteStringTag | kAsciiDataHintTag | kSlicedStringTag, |
554 SHORT_EXTERNAL_STRING_TYPE = | 559 SHORT_EXTERNAL_STRING_TYPE = |
555 kTwoByteStringTag | kExternalStringTag | kShortExternalStringTag, | 560 kTwoByteStringTag | kExternalStringTag | kShortExternalStringTag, |
556 SHORT_EXTERNAL_STRING_WITH_ASCII_DATA_TYPE = | 561 SHORT_EXTERNAL_STRING_WITH_ASCII_DATA_TYPE = |
557 kTwoByteStringTag | kExternalStringTag | | 562 kTwoByteStringTag | kExternalStringTag | |
558 kAsciiDataHintTag | kShortExternalStringTag, | 563 kAsciiDataHintTag | kShortExternalStringTag, |
559 SHORT_EXTERNAL_ASCII_STRING_TYPE = | 564 SHORT_EXTERNAL_ASCII_STRING_TYPE = |
560 kOneByteStringTag | kExternalStringTag | kShortExternalStringTag, | 565 kOneByteStringTag | kAsciiDataHintTag | |
| 566 kExternalStringTag | kShortExternalStringTag, |
561 EXTERNAL_STRING_TYPE = kTwoByteStringTag | kExternalStringTag, | 567 EXTERNAL_STRING_TYPE = kTwoByteStringTag | kExternalStringTag, |
562 EXTERNAL_STRING_WITH_ASCII_DATA_TYPE = | 568 EXTERNAL_STRING_WITH_ASCII_DATA_TYPE = |
563 kTwoByteStringTag | kExternalStringTag | kAsciiDataHintTag, | 569 kTwoByteStringTag | kExternalStringTag | kAsciiDataHintTag, |
564 // LAST_STRING_TYPE | 570 // LAST_STRING_TYPE |
565 EXTERNAL_ASCII_STRING_TYPE = kOneByteStringTag | kExternalStringTag, | 571 EXTERNAL_ASCII_STRING_TYPE = |
| 572 kOneByteStringTag | kAsciiDataHintTag | kExternalStringTag, |
566 PRIVATE_EXTERNAL_ASCII_STRING_TYPE = EXTERNAL_ASCII_STRING_TYPE, | 573 PRIVATE_EXTERNAL_ASCII_STRING_TYPE = EXTERNAL_ASCII_STRING_TYPE, |
567 | 574 |
568 // Objects allocated in their own spaces (never in new space). | 575 // Objects allocated in their own spaces (never in new space). |
569 MAP_TYPE = kNotStringTag, // FIRST_NONSTRING_TYPE | 576 MAP_TYPE = kNotStringTag, // FIRST_NONSTRING_TYPE |
570 CODE_TYPE, | 577 CODE_TYPE, |
571 ODDBALL_TYPE, | 578 ODDBALL_TYPE, |
572 JS_GLOBAL_PROPERTY_CELL_TYPE, | 579 JS_GLOBAL_PROPERTY_CELL_TYPE, |
573 | 580 |
574 // "Data", objects that cannot contain non-map-word pointers to heap | 581 // "Data", objects that cannot contain non-map-word pointers to heap |
575 // objects. | 582 // objects. |
(...skipping 8464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9040 } else { | 9047 } else { |
9041 value &= ~(1 << bit_position); | 9048 value &= ~(1 << bit_position); |
9042 } | 9049 } |
9043 return value; | 9050 return value; |
9044 } | 9051 } |
9045 }; | 9052 }; |
9046 | 9053 |
9047 } } // namespace v8::internal | 9054 } } // namespace v8::internal |
9048 | 9055 |
9049 #endif // V8_OBJECTS_H_ | 9056 #endif // V8_OBJECTS_H_ |
OLD | NEW |