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

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

Issue 69029: If an external string enters the symbol table, make sure to set 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/objects.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 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 return (type_ & kStringSizeMask); 256 return (type_ & kStringSizeMask);
257 } 257 }
258 258
259 259
260 bool StringShape::IsSequentialAscii() { 260 bool StringShape::IsSequentialAscii() {
261 return full_representation_tag() == (kSeqStringTag | kAsciiStringTag); 261 return full_representation_tag() == (kSeqStringTag | kAsciiStringTag);
262 } 262 }
263 263
264 264
265 bool StringShape::IsSequentialTwoByte() { 265 bool StringShape::IsSequentialTwoByte() {
266 return (type_ & (kStringRepresentationMask | kStringEncodingMask)) == 266 return full_representation_tag() == (kSeqStringTag | kTwoByteStringTag);
267 (kSeqStringTag | kTwoByteStringTag);
268 } 267 }
269 268
270 269
271 bool StringShape::IsExternalAscii() { 270 bool StringShape::IsExternalAscii() {
272 return full_representation_tag() == (kExternalStringTag | kAsciiStringTag); 271 return full_representation_tag() == (kExternalStringTag | kAsciiStringTag);
273 } 272 }
274 273
275 274
276 bool StringShape::IsExternalTwoByte() { 275 bool StringShape::IsExternalTwoByte() {
277 return (type_ & (kStringRepresentationMask | kStringEncodingMask)) == 276 return full_representation_tag() == (kExternalStringTag | kTwoByteStringTag);
278 (kExternalStringTag | kTwoByteStringTag);
279 } 277 }
280 278
281 279
282 uc32 FlatStringReader::Get(int index) { 280 uc32 FlatStringReader::Get(int index) {
283 ASSERT(0 <= index && index <= length_); 281 ASSERT(0 <= index && index <= length_);
284 if (is_ascii_) { 282 if (is_ascii_) {
285 return static_cast<const byte*>(start_)[index]; 283 return static_cast<const byte*>(start_)[index];
286 } else { 284 } else {
287 return static_cast<const uc16*>(start_)[index]; 285 return static_cast<const uc16*>(start_)[index];
288 } 286 }
(...skipping 2301 matching lines...) Expand 10 before | Expand all | Expand 10 after
2590 #undef WRITE_INT_FIELD 2588 #undef WRITE_INT_FIELD
2591 #undef READ_SHORT_FIELD 2589 #undef READ_SHORT_FIELD
2592 #undef WRITE_SHORT_FIELD 2590 #undef WRITE_SHORT_FIELD
2593 #undef READ_BYTE_FIELD 2591 #undef READ_BYTE_FIELD
2594 #undef WRITE_BYTE_FIELD 2592 #undef WRITE_BYTE_FIELD
2595 2593
2596 2594
2597 } } // namespace v8::internal 2595 } } // namespace v8::internal
2598 2596
2599 #endif // V8_OBJECTS_INL_H_ 2597 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698