| Index: src/v8utils.cc
|
| diff --git a/src/utils.cc b/src/v8utils.cc
|
| similarity index 90%
|
| copy from src/utils.cc
|
| copy to src/v8utils.cc
|
| index b466301ca5f3dc613be5b62ab0d063285b660908..89f9d953ee367711dec8c910c0f0e65b6de79a2f 100644
|
| --- a/src/utils.cc
|
| +++ b/src/v8utils.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2006-2008 the V8 project authors. All rights reserved.
|
| +// Copyright 2011 the V8 project authors. All rights reserved.
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| // met:
|
| @@ -219,24 +219,6 @@ int WriteBytes(const char* filename,
|
| }
|
|
|
|
|
| -StringBuilder::StringBuilder(int size) {
|
| - buffer_ = Vector<char>::New(size);
|
| - position_ = 0;
|
| -}
|
| -
|
| -
|
| -void StringBuilder::AddString(const char* s) {
|
| - AddSubstring(s, StrLength(s));
|
| -}
|
| -
|
| -
|
| -void StringBuilder::AddSubstring(const char* s, int n) {
|
| - ASSERT(!is_finalized() && position_ + n < buffer_.length());
|
| - ASSERT(static_cast<size_t>(n) <= strlen(s));
|
| - memcpy(&buffer_[position_], s, n * kCharSize);
|
| - position_ += n;
|
| -}
|
| -
|
|
|
| void StringBuilder::AddFormatted(const char* format, ...) {
|
| va_list arguments;
|
| @@ -257,25 +239,6 @@ void StringBuilder::AddFormattedList(const char* format, va_list list) {
|
| }
|
|
|
|
|
| -void StringBuilder::AddPadding(char c, int count) {
|
| - for (int i = 0; i < count; i++) {
|
| - AddCharacter(c);
|
| - }
|
| -}
|
| -
|
| -
|
| -char* StringBuilder::Finalize() {
|
| - ASSERT(!is_finalized() && position_ < buffer_.length());
|
| - buffer_[position_] = '\0';
|
| - // Make sure nobody managed to add a 0-character to the
|
| - // buffer while building the string.
|
| - ASSERT(strlen(buffer_.start()) == static_cast<size_t>(position_));
|
| - position_ = -1;
|
| - ASSERT(is_finalized());
|
| - return buffer_.start();
|
| -}
|
| -
|
| -
|
| MemoryMappedExternalResource::MemoryMappedExternalResource(const char* filename)
|
| : filename_(NULL),
|
| data_(NULL),
|
|
|