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

Unified Diff: src/ia32/builtins-ia32.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/ia32/builtins-ia32.cc
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc
index a7a88ceeeae02da80c50a589aee3ba63200ea692..b9b67ab05b74331ecc3515806828b252408c761a 100644
--- a/src/ia32/builtins-ia32.cc
+++ b/src/ia32/builtins-ia32.cc
@@ -941,6 +941,8 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
Label install_optimized_code_and_tailcall;
__ bind(&install_optimized_code_and_tailcall);
__ mov(FieldOperand(closure, JSFunction::kCodeEntryOffset), entry);
+ __ mov(ebx, entry);
+ __ RecordWriteCodeEntryField(closure, ebx, eax);
// Link the closure into the optimized function list.
// ecx : code entry
@@ -997,6 +999,8 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
// Yes, install the full code.
__ lea(entry, FieldOperand(entry, Code::kHeaderSize));
__ mov(FieldOperand(closure, JSFunction::kCodeEntryOffset), entry);
+ __ mov(ebx, entry);
+ __ RecordWriteCodeEntryField(closure, ebx, eax);
__ jmp(entry);
__ bind(&gotta_call_runtime);

Powered by Google App Engine
This is Rietveld 408576698