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

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

Issue 8857001: [hydrogen] don't bailout assignments to consts (Closed) Base URL: gh:v8/v8@master
Patch Set: fixed naming, added test Created 9 years 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/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index 2b31f22247156d34b6452e90cd7f3dfaae9f4d7b..ea466469884a7ff819025797ea90e89acc412834 100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -2073,6 +2073,15 @@ void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) {
Register context = ToRegister(instr->context());
Register value = ToRegister(instr->value());
+
+ Label skip_assignment;
+
+ if (instr->RequiresHoleCheck()) {
+ __ Cmp(ContextOperand(context, instr->slot_index()),
+ factory()->the_hole_value());
+ __ j(not_equal, &skip_assignment, Label::kNear);
+ }
+
__ movq(ContextOperand(context, instr->slot_index()), value);
if (instr->hydrogen()->NeedsWriteBarrier()) {
HType type = instr->hydrogen()->value()->type();
@@ -2088,6 +2097,8 @@ void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) {
EMIT_REMEMBERED_SET,
check_needed);
}
+
+ __ bind(&skip_assignment);
}
« src/hydrogen.cc ('K') | « src/mips/lithium-mips.h ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698