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

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

Issue 1214483008: Fix clobbered register when setting this_function variable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed think'o. Created 5 years, 6 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/x64/full-codegen-x64.cc ('k') | test/mjsunit/regress/regress-crbug-498022.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/full-codegen-x87.cc
diff --git a/src/x87/full-codegen-x87.cc b/src/x87/full-codegen-x87.cc
index 4ee27490a9bf03024839ca3bf9794791eb3e83bb..cd49e0aa08d5cd37833da162e08a23ec36beb175 100644
--- a/src/x87/full-codegen-x87.cc
+++ b/src/x87/full-codegen-x87.cc
@@ -236,6 +236,10 @@ void FullCodeGenerator::Generate() {
Variable* this_function_var = scope()->this_function_var();
if (this_function_var != nullptr) {
Comment cmnt(masm_, "[ This function");
+ if (!function_in_register) {
+ __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
+ // The write barrier clobbers register again, keep is marked as such.
+ }
SetVar(this_function_var, edi, ebx, edx);
}
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/mjsunit/regress/regress-crbug-498022.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698