aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v4/qv4v8_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/v4/qv4v8_p.h')
-rw-r--r--src/qml/qml/v4/qv4v8_p.h84
1 files changed, 3 insertions, 81 deletions
diff --git a/src/qml/qml/v4/qv4v8_p.h b/src/qml/qml/v4/qv4v8_p.h
index b73d26ef62..dcd44d5916 100644
--- a/src/qml/qml/v4/qv4v8_p.h
+++ b/src/qml/qml/v4/qv4v8_p.h
@@ -799,82 +799,6 @@ class V8EXPORT Value {
*/
class V8EXPORT String : public Value {
public:
- /**
- * Returns the number of characters in this string.
- */
- int Length() const;
-
-
- /**
- * Returns the hash of this string.
- */
- uint32_t Hash() const;
-
- struct CompleteHashData {
- CompleteHashData() : length(0), hash(0), symbol_id(0) {}
- int length;
- uint32_t hash;
- uint32_t symbol_id;
- };
-
- /**
- * Returns the "complete" hash of the string. This is
- * all the information about the string needed to implement
- * a very efficient hash keyed on the string.
- *
- * The members of CompleteHashData are:
- * length: The length of the string. Equivalent to Length()
- * hash: The hash of the string. Equivalent to Hash()
- * symbol_id: If the string is a sequential symbol, the symbol
- * id, otherwise 0. If the symbol ids of two strings are
- * the same (and non-zero) the two strings are identical.
- * If the symbol ids are different the strings may still be
- * identical, but an Equals() check must be performed.
- */
- CompleteHashData CompleteHash() const;
-
- /**
- * Compute a hash value for the passed UTF16 string
- * data.
- */
- static uint32_t ComputeHash(uint16_t *string, int length);
- static uint32_t ComputeHash(char *string, int length);
-
- /**
- * Returns true if this string is equal to the external
- * string data provided.
- */
- bool Equals(uint16_t *string, int length);
- bool Equals(char *string, int length);
- bool Equals(Handle<Value> that) const {
- return v8::Value::Equals(that);
- }
-
- /**
- * Write the contents of the string to an external buffer.
- * If no arguments are given, expects the buffer to be large
- * enough to hold the entire string and NULL terminator. Copies
- * the contents of the string and the NULL terminator into the
- * buffer.
- */
- int Write(uint16_t* buffer) const;
-
- class V8EXPORT ExternalStringResourceBase { // NOLINT
- public:
- virtual ~ExternalStringResourceBase() {}
-
- protected:
- ExternalStringResourceBase() {}
-
- /**
- * Internally V8 will call this Dispose method when the external string
- * resource is no longer needed. The default implementation will use the
- * delete operator. This method can be overridden in subclasses to
- * control how allocated external string resources are disposed.
- */
- virtual void Dispose() { delete this; }
-
- };
/**
* An ExternalStringResource is a wrapper around a two-byte string
@@ -882,8 +806,7 @@ class V8EXPORT String : public Value {
* ExternalStringResource to manage the life cycle of the underlying
* buffer. Note that the string data must be immutable.
*/
- class V8EXPORT ExternalStringResource
- : public ExternalStringResourceBase {
+ class V8EXPORT ExternalStringResource {
public:
/**
* Override the destructor to manage the life cycle of the underlying
@@ -901,6 +824,8 @@ class V8EXPORT String : public Value {
*/
virtual size_t length() const = 0;
+ virtual void Dispose() { delete this; }
+
protected:
ExternalStringResource() {}
};
@@ -927,9 +852,6 @@ class V8EXPORT String : public Value {
/** Allocates a new string from 16-bit character codes.*/
static Handle<String> New(const uint16_t* data, int length = -1);
- /** Creates a symbol. Returns one if it exists already.*/
- static Handle<String> NewSymbol(const char* data, int length = -1);
-
static Handle<String> New(QV4::String *s);
/**