Chromium Code Reviews| Index: src/builtins/builtins.h |
| diff --git a/src/builtins/builtins.h b/src/builtins/builtins.h |
| index f8ce2e699fbc9e36b17bd5e516e86264364e8a22..348745073f6f996b062045407879f240bed9290d 100644 |
| --- a/src/builtins/builtins.h |
| +++ b/src/builtins/builtins.h |
| @@ -41,13 +41,16 @@ namespace internal { |
| // Args: name, arguments count |
| // TFS: Builtin in Turbofan, with CodeStub linkage. |
| // Args: name, code kind, extra IC state, interface descriptor |
| +// TFS_UNARY_OP: |
|
Benedikt Meurer
2016/08/30 17:16:49
Don't introduce a new category here. Instead just
|
| +// Builtin in Turbofan, with CudeStub linkage and inlinable function. |
| +// Args: name, code kind, extra IC state, interface descriptor |
| // ASM: Builtin in platform-dependent assembly. |
| // Args: name |
| // ASH: Handlers implemented in platform-dependent assembly. |
| // Args: name, code kind, extra IC state |
| // DBG: Builtin in platform-dependent assembly, used by the debugger. |
| // Args: name |
| -#define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \ |
| +#define BUILTIN_LIST(CPP, API, TFJ, TFS, TFS_UNARY_OP, ASM, ASH, DBG) \ |
| ASM(Abort) \ |
| /* Handlers */ \ |
| ASH(KeyedLoadIC_Megamorphic, KEYED_LOAD_IC, kNoExtraICState) \ |
| @@ -178,7 +181,7 @@ namespace internal { |
| TypeConversion) \ |
| TFS(NonPrimitiveToPrimitive_String, BUILTIN, kNoExtraICState, \ |
| TypeConversion) \ |
| - TFS(StringToNumber, BUILTIN, kNoExtraICState, TypeConversion) \ |
| + TFS_UNARY_OP(StringToNumber, BUILTIN, kNoExtraICState, TypeConversion) \ |
| TFS(NonNumberToNumber, BUILTIN, kNoExtraICState, TypeConversion) \ |
| ASM(ToNumber) \ |
| \ |
| @@ -533,24 +536,28 @@ namespace internal { |
| #define IGNORE_BUILTIN(...) |
| -#define BUILTIN_LIST_ALL(V) BUILTIN_LIST(V, V, V, V, V, V, V) |
| +#define BUILTIN_LIST_ALL(V) BUILTIN_LIST(V, V, V, V, V, V, V, V) |
| #define BUILTIN_LIST_C(V) \ |
| BUILTIN_LIST(V, V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ |
| - IGNORE_BUILTIN, IGNORE_BUILTIN) |
| + IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN) |
| #define BUILTIN_LIST_A(V) \ |
| BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ |
| - V, V, V) |
| + IGNORE_BUILTIN, V, V, V) |
| #define BUILTIN_LIST_DBG(V) \ |
| BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ |
| - IGNORE_BUILTIN, IGNORE_BUILTIN, V) |
| + IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, V) |
| // Forward declarations. |
| class CodeStubAssembler; |
| class ObjectVisitor; |
| +namespace compiler { |
| +class Node; |
| +} |
| + |
| class Builtins { |
| public: |
| ~Builtins(); |
| @@ -653,12 +660,18 @@ class Builtins { |
| static void Generate_##Name(MacroAssembler* masm); |
| #define DECLARE_TF(Name, ...) \ |
| static void Generate_##Name(CodeStubAssembler* csasm); |
| +#define DECLARE_TF_UNARY_OP(Name, ...) \ |
| + static compiler::Node* GenerateImpl_##Name(CodeStubAssembler* csasm, \ |
| + compiler::Node* input, \ |
| + compiler::Node* context); \ |
| + static void Generate_##Name(CodeStubAssembler* csasm); |
| BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, DECLARE_TF, DECLARE_TF, |
| - DECLARE_ASM, DECLARE_ASM, DECLARE_ASM) |
| + DECLARE_TF_UNARY_OP, DECLARE_ASM, DECLARE_ASM, DECLARE_ASM) |
| #undef DECLARE_ASM |
| #undef DECLARE_TF |
| +#undef DECLARE_TF_UNARY_OP |
| // Note: These are always Code objects, but to conform with |
| // IterateBuiltins() above which assumes Object**'s for the callback |