Title: [147976] trunk/Source/WTF
Revision
147976
Author
benja...@webkit.org
Date
2013-04-08 19:26:38 -0700 (Mon, 08 Apr 2013)

Log Message

wtf/dtoa/* uses a confusing name to reference its buffers
https://bugs.webkit.org/show_bug.cgi?id=109709

Reviewed by Darin Adler.

The data structure Vector in wtf/dtoa has nothing to do with a traditional
vector, is it just a pointer and the length of the pointed buffer.

Rename it to BufferReference to avoid mistakes.

* wtf/dtoa/bignum-dtoa.cc:
* wtf/dtoa/bignum-dtoa.h:
* wtf/dtoa/bignum.cc:
* wtf/dtoa/bignum.h:
(Bignum):
* wtf/dtoa/double-conversion.cc:
* wtf/dtoa/fast-dtoa.cc:
* wtf/dtoa/fast-dtoa.h:
* wtf/dtoa/fixed-dtoa.cc:
* wtf/dtoa/fixed-dtoa.h:
(double_conversion):
* wtf/dtoa/strtod.cc:
* wtf/dtoa/strtod.h:
(double_conversion):
* wtf/dtoa/utils.h:
(double_conversion):
(WTF::double_conversion::BufferReference::BufferReference):
(WTF::double_conversion::BufferReference::SubBufferReference):
(StringBuilder):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (147975 => 147976)


--- trunk/Source/WTF/ChangeLog	2013-04-09 01:45:50 UTC (rev 147975)
+++ trunk/Source/WTF/ChangeLog	2013-04-09 02:26:38 UTC (rev 147976)
@@ -1,3 +1,35 @@
+2013-04-08  Benjamin Poulain  <benja...@webkit.org>
+
+        wtf/dtoa/* uses a confusing name to reference its buffers
+        https://bugs.webkit.org/show_bug.cgi?id=109709
+
+        Reviewed by Darin Adler.
+
+        The data structure Vector in wtf/dtoa has nothing to do with a traditional
+        vector, is it just a pointer and the length of the pointed buffer.
+
+        Rename it to BufferReference to avoid mistakes.
+
+        * wtf/dtoa/bignum-dtoa.cc:
+        * wtf/dtoa/bignum-dtoa.h:
+        * wtf/dtoa/bignum.cc:
+        * wtf/dtoa/bignum.h:
+        (Bignum):
+        * wtf/dtoa/double-conversion.cc:
+        * wtf/dtoa/fast-dtoa.cc:
+        * wtf/dtoa/fast-dtoa.h:
+        * wtf/dtoa/fixed-dtoa.cc:
+        * wtf/dtoa/fixed-dtoa.h:
+        (double_conversion):
+        * wtf/dtoa/strtod.cc:
+        * wtf/dtoa/strtod.h:
+        (double_conversion):
+        * wtf/dtoa/utils.h:
+        (double_conversion):
+        (WTF::double_conversion::BufferReference::BufferReference):
+        (WTF::double_conversion::BufferReference::SubBufferReference):
+        (StringBuilder):
+
 2013-04-08  Alberto Garcia  <agar...@igalia.com>
 
         [BlackBerry] MathExtras: macros defined in math.h conflict with the real functions

Modified: trunk/Source/WTF/wtf/dtoa/bignum-dtoa.cc (147975 => 147976)


--- trunk/Source/WTF/wtf/dtoa/bignum-dtoa.cc	2013-04-09 01:45:50 UTC (rev 147975)
+++ trunk/Source/WTF/wtf/dtoa/bignum-dtoa.cc	2013-04-09 02:26:38 UTC (rev 147976)
@@ -74,22 +74,22 @@
     static void GenerateShortestDigits(Bignum* numerator, Bignum* denominator,
                                        Bignum* delta_minus, Bignum* delta_plus,
                                        bool is_even,
-                                       Vector<char> buffer, int* length);
+                                       BufferReference<char> buffer, int* length);
     // Generates 'requested_digits' after the decimal point.
     static void BignumToFixed(int requested_digits, int* decimal_point,
                               Bignum* numerator, Bignum* denominator,
-                              Vector<char>(buffer), int* length);
+                              BufferReference<char>(buffer), int* length);
     // Generates 'count' digits of numerator/denominator.
     // Once 'count' digits have been produced rounds the result depending on the
     // remainder (remainders of exactly .5 round upwards). Might update the
     // decimal_point when rounding up (for example for 0.9999).
     static void GenerateCountedDigits(int count, int* decimal_point,
                                       Bignum* numerator, Bignum* denominator,
-                                      Vector<char>(buffer), int* length);
+                                      BufferReference<char>(buffer), int* length);
     
     
     void BignumDtoa(double v, BignumDtoaMode mode, int requested_digits,
-                    Vector<char> buffer, int* length, int* decimal_point) {
+                    BufferReference<char> buffer, int* length, int* decimal_point) {
         ASSERT(v > 0);
         ASSERT(!Double(v).IsSpecial());
         uint64_t significand = Double(v).Significand();
@@ -171,7 +171,7 @@
     static void GenerateShortestDigits(Bignum* numerator, Bignum* denominator,
                                        Bignum* delta_minus, Bignum* delta_plus,
                                        bool is_even,
-                                       Vector<char> buffer, int* length) {
+                                       BufferReference<char> buffer, int* length) {
         // Small optimization: if delta_minus and delta_plus are the same just reuse
         // one of the two bignums.
         if (Bignum::Equal(*delta_minus, *delta_plus)) {
@@ -268,7 +268,7 @@
     // exponent (decimal_point), when rounding upwards.
     static void GenerateCountedDigits(int count, int* decimal_point,
                                       Bignum* numerator, Bignum* denominator,
-                                      Vector<char>(buffer), int* length) {
+                                      BufferReference<char>(buffer), int* length) {
         ASSERT(count >= 0);
         for (int i = 0; i < count - 1; ++i) {
             uint16_t digit;
@@ -310,7 +310,7 @@
     // Input verifies:  1 <= (numerator + delta) / denominator < 10.
     static void BignumToFixed(int requested_digits, int* decimal_point,
                               Bignum* numerator, Bignum* denominator,
-                              Vector<char>(buffer), int* length) {
+                              BufferReference<char>(buffer), int* length) {
         // Note that we have to look at more than just the requested_digits, since
         // a number could be rounded up. Example: v=0.5 with requested_digits=0.
         // Even though the power of v equals 0 we can't just stop here.

Modified: trunk/Source/WTF/wtf/dtoa/bignum-dtoa.h (147975 => 147976)


--- trunk/Source/WTF/wtf/dtoa/bignum-dtoa.h	2013-04-09 01:45:50 UTC (rev 147975)
+++ trunk/Source/WTF/wtf/dtoa/bignum-dtoa.h	2013-04-09 02:26:38 UTC (rev 147976)
@@ -77,7 +77,7 @@
     // 'BignumDtoa' expects the given buffer to be big enough to hold all digits
     // and a terminating null-character.
     void BignumDtoa(double v, BignumDtoaMode mode, int requested_digits,
-                    Vector<char> buffer, int* length, int* point);
+                    BufferReference<char> buffer, int* length, int* point);
     
 }  // namespace double_conversion
 

Modified: trunk/Source/WTF/wtf/dtoa/bignum.cc (147975 => 147976)


--- trunk/Source/WTF/wtf/dtoa/bignum.cc	2013-04-09 01:45:50 UTC (rev 147975)
+++ trunk/Source/WTF/wtf/dtoa/bignum.cc	2013-04-09 02:26:38 UTC (rev 147976)
@@ -89,7 +89,7 @@
     }
     
     
-    static uint64_t ReadUInt64(Vector<const char> buffer,
+    static uint64_t ReadUInt64(BufferReference<const char> buffer,
                                int from,
                                int digits_to_read) {
         uint64_t result = 0;
@@ -102,7 +102,7 @@
     }
     
     
-    void Bignum::AssignDecimalString(Vector<const char> value) {
+    void Bignum::AssignDecimalString(BufferReference<const char> value) {
         // 2^64 = 18446744073709551616 > 10^19
         const int kMaxUint64DecimalDigits = 19;
         Zero();
@@ -132,7 +132,7 @@
     }
     
     
-    void Bignum::AssignHexString(Vector<const char> value) {
+    void Bignum::AssignHexString(BufferReference<const char> value) {
         Zero();
         int length = value.length();
         

Modified: trunk/Source/WTF/wtf/dtoa/bignum.h (147975 => 147976)


--- trunk/Source/WTF/wtf/dtoa/bignum.h	2013-04-09 01:45:50 UTC (rev 147975)
+++ trunk/Source/WTF/wtf/dtoa/bignum.h	2013-04-09 02:26:38 UTC (rev 147976)
@@ -46,8 +46,8 @@
         void AssignUInt64(uint64_t value);
         void AssignBignum(const Bignum& other);
         
-        void AssignDecimalString(Vector<const char> value);
-        void AssignHexString(Vector<const char> value);
+        void AssignDecimalString(BufferReference<const char> value);
+        void AssignHexString(BufferReference<const char> value);
         
         void AssignPowerUInt16(uint16_t base, int exponent);
         
@@ -130,7 +130,7 @@
         Chunk bigits_buffer_[kBigitCapacity];
         // A vector backed by bigits_buffer_. This way accesses to the array are
         // checked for out-of-bounds errors.
-        Vector<Chunk> bigits_;
+        BufferReference<Chunk> bigits_;
         int used_digits_;
         // The Bignum's value equals value(bigits_) * 2^(exponent_ * kBigitSize).
         int exponent_;

Modified: trunk/Source/WTF/wtf/dtoa/double-conversion.cc (147975 => 147976)


--- trunk/Source/WTF/wtf/dtoa/double-conversion.cc	2013-04-09 01:45:50 UTC (rev 147975)
+++ trunk/Source/WTF/wtf/dtoa/double-conversion.cc	2013-04-09 02:26:38 UTC (rev 147976)
@@ -360,7 +360,7 @@
                                                 bool* sign,
                                                 int* length,
                                                 int* point) {
-        Vector<char> vector(buffer, buffer_length);
+        BufferReference<char> vector(buffer, buffer_length);
         ASSERT(!Double(v).IsSpecial());
         ASSERT(mode == SHORTEST || requested_digits >= 0);
         
@@ -596,7 +596,7 @@
         ASSERT(buffer_pos < kBufferSize);
         buffer[buffer_pos] = '\0';
         
-        double converted = Strtod(Vector<const char>(buffer, buffer_pos), exponent);
+        double converted = Strtod(BufferReference<const char>(buffer, buffer_pos), exponent);
         *processed_characters_count = current - input;
         return sign? -converted: converted;
     }

Modified: trunk/Source/WTF/wtf/dtoa/fast-dtoa.cc (147975 => 147976)


--- trunk/Source/WTF/wtf/dtoa/fast-dtoa.cc	2013-04-09 01:45:50 UTC (rev 147975)
+++ trunk/Source/WTF/wtf/dtoa/fast-dtoa.cc	2013-04-09 02:26:38 UTC (rev 147976)
@@ -62,7 +62,7 @@
     // Output: returns true if the buffer is guaranteed to contain the closest
     //    representable number to the input.
     //  Modifies the generated digits in the buffer to approach (round towards) w.
-    static bool RoundWeed(Vector<char> buffer,
+    static bool RoundWeed(BufferReference<char> buffer,
                           int length,
                           uint64_t distance_too_high_w,
                           uint64_t unsafe_interval,
@@ -182,7 +182,7 @@
     // unambiguously determined.
     //
     // Precondition: rest < ten_kappa.
-    static bool RoundWeedCounted(Vector<char> buffer,
+    static bool RoundWeedCounted(BufferReference<char> buffer,
                                  int length,
                                  uint64_t rest,
                                  uint64_t ten_kappa,
@@ -386,7 +386,7 @@
     static bool DigitGen(DiyFp low,
                          DiyFp w,
                          DiyFp high,
-                         Vector<char> buffer,
+                         BufferReference<char> buffer,
                          int* length,
                          int* kappa) {
         ASSERT(low.e() == w.e() && w.e() == high.e());
@@ -511,7 +511,7 @@
     //   increases with higher requested_digits.
     static bool DigitGenCounted(DiyFp w,
                                 int requested_digits,
-                                Vector<char> buffer,
+                                BufferReference<char> buffer,
                                 int* length,
                                 int* kappa) {
         ASSERT(kMinimalTargetExponent <= w.e() && w.e() <= kMaximalTargetExponent);
@@ -599,7 +599,7 @@
     // digits might correctly yield 'v' when read again, the closest will be
     // computed.
     static bool Grisu3(double v,
-                       Vector<char> buffer,
+                       BufferReference<char> buffer,
                        int* length,
                        int* decimal_exponent) {
         DiyFp w = Double(v).AsNormalizedDiyFp();
@@ -665,7 +665,7 @@
     // therefore the rounding strategy for halfway cases is irrelevant.
     static bool Grisu3Counted(double v,
                               int requested_digits,
-                              Vector<char> buffer,
+                              BufferReference<char> buffer,
                               int* length,
                               int* decimal_exponent) {
         DiyFp w = Double(v).AsNormalizedDiyFp();
@@ -710,7 +710,7 @@
     bool FastDtoa(double v,
                   FastDtoaMode mode,
                   int requested_digits,
-                  Vector<char> buffer,
+                  BufferReference<char> buffer,
                   int* length,
                   int* decimal_point) {
         ASSERT(v > 0);

Modified: trunk/Source/WTF/wtf/dtoa/fast-dtoa.h (147975 => 147976)


--- trunk/Source/WTF/wtf/dtoa/fast-dtoa.h	2013-04-09 01:45:50 UTC (rev 147975)
+++ trunk/Source/WTF/wtf/dtoa/fast-dtoa.h	2013-04-09 02:26:38 UTC (rev 147976)
@@ -77,7 +77,7 @@
     bool FastDtoa(double d,
                   FastDtoaMode mode,
                   int requested_digits,
-                  Vector<char> buffer,
+                  BufferReference<char> buffer,
                   int* length,
                   int* decimal_point);
     

Modified: trunk/Source/WTF/wtf/dtoa/fixed-dtoa.cc (147975 => 147976)


--- trunk/Source/WTF/wtf/dtoa/fixed-dtoa.cc	2013-04-09 01:45:50 UTC (rev 147975)
+++ trunk/Source/WTF/wtf/dtoa/fixed-dtoa.cc	2013-04-09 02:26:38 UTC (rev 147976)
@@ -123,7 +123,7 @@
     
     
     static void FillDigits32FixedLength(uint32_t number, int requested_length,
-                                        Vector<char> buffer, int* length) {
+                                        BufferReference<char> buffer, int* length) {
         for (int i = requested_length - 1; i >= 0; --i) {
             buffer[(*length) + i] = '0' + number % 10;
             number /= 10;
@@ -132,7 +132,7 @@
     }
     
     
-    static void FillDigits32(uint32_t number, Vector<char> buffer, int* length) {
+    static void FillDigits32(uint32_t number, BufferReference<char> buffer, int* length) {
         int number_length = 0;
         // We fill the digits in reverse order and exchange them afterwards.
         while (number != 0) {
@@ -156,7 +156,7 @@
     
     
     static void FillDigits64FixedLength(uint64_t number, int requested_length,
-                                        Vector<char> buffer, int* length) {
+                                        BufferReference<char> buffer, int* length) {
         UNUSED_PARAM(requested_length);
         const uint32_t kTen7 = 10000000;
         // For efficiency cut the number into 3 uint32_t parts, and print those.
@@ -171,7 +171,7 @@
     }
     
     
-    static void FillDigits64(uint64_t number, Vector<char> buffer, int* length) {
+    static void FillDigits64(uint64_t number, BufferReference<char> buffer, int* length) {
         const uint32_t kTen7 = 10000000;
         // For efficiency cut the number into 3 uint32_t parts, and print those.
         uint32_t part2 = static_cast<uint32_t>(number % kTen7);
@@ -192,7 +192,7 @@
     }
     
     
-    static void RoundUp(Vector<char> buffer, int* length, int* decimal_point) {
+    static void RoundUp(BufferReference<char> buffer, int* length, int* decimal_point) {
         // An empty buffer represents 0.
         if (*length == 0) {
             buffer[0] = '1';
@@ -234,7 +234,7 @@
     // already contained "199" (thus yielding a buffer of "19999") then a
     // rounding-up will change the contents of the buffer to "20000".
     static void FillFractionals(uint64_t fractionals, int exponent,
-                                int fractional_count, Vector<char> buffer,
+                                int fractional_count, BufferReference<char> buffer,
                                 int* length, int* decimal_point) {
         ASSERT(-128 <= exponent && exponent <= 0);
         // 'fractionals' is a fixed-point number, with binary point at bit
@@ -292,7 +292,7 @@
     
     // Removes leading and trailing zeros.
     // If leading zeros are removed then the decimal point position is adjusted.
-    static void TrimZeros(Vector<char> buffer, int* length, int* decimal_point) {
+    static void TrimZeros(BufferReference<char> buffer, int* length, int* decimal_point) {
         while (*length > 0 && buffer[(*length) - 1] == '0') {
             (*length)--;
         }
@@ -312,7 +312,7 @@
     
     bool FastFixedDtoa(double v,
                        int fractional_count,
-                       Vector<char> buffer,
+                       BufferReference<char> buffer,
                        int* length,
                        int* decimal_point) {
         const uint32_t kMaxUInt32 = 0xFFFFFFFF;

Modified: trunk/Source/WTF/wtf/dtoa/fixed-dtoa.h (147975 => 147976)


--- trunk/Source/WTF/wtf/dtoa/fixed-dtoa.h	2013-04-09 01:45:50 UTC (rev 147975)
+++ trunk/Source/WTF/wtf/dtoa/fixed-dtoa.h	2013-04-09 02:26:38 UTC (rev 147976)
@@ -51,7 +51,7 @@
     // This method only works for some parameters. If it can't handle the input it
     // returns false. The output is null-terminated when the function succeeds.
     bool FastFixedDtoa(double v, int fractional_count,
-                       Vector<char> buffer, int* length, int* decimal_point);
+                       BufferReference<char> buffer, int* length, int* decimal_point);
     
 }  // namespace double_conversion
 

Modified: trunk/Source/WTF/wtf/dtoa/strtod.cc (147975 => 147976)


--- trunk/Source/WTF/wtf/dtoa/strtod.cc	2013-04-09 01:45:50 UTC (rev 147975)
+++ trunk/Source/WTF/wtf/dtoa/strtod.cc	2013-04-09 02:26:38 UTC (rev 147976)
@@ -92,27 +92,27 @@
     // we round up to 780.
     static const int kMaxSignificantDecimalDigits = 780;
     
-    static Vector<const char> TrimLeadingZeros(Vector<const char> buffer) {
+    static BufferReference<const char> TrimLeadingZeros(BufferReference<const char> buffer) {
         for (int i = 0; i < buffer.length(); i++) {
             if (buffer[i] != '0') {
-                return buffer.SubVector(i, buffer.length());
+                return buffer.SubBufferReference(i, buffer.length());
             }
         }
-        return Vector<const char>(buffer.start(), 0);
+        return BufferReference<const char>(buffer.start(), 0);
     }
     
     
-    static Vector<const char> TrimTrailingZeros(Vector<const char> buffer) {
+    static BufferReference<const char> TrimTrailingZeros(BufferReference<const char> buffer) {
         for (int i = buffer.length() - 1; i >= 0; --i) {
             if (buffer[i] != '0') {
-                return buffer.SubVector(0, i + 1);
+                return buffer.SubBufferReference(0, i + 1);
             }
         }
-        return Vector<const char>(buffer.start(), 0);
+        return BufferReference<const char>(buffer.start(), 0);
     }
     
     
-    static void TrimToMaxSignificantDigits(Vector<const char> buffer,
+    static void TrimToMaxSignificantDigits(BufferReference<const char> buffer,
                                            int exponent,
                                            char* significant_buffer,
                                            int* significant_exponent) {
@@ -134,7 +134,7 @@
     // When the string starts with "1844674407370955161" no further digit is read.
     // Since 2^64 = 18446744073709551616 it would still be possible read another
     // digit if it was less or equal than 6, but this would complicate the code.
-    static uint64_t ReadUint64(Vector<const char> buffer,
+    static uint64_t ReadUint64(BufferReference<const char> buffer,
                                int* number_of_read_digits) {
         uint64_t result = 0;
         int i = 0;
@@ -152,7 +152,7 @@
     // The returned DiyFp is not necessarily normalized.
     // If remaining_decimals is zero then the returned DiyFp is accurate.
     // Otherwise it has been rounded and has error of at most 1/2 ulp.
-    static void ReadDiyFp(Vector<const char> buffer,
+    static void ReadDiyFp(BufferReference<const char> buffer,
                           DiyFp* result,
                           int* remaining_decimals) {
         int read_digits;
@@ -173,7 +173,7 @@
     }
     
     
-    static bool DoubleStrtod(Vector<const char> trimmed,
+    static bool DoubleStrtod(BufferReference<const char> trimmed,
                              int exponent,
                              double* result) {
 #if !defined(DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS)
@@ -251,7 +251,7 @@
     // If the function returns true then the result is the correct double.
     // Otherwise it is either the correct double or the double that is just below
     // the correct double.
-    static bool DiyFpStrtod(Vector<const char> buffer,
+    static bool DiyFpStrtod(BufferReference<const char> buffer,
                             int exponent,
                             double* result) {
         DiyFp input;
@@ -368,7 +368,7 @@
     //   buffer.length() + exponent <= kMaxDecimalPower + 1
     //   buffer.length() + exponent > kMinDecimalPower
     //   buffer.length() <= kMaxDecimalSignificantDigits
-    static double BignumStrtod(Vector<const char> buffer,
+    static double BignumStrtod(BufferReference<const char> buffer,
                                int exponent,
                                double guess) {
         if (guess == Double::Infinity()) {
@@ -413,9 +413,9 @@
     }
     
     
-    double Strtod(Vector<const char> buffer, int exponent) {
-        Vector<const char> left_trimmed = TrimLeadingZeros(buffer);
-        Vector<const char> trimmed = TrimTrailingZeros(left_trimmed);
+    double Strtod(BufferReference<const char> buffer, int exponent) {
+        BufferReference<const char> left_trimmed = TrimLeadingZeros(buffer);
+        BufferReference<const char> trimmed = TrimTrailingZeros(left_trimmed);
         exponent += left_trimmed.length() - trimmed.length();
         if (trimmed.length() == 0) return 0.0;
         if (trimmed.length() > kMaxSignificantDecimalDigits) {
@@ -423,7 +423,7 @@
             int significant_exponent;
             TrimToMaxSignificantDigits(trimmed, exponent,
                                        significant_buffer, &significant_exponent);
-            return Strtod(Vector<const char>(significant_buffer,
+            return Strtod(BufferReference<const char>(significant_buffer,
                                              kMaxSignificantDecimalDigits),
                           significant_exponent);
         }

Modified: trunk/Source/WTF/wtf/dtoa/strtod.h (147975 => 147976)


--- trunk/Source/WTF/wtf/dtoa/strtod.h	2013-04-09 01:45:50 UTC (rev 147975)
+++ trunk/Source/WTF/wtf/dtoa/strtod.h	2013-04-09 02:26:38 UTC (rev 147976)
@@ -36,7 +36,7 @@
     
     // The buffer must only contain digits in the range [0-9]. It must not
     // contain a dot or a sign. It must not start with '0', and must not be empty.
-    double Strtod(Vector<const char> buffer, int exponent);
+    double Strtod(BufferReference<const char> buffer, int exponent);
     
 }  // namespace double_conversion
 

Modified: trunk/Source/WTF/wtf/dtoa/utils.h (147975 => 147976)


--- trunk/Source/WTF/wtf/dtoa/utils.h	2013-04-09 01:45:50 UTC (rev 147975)
+++ trunk/Source/WTF/wtf/dtoa/utils.h	2013-04-09 02:26:38 UTC (rev 147976)
@@ -136,23 +136,24 @@
         ASSERT(length == static_cast<size_t>(static_cast<int>(length)));
         return static_cast<int>(length);
     }
-    
-    // This is a simplified version of V8's Vector class.
+
+    // BufferReference abstract a memory buffer. It provides a pointer
+    // to the beginning of the buffer, and the available length. 
     template <typename T>
-    class Vector {
+    class BufferReference {
     public:
-        Vector() : start_(NULL), length_(0) {}
-        Vector(T* data, int length) : start_(data), length_(length) {
+        BufferReference() : start_(NULL), length_(0) {}
+        BufferReference(T* data, int length) : start_(data), length_(length) {
             ASSERT(length == 0 || (length > 0 && data != NULL));
         }
         
         // Returns a vector using the same backing storage as this one,
         // spanning from and including 'from', to but not including 'to'.
-        Vector<T> SubVector(int from, int to) {
+        BufferReference<T> SubBufferReference(int from, int to) {
             ASSERT(to <= length_);
             ASSERT(from < to);
             ASSERT(0 <= from);
-            return Vector<T>(start() + from, to - from);
+            return BufferReference<T>(start() + from, to - from);
         }
         
         // Returns the length of the vector.
@@ -255,7 +256,7 @@
         }
         
     private:
-        Vector<char> buffer_;
+        BufferReference<char> buffer_;
         int position_;
         
         bool is_finalized() const { return position_ < 0; }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to