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

Side by Side Diff: src/objects.h

Issue 17895002: The check for internalized strings relied on the fact that we had less (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: More comments Created 7 years, 5 months 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/ia32/macro-assembler-ia32.cc ('k') | src/objects-inl.h » ('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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 STRUCT_LIST_DEBUGGER(V) 568 STRUCT_LIST_DEBUGGER(V)
569 569
570 // We use the full 8 bits of the instance_type field to encode heap object 570 // We use the full 8 bits of the instance_type field to encode heap object
571 // instance types. The high-order bit (bit 7) is set if the object is not a 571 // instance types. The high-order bit (bit 7) is set if the object is not a
572 // string, and cleared if it is a string. 572 // string, and cleared if it is a string.
573 const uint32_t kIsNotStringMask = 0x80; 573 const uint32_t kIsNotStringMask = 0x80;
574 const uint32_t kStringTag = 0x0; 574 const uint32_t kStringTag = 0x0;
575 const uint32_t kNotStringTag = 0x80; 575 const uint32_t kNotStringTag = 0x80;
576 576
577 // Bit 6 indicates that the object is an internalized string (if set) or not. 577 // Bit 6 indicates that the object is an internalized string (if set) or not.
578 // There are not enough types that the non-string types (with bit 7 set) can 578 // Bit 7 has to be clear as well.
579 // have bit 6 set too.
580 const uint32_t kIsInternalizedMask = 0x40; 579 const uint32_t kIsInternalizedMask = 0x40;
581 const uint32_t kNotInternalizedTag = 0x0; 580 const uint32_t kNotInternalizedTag = 0x0;
582 const uint32_t kInternalizedTag = 0x40; 581 const uint32_t kInternalizedTag = 0x40;
583 582
584 // If bit 7 is clear then bit 2 indicates whether the string consists of 583 // If bit 7 is clear then bit 2 indicates whether the string consists of
585 // two-byte characters or one-byte characters. 584 // two-byte characters or one-byte characters.
586 const uint32_t kStringEncodingMask = 0x4; 585 const uint32_t kStringEncodingMask = 0x4;
587 const uint32_t kTwoByteStringTag = 0x0; 586 const uint32_t kTwoByteStringTag = 0x0;
588 const uint32_t kOneByteStringTag = 0x4; 587 const uint32_t kOneByteStringTag = 0x4;
589 588
(...skipping 9135 matching lines...) Expand 10 before | Expand all | Expand 10 after
9725 } else { 9724 } else {
9726 value &= ~(1 << bit_position); 9725 value &= ~(1 << bit_position);
9727 } 9726 }
9728 return value; 9727 return value;
9729 } 9728 }
9730 }; 9729 };
9731 9730
9732 } } // namespace v8::internal 9731 } } // namespace v8::internal
9733 9732
9734 #endif // V8_OBJECTS_H_ 9733 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698