Reviewers: Michael Starzinger,

Message:
Hopefully the last CL for this issue... :-)

Description:
Re-arranged intrinsic macros a bit.

Outside of runtime.h, only the distinction between intrinsics
returning pairs and those returning pairs is really meaningful, not
the internal traditional partitioning of them.

BUG=v8:3947
LOG=n

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

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+20, -31 lines):
  M src/runtime/runtime.h
  M src/runtime/runtime.cc


Index: src/runtime/runtime.cc
diff --git a/src/runtime/runtime.cc b/src/runtime/runtime.cc
index bd69fae31868545aadaa6ea7e3104534eb8a5f3c..776239aa4283233e04cb85576f7bc53c598a9ede 100644
--- a/src/runtime/runtime.cc
+++ b/src/runtime/runtime.cc
@@ -14,20 +14,13 @@ namespace internal {
 #define F(name, number_of_args, result_size)                    \
   Object* Runtime_##name(int args_length, Object** args_object, \
                          Isolate* isolate);
+FOR_EACH_INTRINSIC_RETURN_OBJECT(F)
+#undef F

 #define P(name, number_of_args, result_size)                       \
   ObjectPair Runtime_##name(int args_length, Object** args_object, \
                             Isolate* isolate);
-
-RUNTIME_FUNCTION_LIST_RETURN_OBJECT(F)
-RUNTIME_FUNCTION_LIST_RETURN_PAIR(P)
-INLINE_OPTIMIZED_FUNCTION_LIST(F)
-// Reference implementation for inlined runtime functions. Only used when the -// compiler does not support a certain intrinsic. Don't optimize these, but
-// implement the intrinsic in the respective compiler instead.
-INLINE_FUNCTION_LIST(F)
-
-#undef F
+FOR_EACH_INTRINSIC_RETURN_PAIR(P)
 #undef P


Index: src/runtime/runtime.h
diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h
index fc4d96e9370f9fe8a1404b2a924bdec4433036d7..ce76c6d018912a0a961a3d6293eccd297bc72284 100644
--- a/src/runtime/runtime.h
+++ b/src/runtime/runtime.h
@@ -510,7 +510,7 @@ namespace internal {
   F(MathPowRT, 2, 1)


-#define RUNTIME_FUNCTION_LIST_RETURN_PAIR(F)              \
+#define FOR_EACH_INTRINSIC_RETURN_PAIR(F)                 \
   F(LoadLookupSlot, 2, 2)                                 \
   F(LoadLookupSlotNoReferenceError, 2, 2)                 \
   F(ResolvePossiblyDirectEval, 6, 2)                      \
@@ -626,23 +626,6 @@ namespace internal {
 #endif


-#define RUNTIME_FUNCTION_LIST_RETURN_OBJECT(F) \
-  RUNTIME_FUNCTION_LIST_ALWAYS_1(F)            \
-  RUNTIME_FUNCTION_LIST_ALWAYS_2(F)            \
-  RUNTIME_FUNCTION_LIST_ALWAYS_3(F)            \
-  RUNTIME_FUNCTION_LIST_DEBUGGER(F)            \
-  RUNTIME_FUNCTION_LIST_I18N_SUPPORT(F)
-
-
-// RUNTIME_FUNCTION_LIST_ defines the intrinsics typically implemented only
-// as runtime functions. These come in 2 flavors, either returning an object or
-// returning a pair.
-// Entries have the form F(name, number of arguments, number of return values).
-#define RUNTIME_FUNCTION_LIST(F)         \
-  RUNTIME_FUNCTION_LIST_RETURN_OBJECT(F) \
-  RUNTIME_FUNCTION_LIST_RETURN_PAIR(F)
-
-
// ---------------------------------------------------------------------------- // INLINE_FUNCTION_LIST defines the intrinsics typically handled specially by
 // the various compilers.
@@ -732,11 +715,24 @@ namespace internal {
   F(GetPrototype, 1, 1)


-#define FOR_EACH_INTRINSIC(F) \
-  RUNTIME_FUNCTION_LIST(F)    \
-  INLINE_FUNCTION_LIST(F)     \
+#define FOR_EACH_INTRINSIC_RETURN_OBJECT(F) \
+  RUNTIME_FUNCTION_LIST_ALWAYS_1(F)         \
+  RUNTIME_FUNCTION_LIST_ALWAYS_2(F)         \
+  RUNTIME_FUNCTION_LIST_ALWAYS_3(F)         \
+  RUNTIME_FUNCTION_LIST_DEBUGGER(F)         \
+  RUNTIME_FUNCTION_LIST_I18N_SUPPORT(F)     \
+  INLINE_FUNCTION_LIST(F)                   \
   INLINE_OPTIMIZED_FUNCTION_LIST(F)

+
+// FOR_EACH_INTRINSIC defines the list of all intrinsics, coming in 2 flavors,
+// either returning an object or a pair.
+// Entries have the form F(name, number of arguments, number of values).
+#define FOR_EACH_INTRINSIC(F)       \
+  FOR_EACH_INTRINSIC_RETURN_PAIR(F) \
+  FOR_EACH_INTRINSIC_RETURN_OBJECT(F)
+
+
//---------------------------------------------------------------------------
 // Runtime provides access to all C++ runtime 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