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

Side by Side Diff: src/full-codegen/full-codegen.h

Issue 2618553004: [compiler] Collect eager inner functions for compilation during renumbering. (Closed)
Patch Set: Address comments and remove field from ParseInfo Created 3 years, 11 months 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 | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/full-codegen.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_FULL_CODEGEN_FULL_CODEGEN_H_ 5 #ifndef V8_FULL_CODEGEN_FULL_CODEGEN_H_
6 #define V8_FULL_CODEGEN_FULL_CODEGEN_H_ 6 #define V8_FULL_CODEGEN_FULL_CODEGEN_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assert-scope.h" 9 #include "src/assert-scope.h"
10 #include "src/ast/ast.h" 10 #include "src/ast/ast.h"
11 #include "src/ast/scopes.h" 11 #include "src/ast/scopes.h"
12 #include "src/bit-vector.h" 12 #include "src/bit-vector.h"
13 #include "src/code-factory.h" 13 #include "src/code-factory.h"
14 #include "src/code-stubs.h" 14 #include "src/code-stubs.h"
15 #include "src/codegen.h" 15 #include "src/codegen.h"
16 #include "src/deoptimizer.h" 16 #include "src/deoptimizer.h"
17 #include "src/globals.h" 17 #include "src/globals.h"
18 #include "src/objects.h" 18 #include "src/objects.h"
19 19
20 namespace v8 { 20 namespace v8 {
21 namespace internal { 21 namespace internal {
22 22
23 // Forward declarations. 23 // Forward declarations.
24 class CompilationInfo; 24 class CompilationInfo;
25 class CompilationJob; 25 class CompilationJob;
26 class JumpPatchSite; 26 class JumpPatchSite;
27 class Scope; 27 class Scope;
28 enum class LazyCompilationMode;
29 28
30 // ----------------------------------------------------------------------------- 29 // -----------------------------------------------------------------------------
31 // Full code generator. 30 // Full code generator.
32 31
33 class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> { 32 class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> {
34 public: 33 public:
35 FullCodeGenerator(MacroAssembler* masm, CompilationInfo* info, 34 FullCodeGenerator(MacroAssembler* masm, CompilationInfo* info,
36 uintptr_t stack_limit, LazyCompilationMode mode); 35 uintptr_t stack_limit);
37 36
38 void Initialize(uintptr_t stack_limit); 37 void Initialize(uintptr_t stack_limit);
39 38
40 static CompilationJob* NewCompilationJob(CompilationInfo* info, 39 static CompilationJob* NewCompilationJob(CompilationInfo* info);
41 LazyCompilationMode mode);
42 40
43 static bool MakeCode(CompilationInfo* info, uintptr_t stack_limit, 41 static bool MakeCode(CompilationInfo* info, uintptr_t stack_limit);
44 LazyCompilationMode mode);
45 static bool MakeCode(CompilationInfo* info); 42 static bool MakeCode(CompilationInfo* info);
46 43
47 // Encode bailout state and pc-offset as a BitField<type, start, size>. 44 // Encode bailout state and pc-offset as a BitField<type, start, size>.
48 // Only use 30 bits because we encode the result as a smi. 45 // Only use 30 bits because we encode the result as a smi.
49 class BailoutStateField : public BitField<Deoptimizer::BailoutState, 0, 1> {}; 46 class BailoutStateField : public BitField<Deoptimizer::BailoutState, 0, 1> {};
50 class PcField : public BitField<unsigned, 1, 30 - 1> {}; 47 class PcField : public BitField<unsigned, 1, 30 - 1> {};
51 48
52 static const int kMaxBackEdgeWeight = 127; 49 static const int kMaxBackEdgeWeight = 127;
53 50
54 // Platform-specific code size multiplier. 51 // Platform-specific code size multiplier.
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 792
796 FullCodeGenerator* codegen_; 793 FullCodeGenerator* codegen_;
797 Scope* saved_scope_; 794 Scope* saved_scope_;
798 BailoutId exit_id_; 795 BailoutId exit_id_;
799 bool needs_block_context_; 796 bool needs_block_context_;
800 }; 797 };
801 798
802 MacroAssembler* masm_; 799 MacroAssembler* masm_;
803 CompilationInfo* info_; 800 CompilationInfo* info_;
804 Isolate* isolate_; 801 Isolate* isolate_;
805 LazyCompilationMode compilation_mode_;
806 Zone* zone_; 802 Zone* zone_;
807 Scope* scope_; 803 Scope* scope_;
808 Label return_label_; 804 Label return_label_;
809 NestedStatement* nesting_stack_; 805 NestedStatement* nesting_stack_;
810 int loop_depth_; 806 int loop_depth_;
811 int operand_stack_depth_; 807 int operand_stack_depth_;
812 ZoneList<Handle<Object> >* globals_; 808 ZoneList<Handle<Object> >* globals_;
813 const ExpressionContext* context_; 809 const ExpressionContext* context_;
814 ZoneList<BailoutEntry> bailout_entries_; 810 ZoneList<BailoutEntry> bailout_entries_;
815 ZoneList<BackEdgeEntry> back_edges_; 811 ZoneList<BackEdgeEntry> back_edges_;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 Address start_; 889 Address start_;
894 Address instruction_start_; 890 Address instruction_start_;
895 uint32_t length_; 891 uint32_t length_;
896 }; 892 };
897 893
898 894
899 } // namespace internal 895 } // namespace internal
900 } // namespace v8 896 } // namespace v8
901 897
902 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_ 898 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698