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

Unified Diff: src/interpreter/bytecode-array-builder.cc

Issue 2894293003: Save/restore only live registers in the generator suspend/resume. (Closed)
Patch Set: Tweak Created 3 years, 7 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-array-builder.h ('k') | src/interpreter/bytecode-decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.cc
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
index 11b1267172f8d6b780b52afaf19e959d3535d359..e5b86fd26f37d95b4d496fd2ba3ac30abaea5752 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -261,6 +261,15 @@ class OperandHelper<OperandType::kRegOut> {
}
};
+template <>
+class OperandHelper<OperandType::kRegOutList> {
+ public:
+ INLINE(static uint32_t Convert(BytecodeArrayBuilder* builder,
+ RegisterList reg_list)) {
+ return builder->GetOutputRegisterListOperand(reg_list);
+ }
+};
+
template <>
class OperandHelper<OperandType::kRegOutPair> {
public:
@@ -1235,15 +1244,22 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::LoadModuleVariable(int cell_index,
}
BytecodeArrayBuilder& BytecodeArrayBuilder::SuspendGenerator(
- Register generator, SuspendFlags flags) {
- OutputSuspendGenerator(generator,
+ Register generator, RegisterList registers, SuspendFlags flags) {
+ OutputSuspendGenerator(generator, registers, registers.register_count(),
SuspendGeneratorBytecodeFlags::Encode(flags));
return *this;
}
-BytecodeArrayBuilder& BytecodeArrayBuilder::ResumeGenerator(
+BytecodeArrayBuilder& BytecodeArrayBuilder::RestoreGeneratorState(
Register generator) {
- OutputResumeGenerator(generator);
+ OutputRestoreGeneratorState(generator);
+ return *this;
+}
+
+BytecodeArrayBuilder& BytecodeArrayBuilder::RestoreGeneratorRegisters(
+ Register generator, RegisterList registers) {
+ OutputRestoreGeneratorRegisters(generator, registers,
+ registers.register_count());
return *this;
}
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698