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

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

Issue 11931013: Revert trunk to version 3.16.4. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 11 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.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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 case kTwoByteStringTag: 334 case kTwoByteStringTag:
335 return true; 335 return true;
336 default: // Cons or sliced string. Need to go deeper. 336 default: // Cons or sliced string. Need to go deeper.
337 return GetUnderlying()->IsTwoByteRepresentation(); 337 return GetUnderlying()->IsTwoByteRepresentation();
338 } 338 }
339 } 339 }
340 340
341 341
342 bool String::HasOnlyAsciiChars() { 342 bool String::HasOnlyAsciiChars() {
343 uint32_t type = map()->instance_type(); 343 uint32_t type = map()->instance_type();
344 #ifndef ENABLE_LATIN_1
345 return (type & kStringEncodingMask) == kOneByteStringTag ||
346 (type & kAsciiDataHintMask) == kAsciiDataHintTag;
347 #else
348 return (type & kAsciiDataHintMask) == kAsciiDataHintTag; 344 return (type & kAsciiDataHintMask) == kAsciiDataHintTag;
349 #endif
350 } 345 }
351 346
352 347
353 bool String::IsOneByteConvertible() { 348 bool String::IsOneByteConvertible() {
354 return HasOnlyAsciiChars() || IsOneByteRepresentation(); 349 return HasOnlyAsciiChars() || IsOneByteRepresentation();
355 } 350 }
356 351
357 352
358 bool StringShape::IsCons() { 353 bool StringShape::IsCons() {
359 return (type_ & kStringRepresentationMask) == kConsStringTag; 354 return (type_ & kStringRepresentationMask) == kConsStringTag;
(...skipping 5445 matching lines...) Expand 10 before | Expand all | Expand 10 after
5805 #undef WRITE_UINT32_FIELD 5800 #undef WRITE_UINT32_FIELD
5806 #undef READ_SHORT_FIELD 5801 #undef READ_SHORT_FIELD
5807 #undef WRITE_SHORT_FIELD 5802 #undef WRITE_SHORT_FIELD
5808 #undef READ_BYTE_FIELD 5803 #undef READ_BYTE_FIELD
5809 #undef WRITE_BYTE_FIELD 5804 #undef WRITE_BYTE_FIELD
5810 5805
5811 5806
5812 } } // namespace v8::internal 5807 } } // namespace v8::internal
5813 5808
5814 #endif // V8_OBJECTS_INL_H_ 5809 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698