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

Unified Diff: src/ia32/lithium-ia32.cc

Issue 893073006: Add map-based read barrier to WeakCell Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix merge Created 5 years, 10 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/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/lithium-ia32.cc
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
index 1c8d075dcb8713e8ff40ccc3cf3de3bf8b8d6d77..6be247bef781ca63b6903467f1b40e1197bdf666 100644
--- a/src/ia32/lithium-ia32.cc
+++ b/src/ia32/lithium-ia32.cc
@@ -2193,10 +2193,17 @@ LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) {
LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
- LOperand* obj = (instr->access().IsExternalMemory() &&
- instr->access().offset() == 0)
- ? UseRegisterOrConstantAtStart(instr->object())
- : UseRegisterAtStart(instr->object());
+ LOperand* obj;
+ if (instr->access().read_barrier()) {
+ DCHECK(!instr->access().IsExternalMemory());
+ obj = UseRegister(instr->object());
+ } else {
+ // With no read barrier we can have the same register for the object and
+ // the field.
+ obj = (instr->access().IsExternalMemory() && instr->access().offset() == 0)
+ ? UseRegisterOrConstantAtStart(instr->object())
+ : UseRegisterAtStart(instr->object());
+ }
return DefineAsRegister(new(zone()) LLoadNamedField(obj));
}
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698