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

Side by Side Diff: src/objects.h

Issue 11348349: Improve array to string conversion. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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
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 7546 matching lines...) Expand 10 before | Expand all | Expand 10 after
7557 7557
7558 // The SeqString abstract class captures sequential string values. 7558 // The SeqString abstract class captures sequential string values.
7559 class SeqString: public String { 7559 class SeqString: public String {
7560 public: 7560 public:
7561 // Casting. 7561 // Casting.
7562 static inline SeqString* cast(Object* obj); 7562 static inline SeqString* cast(Object* obj);
7563 7563
7564 // Layout description. 7564 // Layout description.
7565 static const int kHeaderSize = String::kSize; 7565 static const int kHeaderSize = String::kSize;
7566 7566
7567 void Truncate(int new_length);
7568
7567 private: 7569 private:
7568 DISALLOW_IMPLICIT_CONSTRUCTORS(SeqString); 7570 DISALLOW_IMPLICIT_CONSTRUCTORS(SeqString);
7569 }; 7571 };
7570 7572
7571 7573
7572 // The AsciiString class captures sequential ASCII string objects. 7574 // The AsciiString class captures sequential ASCII string objects.
7573 // Each character in the AsciiString is an ASCII character. 7575 // Each character in the AsciiString is an ASCII character.
7574 class SeqOneByteString: public SeqString { 7576 class SeqOneByteString: public SeqString {
7575 public: 7577 public:
7576 static const bool kHasAsciiEncoding = true; 7578 static const bool kHasAsciiEncoding = true;
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after
9008 } else { 9010 } else {
9009 value &= ~(1 << bit_position); 9011 value &= ~(1 << bit_position);
9010 } 9012 }
9011 return value; 9013 return value;
9012 } 9014 }
9013 }; 9015 };
9014 9016
9015 } } // namespace v8::internal 9017 } } // namespace v8::internal
9016 9018
9017 #endif // V8_OBJECTS_H_ 9019 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698