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

Side by Side Diff: src/objects.h

Issue 67126: Move STATIC_ASSERT to IsShortcutCandidate to fix the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 8 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/heap.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 kSlicedStringTag = 0x2, 440 kSlicedStringTag = 0x2,
441 kExternalStringTag = 0x3 441 kExternalStringTag = 0x3
442 }; 442 };
443 443
444 444
445 // A ConsString with an empty string as the right side is a candidate 445 // A ConsString with an empty string as the right side is a candidate
446 // for being shortcut by the garbage collector unless it is a 446 // for being shortcut by the garbage collector unless it is a
447 // symbol. It's not common to have non-flat symbols, so we do not 447 // symbol. It's not common to have non-flat symbols, so we do not
448 // shortcut them thereby avoiding turning symbols into strings. See 448 // shortcut them thereby avoiding turning symbols into strings. See
449 // heap.cc and mark-compact.cc. 449 // heap.cc and mark-compact.cc.
450 STATIC_ASSERT(kNotStringTag != 0 && kSymbolTag != 0);
451 const uint32_t kShortcutTypeMask = 450 const uint32_t kShortcutTypeMask =
452 kIsNotStringMask | 451 kIsNotStringMask |
453 kIsSymbolMask | 452 kIsSymbolMask |
454 kStringRepresentationMask; 453 kStringRepresentationMask;
455 const uint32_t kShortcutTypeTag = kConsStringTag; 454 const uint32_t kShortcutTypeTag = kConsStringTag;
456 455
457 456
458 enum InstanceType { 457 enum InstanceType {
459 SHORT_SYMBOL_TYPE = kShortStringTag | kSymbolTag | kSeqStringTag, 458 SHORT_SYMBOL_TYPE = kShortStringTag | kSymbolTag | kSeqStringTag,
460 MEDIUM_SYMBOL_TYPE = kMediumStringTag | kSymbolTag | kSeqStringTag, 459 MEDIUM_SYMBOL_TYPE = kMediumStringTag | kSymbolTag | kSeqStringTag,
(...skipping 3868 matching lines...) Expand 10 before | Expand all | Expand 10 after
4329 } else { 4328 } else {
4330 value &= ~(1 << bit_position); 4329 value &= ~(1 << bit_position);
4331 } 4330 }
4332 return value; 4331 return value;
4333 } 4332 }
4334 }; 4333 };
4335 4334
4336 } } // namespace v8::internal 4335 } } // namespace v8::internal
4337 4336
4338 #endif // V8_OBJECTS_H_ 4337 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698