Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/objects/string.h')
-rw-r--r--deps/v8/src/objects/string.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/deps/v8/src/objects/string.h b/deps/v8/src/objects/string.h
index ba036edee96..4058c7cec3e 100644
--- a/deps/v8/src/objects/string.h
+++ b/deps/v8/src/objects/string.h
@@ -311,6 +311,7 @@ class String : public Name {
// Externalization.
bool MakeExternal(v8::String::ExternalStringResource* resource);
bool MakeExternal(v8::String::ExternalOneByteStringResource* resource);
+ bool SupportsExternalization();
// Conversion.
inline bool AsArrayIndex(uint32_t* index);
@@ -486,6 +487,15 @@ class SeqString : public String {
DISALLOW_IMPLICIT_CONSTRUCTORS(SeqString);
};
+class InternalizedString : public String {
+ public:
+ DECL_CAST(InternalizedString)
+ // TODO(neis): Possibly move some stuff from String here.
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(InternalizedString);
+};
+
// The OneByteString class captures sequential one-byte string objects.
// Each character in the OneByteString is an one-byte character.
class SeqOneByteString : public SeqString {
@@ -751,6 +761,11 @@ class ExternalOneByteString : public ExternalString {
// The underlying resource.
inline const Resource* resource();
+
+ // It is assumed that the previous resource is null. If it is not null, then
+ // it is the responsability of the caller the handle the previous resource.
+ inline void SetResource(Isolate* isolate, const Resource* buffer);
+ // Used only during serialization.
inline void set_resource(const Resource* buffer);
// Update the pointer cache to the external character array.
@@ -784,6 +799,11 @@ class ExternalTwoByteString : public ExternalString {
// The underlying string resource.
inline const Resource* resource();
+
+ // It is assumed that the previous resource is null. If it is not null, then
+ // it is the responsability of the caller the handle the previous resource.
+ inline void SetResource(Isolate* isolate, const Resource* buffer);
+ // Used only during serialization.
inline void set_resource(const Resource* buffer);
// Update the pointer cache to the external character array.