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

Unified Diff: src/x64/builtins-x64.cc

Issue 1647123002: Write barrier for storing a code entry, and usage in CompileLazy builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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
Index: src/x64/builtins-x64.cc
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc
index a4851db55809eee9c48f770233a0c7c5d0d47c9d..db56b0092d926ce9ee1a2ec721ea175851e3b15a 100644
--- a/src/x64/builtins-x64.cc
+++ b/src/x64/builtins-x64.cc
@@ -982,6 +982,8 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
Label install_optimized_code_and_tailcall;
__ bind(&install_optimized_code_and_tailcall);
__ movp(FieldOperand(closure, JSFunction::kCodeEntryOffset), entry);
+ __ movp(rbx, entry);
+ __ RecordWriteCodeEntryField(closure, rbx, rax);
// Link the closure into the optimized function list.
// rcx : code entry (entry)
@@ -1036,6 +1038,8 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
// Yes, install the full code.
__ leap(entry, FieldOperand(entry, Code::kHeaderSize));
__ movp(FieldOperand(closure, JSFunction::kCodeEntryOffset), entry);
+ __ movp(rbx, entry);
+ __ RecordWriteCodeEntryField(closure, rbx, rax);
__ jmp(entry);
__ bind(&gotta_call_runtime);

Powered by Google App Engine
This is Rietveld 408576698