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

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

Issue 21357003: Stores to external references don't need write barriers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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
« src/ia32/lithium-ia32.cc ('K') | « src/ia32/lithium-ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/lithium-x64.cc
diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc
index 4ecb733508ebb544099c352acd67045dc2c32d7f..5a199eaa22ebbe5dd28f453c5a42118b70d145e5 100644
--- a/src/x64/lithium-x64.cc
+++ b/src/x64/lithium-x64.cc
@@ -2237,15 +2237,15 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
instr->NeedsWriteBarrierForMap();
LOperand* obj;
- if (needs_write_barrier) {
- obj = is_in_object
- ? UseRegister(instr->object())
- : UseTempRegister(instr->object());
- } else if (is_external_location) {
+ if (is_external_location) {
ASSERT(!is_in_object);
ASSERT(!needs_write_barrier);
ASSERT(!needs_write_barrier_for_map);
obj = UseRegisterOrConstant(instr->object());
+ } else if (needs_write_barrier) {
+ obj = is_in_object
+ ? UseRegister(instr->object())
+ : UseTempRegister(instr->object());
} else {
obj = needs_write_barrier_for_map
? UseRegister(instr->object())
« src/ia32/lithium-ia32.cc ('K') | « src/ia32/lithium-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698