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

Unified Diff: src/v8utils.cc

Issue 7308004: Extract string->double and double->string conversions for use in the preparser. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: git utd Created 9 years, 5 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/v8utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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),
« no previous file with comments | « src/v8utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698