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 6440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6451 | 6451 |
6452 // The ExternalAsciiString class is an external string backed by an | 6452 // The ExternalAsciiString class is an external string backed by an |
6453 // ASCII string. | 6453 // ASCII string. |
6454 class ExternalAsciiString: public ExternalString { | 6454 class ExternalAsciiString: public ExternalString { |
6455 public: | 6455 public: |
6456 static const bool kHasAsciiEncoding = true; | 6456 static const bool kHasAsciiEncoding = true; |
6457 | 6457 |
6458 typedef v8::String::ExternalAsciiStringResource Resource; | 6458 typedef v8::String::ExternalAsciiStringResource Resource; |
6459 | 6459 |
6460 // The underlying resource. | 6460 // The underlying resource. |
6461 inline Resource* resource(); | 6461 inline const Resource* resource(); |
6462 inline void set_resource(Resource* buffer); | 6462 inline void set_resource(const Resource* buffer); |
6463 | 6463 |
6464 // Dispatched behavior. | 6464 // Dispatched behavior. |
6465 uint16_t ExternalAsciiStringGet(int index); | 6465 uint16_t ExternalAsciiStringGet(int index); |
6466 | 6466 |
6467 // Casting. | 6467 // Casting. |
6468 static inline ExternalAsciiString* cast(Object* obj); | 6468 static inline ExternalAsciiString* cast(Object* obj); |
6469 | 6469 |
6470 // Garbage collection support. | 6470 // Garbage collection support. |
6471 inline void ExternalAsciiStringIterateBody(ObjectVisitor* v); | 6471 inline void ExternalAsciiStringIterateBody(ObjectVisitor* v); |
6472 | 6472 |
(...skipping 15 matching lines...) Expand all Loading... |
6488 | 6488 |
6489 // The ExternalTwoByteString class is an external string backed by a UTF-16 | 6489 // The ExternalTwoByteString class is an external string backed by a UTF-16 |
6490 // encoded string. | 6490 // encoded string. |
6491 class ExternalTwoByteString: public ExternalString { | 6491 class ExternalTwoByteString: public ExternalString { |
6492 public: | 6492 public: |
6493 static const bool kHasAsciiEncoding = false; | 6493 static const bool kHasAsciiEncoding = false; |
6494 | 6494 |
6495 typedef v8::String::ExternalStringResource Resource; | 6495 typedef v8::String::ExternalStringResource Resource; |
6496 | 6496 |
6497 // The underlying string resource. | 6497 // The underlying string resource. |
6498 inline Resource* resource(); | 6498 inline const Resource* resource(); |
6499 inline void set_resource(Resource* buffer); | 6499 inline void set_resource(const Resource* buffer); |
6500 | 6500 |
6501 // Dispatched behavior. | 6501 // Dispatched behavior. |
6502 uint16_t ExternalTwoByteStringGet(int index); | 6502 uint16_t ExternalTwoByteStringGet(int index); |
6503 | 6503 |
6504 // For regexp code. | 6504 // For regexp code. |
6505 const uint16_t* ExternalTwoByteStringGetData(unsigned start); | 6505 const uint16_t* ExternalTwoByteStringGetData(unsigned start); |
6506 | 6506 |
6507 // Casting. | 6507 // Casting. |
6508 static inline ExternalTwoByteString* cast(Object* obj); | 6508 static inline ExternalTwoByteString* cast(Object* obj); |
6509 | 6509 |
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7474 } else { | 7474 } else { |
7475 value &= ~(1 << bit_position); | 7475 value &= ~(1 << bit_position); |
7476 } | 7476 } |
7477 return value; | 7477 return value; |
7478 } | 7478 } |
7479 }; | 7479 }; |
7480 | 7480 |
7481 } } // namespace v8::internal | 7481 } } // namespace v8::internal |
7482 | 7482 |
7483 #endif // V8_OBJECTS_H_ | 7483 #endif // V8_OBJECTS_H_ |
OLD | NEW |