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

Unified Diff: src/full-codegen/full-codegen.cc

Issue 2207553002: [stubs] Turn FastCloneRegExpStub into a TurboFan code stub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix indexing. 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 | « src/deoptimize-reason.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/full-codegen.cc
diff --git a/src/full-codegen/full-codegen.cc b/src/full-codegen/full-codegen.cc
index a8380330271805e71c4f07f502999cbf05f2e5e0..34ed5e8fac12503c4f4b4f6a2fe9cf5463a7e01a 100644
--- a/src/full-codegen/full-codegen.cc
+++ b/src/full-codegen/full-codegen.cc
@@ -1495,6 +1495,11 @@ void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
__ Move(descriptor.GetRegisterParameter(2), expr->pattern());
__ Move(descriptor.GetRegisterParameter(3), Smi::FromInt(expr->flags()));
__ Call(callable.code(), RelocInfo::CODE_TARGET);
+
+ // Reload the context register after the call as i.e. TurboFan code stubs
+ // won't preserve the context register.
+ LoadFromFrameField(StandardFrameConstants::kContextOffset,
+ context_register());
context()->Plug(result_register());
}
« no previous file with comments | « src/deoptimize-reason.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698