Revision: 11527
Author:   [email protected]
Date:     Tue May  8 05:38:24 2012
Log:      Force inlining CopyChars and String::Get.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10332054
http://code.google.com/p/v8/source/detail?r=11527

Modified:
 /branches/bleeding_edge/src/globals.h
 /branches/bleeding_edge/src/objects.h
 /branches/bleeding_edge/src/v8utils.h

=======================================
--- /branches/bleeding_edge/src/globals.h       Mon Mar 12 05:35:28 2012
+++ /branches/bleeding_edge/src/globals.h       Tue May  8 05:38:24 2012
@@ -345,6 +345,9 @@
 #define INLINE(header) inline __attribute__((always_inline)) header
 #define NO_INLINE(header) __attribute__((noinline)) header
 #endif
+#elif defined(_MSC_VER) && !defined(DEBUG)
+#define INLINE(header) __forceinline header
+#define NO_INLINE(header) header
 #else
 #define INLINE(header) inline header
 #define NO_INLINE(header) header
=======================================
--- /branches/bleeding_edge/src/objects.h       Tue May  8 05:30:36 2012
+++ /branches/bleeding_edge/src/objects.h       Tue May  8 05:38:24 2012
@@ -6888,7 +6888,7 @@
   inline void Set(int index, uint16_t value);
   // Get individual two byte char in the string.  Repeated calls
   // to this method are not efficient unless the string is flat.
-  inline uint16_t Get(int index);
+  INLINE(uint16_t Get(int index));

   // Try to flatten the string.  Checks first inline to see if it is
   // necessary.  Does nothing if the string is not a cons string.
=======================================
--- /branches/bleeding_edge/src/v8utils.h       Tue Nov 29 02:56:11 2011
+++ /branches/bleeding_edge/src/v8utils.h       Tue May  8 05:38:24 2012
@@ -1,4 +1,4 @@
-// Copyright 2011 the V8 project authors. All rights reserved.
+// Copyright 2012 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:
@@ -199,10 +199,13 @@
                             bool verbose = true);


-
 // Copy from ASCII/16bit chars to ASCII/16bit chars.
 template <typename sourcechar, typename sinkchar>
-inline void CopyChars(sinkchar* dest, const sourcechar* src, int chars) {
+INLINE(void CopyChars(sinkchar* dest, const sourcechar* src, int chars));
+
+
+template <typename sourcechar, typename sinkchar>
+void CopyChars(sinkchar* dest, const sourcechar* src, int chars) {
   sinkchar* limit = dest + chars;
 #ifdef V8_HOST_CAN_READ_UNALIGNED
   if (sizeof(*dest) == sizeof(*src)) {

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to