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

Unified Diff: runtime/vm/object.h

Issue 22980022: Setup a peer for read only strings that are not externalized in (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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/object.h
===================================================================
--- runtime/vm/object.h (revision 26385)
+++ runtime/vm/object.h (working copy)
@@ -4582,7 +4582,6 @@
void* peer,
Dart_PeerFinalizer cback) const;
-
// Creates a new String object from a C string that is assumed to contain
// UTF-8 encoded characters and '\0' is considered a termination character.
// TODO(7123) - Rename this to FromCString(....).
@@ -4782,6 +4781,12 @@
intptr_t length,
Heap::Space space);
+ static void SetPeer(const String& str,
+ void* peer,
+ Dart_PeerFinalizer cback);
+
+ static void Finalize(Dart_WeakPersistentHandle handle, void* peer);
+
static const ClassId kClassId = kOneByteStringCid;
static RawOneByteString* null() {
@@ -4864,6 +4869,12 @@
const String& str,
Heap::Space space);
+ static void SetPeer(const String& str,
+ void* peer,
+ Dart_PeerFinalizer cback);
+
+ static void Finalize(Dart_WeakPersistentHandle handle, void* peer);
+
static RawTwoByteString* null() {
return reinterpret_cast<RawTwoByteString*>(Object::null());
}

Powered by Google App Engine
This is Rietveld 408576698