Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Side by Side Diff: src/objects.h

Issue 11293168: Rename kAsciiStringTag to kOneByteStringTag (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 // There are not enough types that the non-string types (with bit 7 set) can 460 // There are not enough types that the non-string types (with bit 7 set) can
461 // have bit 6 set too. 461 // have bit 6 set too.
462 const uint32_t kIsSymbolMask = 0x40; 462 const uint32_t kIsSymbolMask = 0x40;
463 const uint32_t kNotSymbolTag = 0x0; 463 const uint32_t kNotSymbolTag = 0x0;
464 const uint32_t kSymbolTag = 0x40; 464 const uint32_t kSymbolTag = 0x40;
465 465
466 // If bit 7 is clear then bit 2 indicates whether the string consists of 466 // If bit 7 is clear then bit 2 indicates whether the string consists of
467 // two-byte characters or one-byte characters. 467 // two-byte characters or one-byte characters.
468 const uint32_t kStringEncodingMask = 0x4; 468 const uint32_t kStringEncodingMask = 0x4;
469 const uint32_t kTwoByteStringTag = 0x0; 469 const uint32_t kTwoByteStringTag = 0x0;
470 const uint32_t kAsciiStringTag = 0x4; 470 const uint32_t kOneByteStringTag = 0x4;
471 471
472 // If bit 7 is clear, the low-order 2 bits indicate the representation 472 // If bit 7 is clear, the low-order 2 bits indicate the representation
473 // of the string. 473 // of the string.
474 const uint32_t kStringRepresentationMask = 0x03; 474 const uint32_t kStringRepresentationMask = 0x03;
475 enum StringRepresentationTag { 475 enum StringRepresentationTag {
476 kSeqStringTag = 0x0, 476 kSeqStringTag = 0x0,
477 kConsStringTag = 0x1, 477 kConsStringTag = 0x1,
478 kExternalStringTag = 0x2, 478 kExternalStringTag = 0x2,
479 kSlicedStringTag = 0x3 479 kSlicedStringTag = 0x3
480 }; 480 };
(...skipping 30 matching lines...) Expand all
511 const uint32_t kShortcutTypeMask = 511 const uint32_t kShortcutTypeMask =
512 kIsNotStringMask | 512 kIsNotStringMask |
513 kIsSymbolMask | 513 kIsSymbolMask |
514 kStringRepresentationMask; 514 kStringRepresentationMask;
515 const uint32_t kShortcutTypeTag = kConsStringTag; 515 const uint32_t kShortcutTypeTag = kConsStringTag;
516 516
517 517
518 enum InstanceType { 518 enum InstanceType {
519 // String types. 519 // String types.
520 SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kSeqStringTag, 520 SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kSeqStringTag,
521 ASCII_SYMBOL_TYPE = kAsciiStringTag | kSymbolTag | kSeqStringTag, 521 ASCII_SYMBOL_TYPE = kOneByteStringTag | kSymbolTag | kSeqStringTag,
522 CONS_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kConsStringTag, 522 CONS_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kConsStringTag,
523 CONS_ASCII_SYMBOL_TYPE = kAsciiStringTag | kSymbolTag | kConsStringTag, 523 CONS_ASCII_SYMBOL_TYPE = kOneByteStringTag | kSymbolTag | kConsStringTag,
524 SHORT_EXTERNAL_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | 524 SHORT_EXTERNAL_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag |
525 kExternalStringTag | kShortExternalStringTag, 525 kExternalStringTag | kShortExternalStringTag,
526 SHORT_EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE = 526 SHORT_EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE =
527 kTwoByteStringTag | kSymbolTag | kExternalStringTag | 527 kTwoByteStringTag | kSymbolTag | kExternalStringTag |
528 kAsciiDataHintTag | kShortExternalStringTag, 528 kAsciiDataHintTag | kShortExternalStringTag,
529 SHORT_EXTERNAL_ASCII_SYMBOL_TYPE = kAsciiStringTag | kExternalStringTag | 529 SHORT_EXTERNAL_ASCII_SYMBOL_TYPE = kOneByteStringTag | kExternalStringTag |
530 kSymbolTag | kShortExternalStringTag, 530 kSymbolTag | kShortExternalStringTag,
531 EXTERNAL_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kExternalStringTag, 531 EXTERNAL_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kExternalStringTag,
532 EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE = 532 EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE =
533 kTwoByteStringTag | kSymbolTag | kExternalStringTag | kAsciiDataHintTag, 533 kTwoByteStringTag | kSymbolTag | kExternalStringTag | kAsciiDataHintTag,
534 EXTERNAL_ASCII_SYMBOL_TYPE = 534 EXTERNAL_ASCII_SYMBOL_TYPE =
535 kAsciiStringTag | kSymbolTag | kExternalStringTag, 535 kOneByteStringTag | kSymbolTag | kExternalStringTag,
536 STRING_TYPE = kTwoByteStringTag | kSeqStringTag, 536 STRING_TYPE = kTwoByteStringTag | kSeqStringTag,
537 ASCII_STRING_TYPE = kAsciiStringTag | kSeqStringTag, 537 ASCII_STRING_TYPE = kOneByteStringTag | kSeqStringTag,
538 CONS_STRING_TYPE = kTwoByteStringTag | kConsStringTag, 538 CONS_STRING_TYPE = kTwoByteStringTag | kConsStringTag,
539 CONS_ASCII_STRING_TYPE = kAsciiStringTag | kConsStringTag, 539 CONS_ASCII_STRING_TYPE = kOneByteStringTag | kConsStringTag,
540 SLICED_STRING_TYPE = kTwoByteStringTag | kSlicedStringTag, 540 SLICED_STRING_TYPE = kTwoByteStringTag | kSlicedStringTag,
541 SLICED_ASCII_STRING_TYPE = kAsciiStringTag | kSlicedStringTag, 541 SLICED_ASCII_STRING_TYPE = kOneByteStringTag | kSlicedStringTag,
542 SHORT_EXTERNAL_STRING_TYPE = 542 SHORT_EXTERNAL_STRING_TYPE =
543 kTwoByteStringTag | kExternalStringTag | kShortExternalStringTag, 543 kTwoByteStringTag | kExternalStringTag | kShortExternalStringTag,
544 SHORT_EXTERNAL_STRING_WITH_ASCII_DATA_TYPE = 544 SHORT_EXTERNAL_STRING_WITH_ASCII_DATA_TYPE =
545 kTwoByteStringTag | kExternalStringTag | 545 kTwoByteStringTag | kExternalStringTag |
546 kAsciiDataHintTag | kShortExternalStringTag, 546 kAsciiDataHintTag | kShortExternalStringTag,
547 SHORT_EXTERNAL_ASCII_STRING_TYPE = 547 SHORT_EXTERNAL_ASCII_STRING_TYPE =
548 kAsciiStringTag | kExternalStringTag | kShortExternalStringTag, 548 kOneByteStringTag | kExternalStringTag | kShortExternalStringTag,
549 EXTERNAL_STRING_TYPE = kTwoByteStringTag | kExternalStringTag, 549 EXTERNAL_STRING_TYPE = kTwoByteStringTag | kExternalStringTag,
550 EXTERNAL_STRING_WITH_ASCII_DATA_TYPE = 550 EXTERNAL_STRING_WITH_ASCII_DATA_TYPE =
551 kTwoByteStringTag | kExternalStringTag | kAsciiDataHintTag, 551 kTwoByteStringTag | kExternalStringTag | kAsciiDataHintTag,
552 // LAST_STRING_TYPE 552 // LAST_STRING_TYPE
553 EXTERNAL_ASCII_STRING_TYPE = kAsciiStringTag | kExternalStringTag, 553 EXTERNAL_ASCII_STRING_TYPE = kOneByteStringTag | kExternalStringTag,
554 PRIVATE_EXTERNAL_ASCII_STRING_TYPE = EXTERNAL_ASCII_STRING_TYPE, 554 PRIVATE_EXTERNAL_ASCII_STRING_TYPE = EXTERNAL_ASCII_STRING_TYPE,
555 555
556 // Objects allocated in their own spaces (never in new space). 556 // Objects allocated in their own spaces (never in new space).
557 MAP_TYPE = kNotStringTag, // FIRST_NONSTRING_TYPE 557 MAP_TYPE = kNotStringTag, // FIRST_NONSTRING_TYPE
558 CODE_TYPE, 558 CODE_TYPE,
559 ODDBALL_TYPE, 559 ODDBALL_TYPE,
560 JS_GLOBAL_PROPERTY_CELL_TYPE, 560 JS_GLOBAL_PROPERTY_CELL_TYPE,
561 561
562 // "Data", objects that cannot contain non-map-word pointers to heap 562 // "Data", objects that cannot contain non-map-word pointers to heap
563 // objects. 563 // objects.
(...skipping 8412 matching lines...) Expand 10 before | Expand all | Expand 10 after
8976 } else { 8976 } else {
8977 value &= ~(1 << bit_position); 8977 value &= ~(1 << bit_position);
8978 } 8978 }
8979 return value; 8979 return value;
8980 } 8980 }
8981 }; 8981 };
8982 8982
8983 } } // namespace v8::internal 8983 } } // namespace v8::internal
8984 8984
8985 #endif // V8_OBJECTS_H_ 8985 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698