| OLD | NEW |
| 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 3120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3131 | 3131 |
| 3132 | 3132 |
| 3133 // The TwoByteString class captures sequential unicode string objects. | 3133 // The TwoByteString class captures sequential unicode string objects. |
| 3134 // Each character in the TwoByteString is a two-byte uint16_t. | 3134 // Each character in the TwoByteString is a two-byte uint16_t. |
| 3135 class TwoByteString: public SeqString { | 3135 class TwoByteString: public SeqString { |
| 3136 public: | 3136 public: |
| 3137 // Dispatched behavior. | 3137 // Dispatched behavior. |
| 3138 inline uint16_t TwoByteStringGet(int index); | 3138 inline uint16_t TwoByteStringGet(int index); |
| 3139 inline void TwoByteStringSet(int index, uint16_t value); | 3139 inline void TwoByteStringSet(int index, uint16_t value); |
| 3140 | 3140 |
| 3141 // Get the address of the characters in this string. |
| 3142 inline Address GetCharsAddress(); |
| 3143 |
| 3141 // For regexp code. | 3144 // For regexp code. |
| 3142 const uint16_t* TwoByteStringGetData(unsigned start); | 3145 const uint16_t* TwoByteStringGetData(unsigned start); |
| 3143 | 3146 |
| 3144 // Casting | 3147 // Casting |
| 3145 static inline TwoByteString* cast(Object* obj); | 3148 static inline TwoByteString* cast(Object* obj); |
| 3146 | 3149 |
| 3147 // Garbage collection support. This method is called by the | 3150 // Garbage collection support. This method is called by the |
| 3148 // garbage collector to compute the actual size of a TwoByteString | 3151 // garbage collector to compute the actual size of a TwoByteString |
| 3149 // instance. | 3152 // instance. |
| 3150 inline int TwoByteStringSize(Map* map); | 3153 inline int TwoByteStringSize(Map* map); |
| (...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3916 } else { | 3919 } else { |
| 3917 value &= ~(1 << bit_position); | 3920 value &= ~(1 << bit_position); |
| 3918 } | 3921 } |
| 3919 return value; | 3922 return value; |
| 3920 } | 3923 } |
| 3921 }; | 3924 }; |
| 3922 | 3925 |
| 3923 } } // namespace v8::internal | 3926 } } // namespace v8::internal |
| 3924 | 3927 |
| 3925 #endif // V8_OBJECTS_H_ | 3928 #endif // V8_OBJECTS_H_ |
| OLD | NEW |