| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 6361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6372 | 6372 |
| 6373 // The ExternalAsciiString class is an external string backed by an | 6373 // The ExternalAsciiString class is an external string backed by an |
| 6374 // ASCII string. | 6374 // ASCII string. |
| 6375 class ExternalAsciiString: public ExternalString { | 6375 class ExternalAsciiString: public ExternalString { |
| 6376 public: | 6376 public: |
| 6377 static const bool kHasAsciiEncoding = true; | 6377 static const bool kHasAsciiEncoding = true; |
| 6378 | 6378 |
| 6379 typedef v8::String::ExternalAsciiStringResource Resource; | 6379 typedef v8::String::ExternalAsciiStringResource Resource; |
| 6380 | 6380 |
| 6381 // The underlying resource. | 6381 // The underlying resource. |
| 6382 inline Resource* resource(); | 6382 inline const Resource* resource(); |
| 6383 inline void set_resource(Resource* buffer); | 6383 inline void set_resource(const Resource* buffer); |
| 6384 | 6384 |
| 6385 // Dispatched behavior. | 6385 // Dispatched behavior. |
| 6386 uint16_t ExternalAsciiStringGet(int index); | 6386 uint16_t ExternalAsciiStringGet(int index); |
| 6387 | 6387 |
| 6388 // Casting. | 6388 // Casting. |
| 6389 static inline ExternalAsciiString* cast(Object* obj); | 6389 static inline ExternalAsciiString* cast(Object* obj); |
| 6390 | 6390 |
| 6391 // Garbage collection support. | 6391 // Garbage collection support. |
| 6392 inline void ExternalAsciiStringIterateBody(ObjectVisitor* v); | 6392 inline void ExternalAsciiStringIterateBody(ObjectVisitor* v); |
| 6393 | 6393 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 6409 | 6409 |
| 6410 // The ExternalTwoByteString class is an external string backed by a UTF-16 | 6410 // The ExternalTwoByteString class is an external string backed by a UTF-16 |
| 6411 // encoded string. | 6411 // encoded string. |
| 6412 class ExternalTwoByteString: public ExternalString { | 6412 class ExternalTwoByteString: public ExternalString { |
| 6413 public: | 6413 public: |
| 6414 static const bool kHasAsciiEncoding = false; | 6414 static const bool kHasAsciiEncoding = false; |
| 6415 | 6415 |
| 6416 typedef v8::String::ExternalStringResource Resource; | 6416 typedef v8::String::ExternalStringResource Resource; |
| 6417 | 6417 |
| 6418 // The underlying string resource. | 6418 // The underlying string resource. |
| 6419 inline Resource* resource(); | 6419 inline const Resource* resource(); |
| 6420 inline void set_resource(Resource* buffer); | 6420 inline void set_resource(const Resource* buffer); |
| 6421 | 6421 |
| 6422 // Dispatched behavior. | 6422 // Dispatched behavior. |
| 6423 uint16_t ExternalTwoByteStringGet(int index); | 6423 uint16_t ExternalTwoByteStringGet(int index); |
| 6424 | 6424 |
| 6425 // For regexp code. | 6425 // For regexp code. |
| 6426 const uint16_t* ExternalTwoByteStringGetData(unsigned start); | 6426 const uint16_t* ExternalTwoByteStringGetData(unsigned start); |
| 6427 | 6427 |
| 6428 // Casting. | 6428 // Casting. |
| 6429 static inline ExternalTwoByteString* cast(Object* obj); | 6429 static inline ExternalTwoByteString* cast(Object* obj); |
| 6430 | 6430 |
| (...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7391 } else { | 7391 } else { |
| 7392 value &= ~(1 << bit_position); | 7392 value &= ~(1 << bit_position); |
| 7393 } | 7393 } |
| 7394 return value; | 7394 return value; |
| 7395 } | 7395 } |
| 7396 }; | 7396 }; |
| 7397 | 7397 |
| 7398 } } // namespace v8::internal | 7398 } } // namespace v8::internal |
| 7399 | 7399 |
| 7400 #endif // V8_OBJECTS_H_ | 7400 #endif // V8_OBJECTS_H_ |
| OLD | NEW |