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

Unified Diff: src/interpreter/bytecode-register-optimizer.h

Issue 2360193003: Revert of [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/bytecode-pipeline.cc ('k') | src/interpreter/bytecode-register-optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-register-optimizer.h
diff --git a/src/interpreter/bytecode-register-optimizer.h b/src/interpreter/bytecode-register-optimizer.h
index e6a439680189eb52c2d60a22b3383c80a4b473be..fb087b527a84b1ed337aaaf532a6ca1e45b4e560 100644
--- a/src/interpreter/bytecode-register-optimizer.h
+++ b/src/interpreter/bytecode-register-optimizer.h
@@ -31,7 +31,7 @@
void BindLabel(BytecodeLabel* label) override;
void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override;
Handle<BytecodeArray> ToBytecodeArray(
- Isolate* isolate, int register_count, int parameter_count,
+ Isolate* isolate, int fixed_register_count, int parameter_count,
Handle<FixedArray> handler_table) override;
private:
@@ -44,25 +44,29 @@
// Helpers for BytecodePipelineStage interface.
void FlushState();
+ void WriteToNextStage(BytecodeNode* node) const;
+ void WriteToNextStage(BytecodeNode* node,
+ const BytecodeSourceInfo& output_info) const;
// Update internal state for register transfer from |input| to
// |output| using |source_info| as source position information if
// any bytecodes are emitted due to transfer.
void RegisterTransfer(RegisterInfo* input, RegisterInfo* output,
- BytecodeSourceInfo* source_info);
+ const BytecodeSourceInfo& source_info);
// Emit a register transfer bytecode from |input| to |output|.
- void OutputRegisterTransfer(RegisterInfo* input, RegisterInfo* output,
- BytecodeSourceInfo* source_info = nullptr);
+ void OutputRegisterTransfer(
+ RegisterInfo* input, RegisterInfo* output,
+ const BytecodeSourceInfo& source_info = BytecodeSourceInfo());
// Emits a Nop to preserve source position information in the
// bytecode pipeline.
- void EmitNopForSourceInfo(BytecodeSourceInfo* source_info) const;
+ void EmitNopForSourceInfo(const BytecodeSourceInfo& source_info) const;
// Handlers for bytecode nodes for register to register transfers.
- void DoLdar(BytecodeNode* node);
- void DoMov(BytecodeNode* node);
- void DoStar(BytecodeNode* node);
+ void DoLdar(const BytecodeNode* const node);
+ void DoMov(const BytecodeNode* const node);
+ void DoStar(const BytecodeNode* const node);
// Operand processing methods for bytecodes other than those
// performing register to register transfers.
@@ -129,7 +133,6 @@
const Register accumulator_;
RegisterInfo* accumulator_info_;
const Register temporary_base_;
- int max_register_index_;
// Direct mapping to register info.
ZoneVector<RegisterInfo*> register_info_table_;
« no previous file with comments | « src/interpreter/bytecode-pipeline.cc ('k') | src/interpreter/bytecode-register-optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698