Commit 062586db authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Hide dangerous RawMachineAssembler accessors.

Having access to the unfinished schedule inside of raw machine assembler
turned out to be dangerous, because it cannot be used without exporting
which in turn computes the RPO of the schedule.

R=vogelheim@chromium.org

Review URL: https://codereview.chromium.org/1475643002

Cr-Commit-Position: refs/heads/master@{#32216}
parent 29f4515d
......@@ -653,11 +653,6 @@ CallDescriptor* InterpreterAssembler::call_descriptor() const {
}
Schedule* InterpreterAssembler::schedule() {
return raw_assembler_->schedule();
}
Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); }
......
......@@ -196,7 +196,6 @@ class InterpreterAssembler {
// Private helpers which delegate to RawMachineAssembler.
Isolate* isolate();
Schedule* schedule();
Zone* zone();
interpreter::Bytecode bytecode_;
......
......@@ -56,15 +56,10 @@ class RawMachineAssembler {
Isolate* isolate() const { return isolate_; }
Graph* graph() const { return graph_; }
Schedule* schedule() { return schedule_; }
Zone* zone() const { return graph()->zone(); }
MachineOperatorBuilder* machine() { return &machine_; }
CommonOperatorBuilder* common() { return &common_; }
CallDescriptor* call_descriptor() const { return call_descriptor_; }
size_t parameter_count() const { return machine_sig()->parameter_count(); }
const MachineSignature* machine_sig() const {
return call_descriptor_->GetMachineSignature();
}
// Finalizes the schedule and exports it to be used for code generation. Note
// that this RawMachineAssembler becomes invalid after export.
......@@ -618,6 +613,12 @@ class RawMachineAssembler {
BasicBlock* EnsureBlock(Label* label);
BasicBlock* CurrentBlock();
Schedule* schedule() { return schedule_; }
size_t parameter_count() const { return machine_sig()->parameter_count(); }
const MachineSignature* machine_sig() const {
return call_descriptor_->GetMachineSignature();
}
Isolate* isolate_;
Graph* graph_;
Schedule* schedule_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment