| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 // heap.cc and mark-compact.cc. | 478 // heap.cc and mark-compact.cc. |
| 479 const uint32_t kShortcutTypeMask = | 479 const uint32_t kShortcutTypeMask = |
| 480 kIsNotStringMask | | 480 kIsNotStringMask | |
| 481 kIsSymbolMask | | 481 kIsSymbolMask | |
| 482 kStringRepresentationMask; | 482 kStringRepresentationMask; |
| 483 const uint32_t kShortcutTypeTag = kConsStringTag; | 483 const uint32_t kShortcutTypeTag = kConsStringTag; |
| 484 | 484 |
| 485 | 485 |
| 486 enum InstanceType { | 486 enum InstanceType { |
| 487 // String types. | 487 // String types. |
| 488 // FIRST_STRING_TYPE | |
| 489 SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kSeqStringTag, | 488 SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kSeqStringTag, |
| 490 ASCII_SYMBOL_TYPE = kAsciiStringTag | kSymbolTag | kSeqStringTag, | 489 ASCII_SYMBOL_TYPE = kAsciiStringTag | kSymbolTag | kSeqStringTag, |
| 491 CONS_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kConsStringTag, | 490 CONS_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kConsStringTag, |
| 492 CONS_ASCII_SYMBOL_TYPE = kAsciiStringTag | kSymbolTag | kConsStringTag, | 491 CONS_ASCII_SYMBOL_TYPE = kAsciiStringTag | kSymbolTag | kConsStringTag, |
| 493 EXTERNAL_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kExternalStringTag, | 492 EXTERNAL_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kExternalStringTag, |
| 494 EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE = | 493 EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE = |
| 495 kTwoByteStringTag | kSymbolTag | kExternalStringTag | kAsciiDataHintTag, | 494 kTwoByteStringTag | kSymbolTag | kExternalStringTag | kAsciiDataHintTag, |
| 496 EXTERNAL_ASCII_SYMBOL_TYPE = | 495 EXTERNAL_ASCII_SYMBOL_TYPE = |
| 497 kAsciiStringTag | kSymbolTag | kExternalStringTag, | 496 kAsciiStringTag | kSymbolTag | kExternalStringTag, |
| 498 STRING_TYPE = kTwoByteStringTag | kSeqStringTag, | 497 STRING_TYPE = kTwoByteStringTag | kSeqStringTag, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 | 560 |
| 562 JS_REGEXP_TYPE, // LAST_JS_OBJECT_TYPE, FIRST_FUNCTION_CLASS_TYPE | 561 JS_REGEXP_TYPE, // LAST_JS_OBJECT_TYPE, FIRST_FUNCTION_CLASS_TYPE |
| 563 | 562 |
| 564 JS_FUNCTION_TYPE, | 563 JS_FUNCTION_TYPE, |
| 565 | 564 |
| 566 // Pseudo-types | 565 // Pseudo-types |
| 567 FIRST_TYPE = 0x0, | 566 FIRST_TYPE = 0x0, |
| 568 LAST_TYPE = JS_FUNCTION_TYPE, | 567 LAST_TYPE = JS_FUNCTION_TYPE, |
| 569 INVALID_TYPE = FIRST_TYPE - 1, | 568 INVALID_TYPE = FIRST_TYPE - 1, |
| 570 FIRST_NONSTRING_TYPE = MAP_TYPE, | 569 FIRST_NONSTRING_TYPE = MAP_TYPE, |
| 571 FIRST_STRING_TYPE = FIRST_TYPE, | |
| 572 LAST_STRING_TYPE = FIRST_NONSTRING_TYPE - 1, | |
| 573 // Boundaries for testing for an external array. | 570 // Boundaries for testing for an external array. |
| 574 FIRST_EXTERNAL_ARRAY_TYPE = EXTERNAL_BYTE_ARRAY_TYPE, | 571 FIRST_EXTERNAL_ARRAY_TYPE = EXTERNAL_BYTE_ARRAY_TYPE, |
| 575 LAST_EXTERNAL_ARRAY_TYPE = EXTERNAL_PIXEL_ARRAY_TYPE, | 572 LAST_EXTERNAL_ARRAY_TYPE = EXTERNAL_PIXEL_ARRAY_TYPE, |
| 576 // Boundary for promotion to old data space/old pointer space. | 573 // Boundary for promotion to old data space/old pointer space. |
| 577 LAST_DATA_TYPE = FILLER_TYPE, | 574 LAST_DATA_TYPE = FILLER_TYPE, |
| 578 // Boundaries for testing the type is a JavaScript "object". Note that | 575 // Boundaries for testing the type is a JavaScript "object". Note that |
| 579 // function objects are not counted as objects, even though they are | 576 // function objects are not counted as objects, even though they are |
| 580 // implemented as such; only values whose typeof is "object" are included. | 577 // implemented as such; only values whose typeof is "object" are included. |
| 581 FIRST_JS_OBJECT_TYPE = JS_VALUE_TYPE, | 578 FIRST_JS_OBJECT_TYPE = JS_VALUE_TYPE, |
| 582 LAST_JS_OBJECT_TYPE = JS_REGEXP_TYPE, | 579 LAST_JS_OBJECT_TYPE = JS_REGEXP_TYPE, |
| (...skipping 6132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6715 } else { | 6712 } else { |
| 6716 value &= ~(1 << bit_position); | 6713 value &= ~(1 << bit_position); |
| 6717 } | 6714 } |
| 6718 return value; | 6715 return value; |
| 6719 } | 6716 } |
| 6720 }; | 6717 }; |
| 6721 | 6718 |
| 6722 } } // namespace v8::internal | 6719 } } // namespace v8::internal |
| 6723 | 6720 |
| 6724 #endif // V8_OBJECTS_H_ | 6721 #endif // V8_OBJECTS_H_ |
| OLD | NEW |