Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(717)

Side by Side Diff: src/builtins/builtins.h

Issue 2498073002: [refactoring] Split CodeAssemblerState out of CodeAssembler (Closed)
Patch Set: one more attempt Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/builtins/builtins.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_BUILTINS_BUILTINS_H_ 5 #ifndef V8_BUILTINS_BUILTINS_H_
6 #define V8_BUILTINS_BUILTINS_H_ 6 #define V8_BUILTINS_BUILTINS_H_
7 7
8 #include "src/base/flags.h" 8 #include "src/base/flags.h"
9 #include "src/handles.h" 9 #include "src/handles.h"
10 10
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 709
710 #define BUILTIN_LIST_A(V) \ 710 #define BUILTIN_LIST_A(V) \
711 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ 711 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
712 V, V, V) 712 V, V, V)
713 713
714 #define BUILTIN_LIST_DBG(V) \ 714 #define BUILTIN_LIST_DBG(V) \
715 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ 715 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
716 IGNORE_BUILTIN, IGNORE_BUILTIN, V) 716 IGNORE_BUILTIN, IGNORE_BUILTIN, V)
717 717
718 // Forward declarations. 718 // Forward declarations.
719 class CodeStubAssembler;
720 class ObjectVisitor; 719 class ObjectVisitor;
720 namespace compiler {
721 class CodeAssemblerState;
722 }
721 723
722 class Builtins { 724 class Builtins {
723 public: 725 public:
724 ~Builtins(); 726 ~Builtins();
725 727
726 // Generate all builtin code objects. Should be called once during 728 // Generate all builtin code objects. Should be called once during
727 // isolate initialization. 729 // isolate initialization.
728 void SetUp(Isolate* isolate, bool create_heap_objects); 730 void SetUp(Isolate* isolate, bool create_heap_objects);
729 void TearDown(); 731 void TearDown();
730 732
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 static void Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode, 811 static void Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode,
810 TailCallMode tail_call_mode); 812 TailCallMode tail_call_mode);
811 813
812 static void Generate_InterpreterPushArgsAndCallImpl( 814 static void Generate_InterpreterPushArgsAndCallImpl(
813 MacroAssembler* masm, TailCallMode tail_call_mode, 815 MacroAssembler* masm, TailCallMode tail_call_mode,
814 CallableType function_type); 816 CallableType function_type);
815 817
816 static void Generate_InterpreterPushArgsAndConstructImpl( 818 static void Generate_InterpreterPushArgsAndConstructImpl(
817 MacroAssembler* masm, CallableType function_type); 819 MacroAssembler* masm, CallableType function_type);
818 820
819 static void Generate_DatePrototype_GetField(CodeStubAssembler* masm,
820 int field_index);
821
822 enum class MathMaxMinKind { kMax, kMin }; 821 enum class MathMaxMinKind { kMax, kMin };
823 static void Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind); 822 static void Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind);
824 823
825 #define DECLARE_ASM(Name, ...) \ 824 #define DECLARE_ASM(Name, ...) \
826 static void Generate_##Name(MacroAssembler* masm); 825 static void Generate_##Name(MacroAssembler* masm);
827 #define DECLARE_TF(Name, ...) \ 826 #define DECLARE_TF(Name, ...) \
828 static void Generate_##Name(CodeStubAssembler* csasm); 827 static void Generate_##Name(compiler::CodeAssemblerState* state);
829 828
830 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, DECLARE_TF, DECLARE_TF, 829 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, DECLARE_TF, DECLARE_TF,
831 DECLARE_ASM, DECLARE_ASM, DECLARE_ASM) 830 DECLARE_ASM, DECLARE_ASM, DECLARE_ASM)
832 831
833 #undef DECLARE_ASM 832 #undef DECLARE_ASM
834 #undef DECLARE_TF 833 #undef DECLARE_TF
835 834
836 // Note: These are always Code objects, but to conform with 835 // Note: These are always Code objects, but to conform with
837 // IterateBuiltins() above which assumes Object**'s for the callback 836 // IterateBuiltins() above which assumes Object**'s for the callback
838 // function f, we use an Object* array here. 837 // function f, we use an Object* array here.
839 Object* builtins_[builtin_count]; 838 Object* builtins_[builtin_count];
840 bool initialized_; 839 bool initialized_;
841 840
842 friend class Isolate; 841 friend class Isolate;
843 842
844 DISALLOW_COPY_AND_ASSIGN(Builtins); 843 DISALLOW_COPY_AND_ASSIGN(Builtins);
845 }; 844 };
846 845
847 } // namespace internal 846 } // namespace internal
848 } // namespace v8 847 } // namespace v8
849 848
850 #endif // V8_BUILTINS_BUILTINS_H_ 849 #endif // V8_BUILTINS_BUILTINS_H_
OLDNEW
« no previous file with comments | « no previous file | src/builtins/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698