Revision: 21585
Author:   [email protected]
Date:     Fri May 30 17:07:38 2014 UTC
Log: Inlined optimized runtime functions: expose Runtime versions for direct testing, skip Hydrogen versions

[email protected]

Review URL: https://codereview.chromium.org/302703004
http://code.google.com/p/v8/source/detail?r=21585

Modified:
 /branches/bleeding_edge/src/runtime.cc
 /branches/bleeding_edge/src/runtime.h
 /branches/bleeding_edge/src/serialize.cc
/branches/bleeding_edge/test/mjsunit/runtime-gen/arraybuffergetbytelength.js /branches/bleeding_edge/test/mjsunit/runtime-gen/arraybufferviewgetbytelength.js /branches/bleeding_edge/test/mjsunit/runtime-gen/arraybufferviewgetbyteoffset.js
 /branches/bleeding_edge/test/mjsunit/runtime-gen/constructdouble.js
 /branches/bleeding_edge/test/mjsunit/runtime-gen/dataviewinitialize.js
/branches/bleeding_edge/test/mjsunit/runtime-gen/debugcallbacksupportsstepping.js
 /branches/bleeding_edge/test/mjsunit/runtime-gen/doublehi.js
 /branches/bleeding_edge/test/mjsunit/runtime-gen/doublelo.js
 /branches/bleeding_edge/test/mjsunit/runtime-gen/mathlogrt.js
 /branches/bleeding_edge/test/mjsunit/runtime-gen/mathsqrtrt.js
 /branches/bleeding_edge/test/mjsunit/runtime-gen/maxsmi.js
 /branches/bleeding_edge/test/mjsunit/runtime-gen/typedarraygetlength.js
 /branches/bleeding_edge/test/mjsunit/runtime-gen/typedarrayinitialize.js
 /branches/bleeding_edge/test/mjsunit/runtime-gen/typedarraymaxsizeinheap.js
 /branches/bleeding_edge/tools/generate-runtime-tests.py

=======================================
--- /branches/bleeding_edge/src/runtime.cc      Fri May 30 17:04:40 2014 UTC
+++ /branches/bleeding_edge/src/runtime.cc      Fri May 30 17:07:38 2014 UTC
@@ -14678,7 +14678,8 @@
   int entry_count = 0
       RUNTIME_FUNCTION_LIST(COUNT_ENTRY)
       RUNTIME_HIDDEN_FUNCTION_LIST(COUNT_ENTRY)
-      INLINE_FUNCTION_LIST(COUNT_ENTRY);
+      INLINE_FUNCTION_LIST(COUNT_ENTRY)
+      INLINE_OPTIMIZED_FUNCTION_LIST(COUNT_ENTRY);
 #undef COUNT_ENTRY
   Factory* factory = isolate->factory();
   Handle<FixedArray> elements = factory->NewFixedArray(entry_count);
@@ -14702,6 +14703,7 @@
   }
   inline_runtime_functions = false;
   RUNTIME_FUNCTION_LIST(ADD_ENTRY)
+  INLINE_OPTIMIZED_FUNCTION_LIST(ADD_ENTRY)
   // Calling hidden runtime functions should just throw.
   RUNTIME_HIDDEN_FUNCTION_LIST(ADD_ENTRY)
   inline_runtime_functions = true;
