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

Unified Diff: src/compiler/code-generator.h

Issue 2229243003: [turbofan] Split CodeGenerator::GenerateCode into AssembleCode and FinishCodeObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/code-generator.cc » ('j') | src/compiler/code-generator.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-generator.h
diff --git a/src/compiler/code-generator.h b/src/compiler/code-generator.h
index ff8e5b9368b65a52ebef8b341f92cd088bbc607d..8e56ea0e18c8d581ce87d8ed205479fcefc5626a 100644
--- a/src/compiler/code-generator.h
+++ b/src/compiler/code-generator.h
@@ -48,17 +48,20 @@ class InstructionOperandIterator {
// Generates native code for a sequence of instructions.
class CodeGenerator final : public GapResolver::Assembler {
public:
- explicit CodeGenerator(Frame* frame, Linkage* linkage,
- InstructionSequence* code, CompilationInfo* info);
+ explicit CodeGenerator(Zone* zone, CompilationInfo* info);
Michael Starzinger 2016/08/11 14:16:26 nit: Doesn't need to be "explicit" with more than
ahaas 2016/08/11 14:54:19 Done.
+ void Initialize(Frame* frame, Linkage* linkage, InstructionSequence* code);
Michael Starzinger 2016/08/11 14:16:26 nit: Can we add a "// Initialize before calling as
ahaas 2016/08/11 14:54:19 Done.
// Generate native code.
Michael Starzinger 2016/08/11 14:16:26 nit: Empty whitespace between declarations for rea
ahaas 2016/08/11 14:54:19 Done.
- Handle<Code> GenerateCode();
+ bool AssembleCode();
+ // Finishes the code object generated in AssembleCode.
Michael Starzinger 2016/08/11 14:16:26 nit: Empty whitespace between declarations for rea
ahaas 2016/08/11 14:54:19 Done.
+ Handle<Code> FinishCodeObject();
InstructionSequence* code() const { return code_; }
FrameAccessState* frame_access_state() const { return frame_access_state_; }
const Frame* frame() const { return frame_access_state_->frame(); }
Isolate* isolate() const { return info_->isolate(); }
Linkage* linkage() const { return linkage_; }
+ bool assemble_code_successful() { return assemble_code_successful_; }
Label* GetLabel(RpoNumber rpo) { return &labels_[rpo.ToSize()]; }
@@ -69,9 +72,6 @@ class CodeGenerator final : public GapResolver::Assembler {
Zone* zone() const { return code()->zone(); }
CompilationInfo* info() const { return info_; }
- // Create the FrameAccessState object. The Frame is immutable from here on.
- void CreateFrameAccessState(Frame* frame);
-
// Architecture - specific frame finalization.
void FinishFrame(Frame* frame);
@@ -257,11 +257,11 @@ class CodeGenerator final : public GapResolver::Assembler {
friend class OutOfLineCode;
FrameAccessState* frame_access_state_;
- Linkage* const linkage_;
- InstructionSequence* const code_;
+ Linkage* linkage_;
+ InstructionSequence* code_;
UnwindingInfoWriter unwinding_info_writer_;
CompilationInfo* const info_;
- Label* const labels_;
+ Label* labels_;
Label return_label_;
RpoNumber current_block_;
SourcePosition current_source_position_;
@@ -279,6 +279,7 @@ class CodeGenerator final : public GapResolver::Assembler {
OutOfLineCode* ools_;
int osr_pc_offset_;
SourcePositionTableBuilder source_position_table_builder_;
+ bool assemble_code_successful_;
};
} // namespace compiler
« no previous file with comments | « no previous file | src/compiler/code-generator.cc » ('j') | src/compiler/code-generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698