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

Unified Diff: src/string-stream.cc

Issue 14862009: Encapsulating Type information in the CompareICStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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: src/string-stream.cc
diff --git a/src/string-stream.cc b/src/string-stream.cc
index ebe1b5b43b58901f28b710c0e1c92def905e8b8e..89815aacfa3e020b730f5e67896f173692f28ebe 100644
--- a/src/string-stream.cc
+++ b/src/string-stream.cc
@@ -81,6 +81,13 @@ bool StringStream::Put(char c) {
}
+void StringStream::Remove(unsigned num_of_chars) {
+ unsigned to_remove = num_of_chars*2;
+ to_remove = (to_remove>length_) ? length_ : num_of_chars;
+ length_ -= to_remove;
+}
+
+
// A control character is one that configures a format element. For
// instance, in %.5s, .5 are control characters.
static bool IsControlChar(char c) {
« src/code-stubs.cc ('K') | « src/string-stream.h ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698