@@ -15076,6 +15078,7 @@

 static const Runtime::Function kIntrinsicFunctions[] = {
   RUNTIME_FUNCTION_LIST(F)
+  INLINE_OPTIMIZED_FUNCTION_LIST(F)
   RUNTIME_HIDDEN_FUNCTION_LIST(FH)
   INLINE_FUNCTION_LIST(I)
   INLINE_OPTIMIZED_FUNCTION_LIST(IO)
=======================================
--- /branches/bleeding_edge/src/runtime.h       Fri May 30 14:27:19 2014 UTC
+++ /branches/bleeding_edge/src/runtime.h       Fri May 30 17:07:38 2014 UTC
@@ -661,6 +661,8 @@
 // INLINE_OPTIMIZED_FUNCTION_LIST defines all inlined functions accessed
 // with a native call of the form %_name from within JS code that also have
// a corresponding runtime function, that is called from non-optimized code.
+// For the benefit of (fuzz) tests, the runtime version can also be called
+// directly as %name (i.e. without the leading underscore).
// Entries have the form F(name, number of arguments, number of return values).
 #define INLINE_OPTIMIZED_FUNCTION_LIST(F) \
/* Typed Arrays */ \
@@ -733,6 +735,7 @@
   enum FunctionId {
 #define F(name, nargs, ressize) k##name,
     RUNTIME_FUNCTION_LIST(F)
+    INLINE_OPTIMIZED_FUNCTION_LIST(F)
 #undef F
 #define F(name, nargs, ressize) kHidden##name,
     RUNTIME_HIDDEN_FUNCTION_LIST(F)
=======================================
--- /branches/bleeding_edge/src/serialize.cc    Tue May 27 07:57:22 2014 UTC
+++ /branches/bleeding_edge/src/serialize.cc    Fri May 30 17:07:38 2014 UTC
@@ -150,6 +150,7 @@
     "Runtime::" #name },

   RUNTIME_FUNCTION_LIST(RUNTIME_ENTRY)
+  INLINE_OPTIMIZED_FUNCTION_LIST(RUNTIME_ENTRY)
 #undef RUNTIME_ENTRY

 #define RUNTIME_HIDDEN_ENTRY(name, nargs, ressize) \
=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/arraybuffergetbytelength.js Thu May 8 13:11:59 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/runtime-gen/arraybuffergetbytelength.js Fri May 30 17:07:38 2014 UTC
@@ -2,4 +2,4 @@
 // AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
 // Flags: --allow-natives-syntax --harmony
 var _holder = new ArrayBuffer(8);
-%_ArrayBufferGetByteLength(_holder);
+%ArrayBufferGetByteLength(_holder);
=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/arraybufferviewgetbytelength.js Fri May 16 13:16:08 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/runtime-gen/arraybufferviewgetbytelength.js Fri May 30 17:07:38 2014 UTC
@@ -2,4 +2,4 @@
 // AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
 // Flags: --allow-natives-syntax --harmony
 var _holder = new Int32Array(2);
-%_ArrayBufferViewGetByteLength(_holder);
+%ArrayBufferViewGetByteLength(_holder);
=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/arraybufferviewgetbyteoffset.js Fri May 16 13:16:08 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/runtime-gen/arraybufferviewgetbyteoffset.js Fri May 30 17:07:38 2014 UTC
@@ -2,4 +2,4 @@
 // AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
 // Flags: --allow-natives-syntax --harmony
 var _holder = new Int32Array(2);
-%_ArrayBufferViewGetByteOffset(_holder);
+%ArrayBufferViewGetByteOffset(_holder);
=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/constructdouble.js Thu May 8 13:11:59 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/runtime-gen/constructdouble.js Fri May 30 17:07:38 2014 UTC
@@ -3,4 +3,4 @@
 // Flags: --allow-natives-syntax --harmony
 var _hi = 32;
 var _lo = 32;
-%_ConstructDouble(_hi, _lo);
+%ConstructDouble(_hi, _lo);
=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/dataviewinitialize.js Fri May 16 13:16:08 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/runtime-gen/dataviewinitialize.js Fri May 30 17:07:38 2014 UTC
@@ -5,4 +5,4 @@
 var _buffer = new ArrayBuffer(8);
 var _byte_offset = 1.5;
 var _byte_length = 1.5;
-%_DataViewInitialize(_holder, _buffer, _byte_offset, _byte_length);
+%DataViewInitialize(_holder, _buffer, _byte_offset, _byte_length);
=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/debugcallbacksupportsstepping.js Thu May 8 13:11:59 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/runtime-gen/debugcallbacksupportsstepping.js Fri May 30 17:07:38 2014 UTC
@@ -2,4 +2,4 @@
 // AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
 // Flags: --allow-natives-syntax --harmony
 var _callback = new Object();
-%_DebugCallbackSupportsStepping(_callback);
+%DebugCallbackSupportsStepping(_callback);
=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/doublehi.js Thu May 8 13:11:59 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/runtime-gen/doublehi.js Fri May 30 17:07:38 2014 UTC
@@ -2,4 +2,4 @@
 // AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
 // Flags: --allow-natives-syntax --harmony
 var _x = 1.5;
-%_DoubleHi(_x);
+%DoubleHi(_x);
=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/doublelo.js Thu May 8 13:11:59 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/runtime-gen/doublelo.js Fri May 30 17:07:38 2014 UTC
@@ -2,4 +2,4 @@
 // AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
 // Flags: --allow-natives-syntax --harmony
 var _x = 1.5;
-%_DoubleLo(_x);
+%DoubleLo(_x);
=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/mathlogrt.js Fri May 16 13:16:08 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/runtime-gen/mathlogrt.js Fri May 30 17:07:38 2014 UTC
@@ -2,4 +2,4 @@
 // AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
 // Flags: --allow-natives-syntax --harmony
 var _x = 1.5;
-%_MathLogRT(_x);
+%MathLogRT(_x);
=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/mathsqrtrt.js Wed May 14 08:51:10 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/runtime-gen/mathsqrtrt.js Fri May 30 17:07:38 2014 UTC
@@ -2,4 +2,4 @@
 // AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
 // Flags: --allow-natives-syntax --harmony
 var _x = 1.5;
-%_MathSqrtRT(_x);
+%MathSqrtRT(_x);
=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/maxsmi.js Thu May 8 13:11:59 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/runtime-gen/maxsmi.js Fri May 30 17:07:38 2014 UTC
@@ -1,4 +1,4 @@
 // Copyright 2014 the V8 project authors. All rights reserved.
 // AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
 // Flags: --allow-natives-syntax --harmony
-%_MaxSmi();
+%MaxSmi();
=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/typedarraygetlength.js Fri May 16 13:16:08 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/runtime-gen/typedarraygetlength.js Fri May 30 17:07:38 2014 UTC
@@ -2,4 +2,4 @@
 // AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
 // Flags: --allow-natives-syntax --harmony
 var _holder = new Int32Array(2);
-%_TypedArrayGetLength(_holder);
+%TypedArrayGetLength(_holder);
=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/typedarrayinitialize.js Thu May 8 13:11:59 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/runtime-gen/typedarrayinitialize.js Fri May 30 17:07:38 2014 UTC
@@ -6,4 +6,4 @@
 var arg2 = new ArrayBuffer(8);
 var _byte_offset_object = 1.5;
 var arg4 = 4;
-%_TypedArrayInitialize(_holder, arg1, arg2, _byte_offset_object, arg4);
+%TypedArrayInitialize(_holder, arg1, arg2, _byte_offset_object, arg4);
=======================================
--- /branches/bleeding_edge/test/mjsunit/runtime-gen/typedarraymaxsizeinheap.js Thu May 8 13:11:59 2014 UTC +++ /branches/bleeding_edge/test/mjsunit/runtime-gen/typedarraymaxsizeinheap.js Fri May 30 17:07:38 2014 UTC
@@ -1,4 +1,4 @@
 // Copyright 2014 the V8 project authors. All rights reserved.
 // AUTO-GENERATED BY tools/generate-runtime-tests.py, DO NOT MODIFY
 // Flags: --allow-natives-syntax --harmony
-%_TypedArrayMaxSizeInHeap();
+%TypedArrayMaxSizeInHeap();
=======================================
--- /branches/bleeding_edge/tools/generate-runtime-tests.py Wed May 28 09:52:38 2014 UTC +++ /branches/bleeding_edge/tools/generate-runtime-tests.py Fri May 30 17:07:38 2014 UTC
@@ -828,7 +828,6 @@
   inline_functions = []
   with open(HEADERFILENAME, "r") as f:
     inline_list = "#define INLINE_FUNCTION_LIST(F) \\\n"
-    inline_opt_list = "#define INLINE_OPTIMIZED_FUNCTION_LIST(F) \\\n"
     inline_function = re.compile(r"^\s*F\((\w+), \d+, \d+\)\s*\\?")
     mode = "SEARCHING"
     for line in f:
@@ -839,7 +838,7 @@
         if not line.endswith("\\\n"):
           mode = "SEARCHING"
       elif mode == "SEARCHING":
-        if line == inline_list or line == inline_opt_list:
+        if line == inline_list:
           mode = "ACTIVE"
   return inline_functions

--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to