Reviewers: Benedikt Meurer, Sven Panne, danno,

Message:
On 2013/10/25 10:32:34, Benedikt Meurer wrote:
Looks OK. CC'ing sven/danno for additional feedback.

Thank you for review.

Description:
Cast const char * to const uint8_t *, which removed a unnecessary version of
InternalStringToDouble template.

Code size (android arm build for d8):
old d8: 17,479,047 bytes
new d8: 17,445,492 bytes
Total code size saved: 33,555 bytes


BUG=NONE
TEST=NONE


Please review this at https://codereview.chromium.org/36903002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+7, -2 lines):
  M src/conversions.cc


Index: src/conversions.cc
diff --git a/src/conversions.cc b/src/conversions.cc
index fd0f9ee4d81cce588c5f2625463205d0a117d206..22458f9888495286d7efaf9f4b1774c584b2cd47 100644
--- a/src/conversions.cc
+++ b/src/conversions.cc
@@ -47,7 +47,9 @@ namespace internal {
 double StringToDouble(UnicodeCache* unicode_cache,
const char* str, int flags, double empty_string_val) {
   const char* end = str + StrLength(str);
-  return InternalStringToDouble(unicode_cache, str, end, flags,
+  return InternalStringToDouble(unicode_cache,
+                                reinterpret_cast<const uint8_t *>(str),
+ reinterpret_cast<const uint8_t *>(end), flags,
                                 empty_string_val);
 }

@@ -57,10 +59,13 @@ double StringToDouble(UnicodeCache* unicode_cache,
                       int flags,
                       double empty_string_val) {
   const char* end = str.start() + str.length();
-  return InternalStringToDouble(unicode_cache, str.start(), end, flags,
+  return InternalStringToDouble(unicode_cache,
+ reinterpret_cast<const uint8_t *>(str.start()), + reinterpret_cast<const uint8_t *>(end), flags,
                                 empty_string_val);
 }

+
 double StringToDouble(UnicodeCache* unicode_cache,
                       Vector<const uc16> str,
                       int flags,


--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to