Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: runtime/vm/raw_object.h

Issue 8383029: Implement external strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: pre-review clean-up Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index b6d7b9769417123545fe523db78b5bc9263c5848..1cb9cd2306223313596fffc44f3e39be29393675 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -49,6 +49,9 @@ namespace dart {
V(OneByteString) \
V(TwoByteString) \
V(FourByteString) \
+ V(ExternalOneByteString) \
+ V(ExternalTwoByteString) \
+ V(ExternalFourByteString) \
V(Bool) \
V(Array) \
V(ImmutableArray) \
@@ -687,6 +690,27 @@ class RawFourByteString : public RawString {
};
+class RawExternalOneByteString : public RawString {
+ RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalOneByteString);
+
+ uint8_t* data_;
turnidge 2011/10/25 18:07:20 Out of curiosity, can we rely on external strings
cshapiro 2011/10/25 20:42:47 Certainly not. We inherit a length field from the
turnidge 2011/10/25 20:45:15 Ah, thanks.
+};
+
+
+class RawExternalTwoByteString : public RawString {
+ RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalTwoByteString);
+
+ uint16_t* data_;
+};
+
+
+class RawExternalFourByteString : public RawString {
+ RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalFourByteString);
+
+ uint32_t* data_;
+};
+
+
class RawBool : public RawInstance {
RAW_HEAP_OBJECT_IMPLEMENTATION(Bool);

Powered by Google App Engine
This is Rietveld 408576698