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

Side by Side Diff: src/objects-inl.h

Issue 12700008: remove latin-1 flag (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: removed SeqOneByteStringVerify Created 7 years, 9 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/objects-debug.cc ('k') | src/runtime.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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 case kTwoByteStringTag: 350 case kTwoByteStringTag:
351 return true; 351 return true;
352 default: // Cons or sliced string. Need to go deeper. 352 default: // Cons or sliced string. Need to go deeper.
353 return GetUnderlying()->IsTwoByteRepresentation(); 353 return GetUnderlying()->IsTwoByteRepresentation();
354 } 354 }
355 } 355 }
356 356
357 357
358 bool String::HasOnlyAsciiChars() { 358 bool String::HasOnlyAsciiChars() {
359 uint32_t type = map()->instance_type(); 359 uint32_t type = map()->instance_type();
360 #ifndef ENABLE_LATIN_1
361 return (type & kStringEncodingMask) == kOneByteStringTag ||
362 (type & kAsciiDataHintMask) == kAsciiDataHintTag;
363 #else
364 return (type & kAsciiDataHintMask) == kAsciiDataHintTag; 360 return (type & kAsciiDataHintMask) == kAsciiDataHintTag;
365 #endif
366 } 361 }
367 362
368 363
369 bool String::IsOneByteConvertible() { 364 bool String::IsOneByteConvertible() {
370 return HasOnlyAsciiChars() || IsOneByteRepresentation(); 365 return HasOnlyAsciiChars() || IsOneByteRepresentation();
371 } 366 }
372 367
373 368
374 bool StringShape::IsCons() { 369 bool StringShape::IsCons() {
375 return (type_ & kStringRepresentationMask) == kConsStringTag; 370 return (type_ & kStringRepresentationMask) == kConsStringTag;
(...skipping 5639 matching lines...) Expand 10 before | Expand all | Expand 10 after
6015 #undef WRITE_UINT32_FIELD 6010 #undef WRITE_UINT32_FIELD
6016 #undef READ_SHORT_FIELD 6011 #undef READ_SHORT_FIELD
6017 #undef WRITE_SHORT_FIELD 6012 #undef WRITE_SHORT_FIELD
6018 #undef READ_BYTE_FIELD 6013 #undef READ_BYTE_FIELD
6019 #undef WRITE_BYTE_FIELD 6014 #undef WRITE_BYTE_FIELD
6020 6015
6021 6016
6022 } } // namespace v8::internal 6017 } } // namespace v8::internal
6023 6018
6024 #endif // V8_OBJECTS_INL_H_ 6019 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698