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

Review URL: https://codereview.chromium.org/997933003

Cr-Commit-Position: refs/heads/master@{#27137}
This commit is contained in:
svenpanne 2015-03-11 08:18:44 -07:00 committed by Commit bot
parent d88656af9f
commit a69cfac182
2 changed files with 20 additions and 31 deletions

View File

@ -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

View File

@ -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.