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

Unified Diff: src/string-stream.h

Issue 334763003: Start using OStreams. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Reformatted. Feedback addressed. Created 6 years, 6 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
« no previous file with comments | « src/property.cc ('k') | src/string-stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/string-stream.h
diff --git a/src/string-stream.h b/src/string-stream.h
index d72d5c2d0e8bee5551832cda61e40c20bea6f605..e2475ff3b3921ecb5dbffdab57751cd4a782e4d0 100644
--- a/src/string-stream.h
+++ b/src/string-stream.h
@@ -35,21 +35,6 @@ class HeapStringAllocator V8_FINAL : public StringAllocator {
};
-// Allocator for use when no new c++ heap allocation is allowed.
-// Given a preallocated buffer up front and does no allocation while
-// building message.
-class NoAllocationStringAllocator V8_FINAL : public StringAllocator {
- public:
- NoAllocationStringAllocator(char* memory, unsigned size);
- virtual char* allocate(unsigned bytes) V8_OVERRIDE { return space_; }
- virtual char* grow(unsigned* bytes) V8_OVERRIDE;
-
- private:
- unsigned size_;
- char* space_;
-};
-
-
class FmtElm V8_FINAL {
public:
FmtElm(int value) : type_(INT) { // NOLINT
@@ -168,31 +153,6 @@ class StringStream V8_FINAL {
DISALLOW_IMPLICIT_CONSTRUCTORS(StringStream);
};
-
-// Utility class to print a list of items to a stream, divided by a separator.
-class SimpleListPrinter V8_FINAL {
- public:
- explicit SimpleListPrinter(StringStream* stream, char separator = ',') {
- separator_ = separator;
- stream_ = stream;
- first_ = true;
- }
-
- void Add(const char* str) {
- if (first_) {
- first_ = false;
- } else {
- stream_->Put(separator_);
- }
- stream_->Add(str);
- }
-
- private:
- bool first_;
- char separator_;
- StringStream* stream_;
-};
-
} } // namespace v8::internal
#endif // V8_STRING_STREAM_H_
« no previous file with comments | « src/property.cc ('k') | src/string-stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698