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

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

Issue 2251713002: [Compiler] Add compile to CompilerDispatcherJob. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@offheap_compilerdispatcher
Patch Set: Fix comment Created 4 years, 3 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/crankshaft/hydrogen.h ('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"
(...skipping 11 matching lines...) Expand all
22 namespace internal { 22 namespace internal {
23 23
24 // Forward declarations. 24 // Forward declarations.
25 class JumpPatchSite; 25 class JumpPatchSite;
26 26
27 // ----------------------------------------------------------------------------- 27 // -----------------------------------------------------------------------------
28 // Full code generator. 28 // Full code generator.
29 29
30 class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> { 30 class FullCodeGenerator final : public AstVisitor<FullCodeGenerator> {
31 public: 31 public:
32 FullCodeGenerator(MacroAssembler* masm, CompilationInfo* info) 32 FullCodeGenerator(MacroAssembler* masm, CompilationInfo* info,
33 uintptr_t stack_limit)
33 : masm_(masm), 34 : masm_(masm),
34 info_(info), 35 info_(info),
35 isolate_(info->isolate()), 36 isolate_(info->isolate()),
36 zone_(info->zone()), 37 zone_(info->zone()),
37 scope_(info->scope()), 38 scope_(info->scope()),
38 nesting_stack_(NULL), 39 nesting_stack_(NULL),
39 loop_depth_(0), 40 loop_depth_(0),
40 operand_stack_depth_(0), 41 operand_stack_depth_(0),
41 globals_(NULL), 42 globals_(NULL),
42 context_(NULL), 43 context_(NULL),
43 bailout_entries_(info->HasDeoptimizationSupport() 44 bailout_entries_(info->HasDeoptimizationSupport()
44 ? info->literal()->ast_node_count() 45 ? info->literal()->ast_node_count()
45 : 0, 46 : 0,
46 info->zone()), 47 info->zone()),
47 back_edges_(2, info->zone()), 48 back_edges_(2, info->zone()),
48 handler_table_(info->zone()), 49 handler_table_(info->zone()),
49 source_position_table_builder_(info->zone(), 50 source_position_table_builder_(info->zone(),
50 info->SourcePositionRecordingMode()), 51 info->SourcePositionRecordingMode()),
51 ic_total_count_(0) { 52 ic_total_count_(0) {
52 DCHECK(!info->IsStub()); 53 DCHECK(!info->IsStub());
53 Initialize(); 54 Initialize(stack_limit);
54 } 55 }
55 56
56 void Initialize(); 57 void Initialize(uintptr_t stack_limit);
57 58
58 static bool MakeCode(CompilationInfo* info); 59 static CompilationJob* NewCompilationJob(CompilationInfo* info);
60
61 static bool MakeCode(CompilationInfo* info, uintptr_t stack_limit);
62 static bool MakeCode(CompilationInfo* info) {
63 return MakeCode(info, info->isolate()->stack_guard()->real_climit());
64 }
59 65
60 // Encode bailout state and pc-offset as a BitField<type, start, size>. 66 // Encode bailout state and pc-offset as a BitField<type, start, size>.
61 // Only use 30 bits because we encode the result as a smi. 67 // Only use 30 bits because we encode the result as a smi.
62 class BailoutStateField : public BitField<Deoptimizer::BailoutState, 0, 1> {}; 68 class BailoutStateField : public BitField<Deoptimizer::BailoutState, 0, 1> {};
63 class PcField : public BitField<unsigned, 1, 30 - 1> {}; 69 class PcField : public BitField<unsigned, 1, 30 - 1> {};
64 70
65 static const int kMaxBackEdgeWeight = 127; 71 static const int kMaxBackEdgeWeight = 127;
66 72
67 // Platform-specific code size multiplier. 73 // Platform-specific code size multiplier.
68 #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87 74 #if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X87
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 Address start_; 1044 Address start_;
1039 Address instruction_start_; 1045 Address instruction_start_;
1040 uint32_t length_; 1046 uint32_t length_;
1041 }; 1047 };
1042 1048
1043 1049
1044 } // namespace internal 1050 } // namespace internal
1045 } // namespace v8 1051 } // namespace v8
1046 1052
1047 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_ 1053 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.h ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698