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

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 2325133002: [interpreter] Fix destroyed new.target register use. (Closed)
Patch Set: Recement. 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 | « no previous file | test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index 89d349ff7238d21859f422e7661bd4de85e6ca34..e1e87546a9c23cf3ad8d798b07e95590f6f2e041 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -3280,6 +3280,13 @@ void BytecodeGenerator::VisitNewTargetVariable(Variable* variable) {
// Store the new target we were called with in the given variable.
builder()->LoadAccumulatorWithRegister(Register::new_target());
VisitVariableAssignment(variable, Token::INIT, FeedbackVectorSlot::Invalid());
+
+ // TODO(mstarzinger): The <new.target> register is not set by the deoptimizer
+ // and we need to make sure {BytecodeRegisterOptimizer} flushes its state
+ // before a local variable containing the <new.target> is used. Using a label
+ // as below flushes the entire pipeline, we should be more specific here.
+ BytecodeLabel flush_state_label;
+ builder()->Bind(&flush_state_label);
}
void BytecodeGenerator::VisitFunctionClosureForContext() {
« no previous file with comments | « no previous file | test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698