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

Unified Diff: src/objects.h

Issue 9181: Push string shape fixes to trunk (version 0.4.3.1). (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 12 years, 1 month 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
« no previous file with comments | « src/log.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
===================================================================
--- src/objects.h (revision 695)
+++ src/objects.h (working copy)
@@ -3024,7 +3024,9 @@
// the shape of the string is given its own class so that it can be retrieved
// once and used for several string operations. A StringShape is small enough
// to be passed by value and is immutable, but be aware that flattening a
-// string can potentially alter its shape.
+// string can potentially alter its shape. Also be aware that a GC caused by
+// something else can alter the shape of a string due to ConsString
+// shortcutting.
//
// Most of the methods designed to interrogate a string as to its exact nature
// have been made into methods on StringShape in order to encourage the use of
@@ -3116,7 +3118,7 @@
bool MarkAsUndetectable();
// Slice the string and return a substring.
- Object* Slice(StringShape shape, int from, int to);
+ Object* Slice(int from, int to);
// String equality operations.
inline bool Equals(String* other);
@@ -3471,9 +3473,6 @@
// Dispatched behavior.
uint16_t SlicedStringGet(int index);
- // Flatten any ConsString hiding behind this SlicedString.
- Object* SlicedStringFlatten();
-
// Casting.
static inline SlicedString* cast(Object* obj);
« no previous file with comments | « src/log.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698