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

Unified Diff: src/hydrogen-instructions.h

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/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index c9a4bf062d3a7c3c6b4c79d36d4abe4959c6d8e2..0c1b8bb7781e19104c5e846193787b5deb004867 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -3477,16 +3477,26 @@ class HLoadContextSlot: public HUnaryOperation {
class HStoreContextSlot: public HTemplateInstruction<2> {
public:
+ enum Check {
+ kEmpty,
+ kIsHoleCheck
+ };
+
HStoreContextSlot(HValue* context, int slot_index, HValue* value)
- : slot_index_(slot_index) {
+ : slot_index_(slot_index), check_(kEmpty) {
SetOperandAt(0, context);
SetOperandAt(1, value);
SetFlag(kChangesContextSlots);
}
+ void ForceIsHoleCheck() {
+ check_ = kIsHoleCheck;
+ }
+
HValue* context() { return OperandAt(0); }
HValue* value() { return OperandAt(1); }
int slot_index() const { return slot_index_; }
+ bool RequiresHoleCheck() const { return check_ == kIsHoleCheck; }
bool NeedsWriteBarrier() {
return StoringValueNeedsWriteBarrier(value());
@@ -3502,6 +3512,7 @@ class HStoreContextSlot: public HTemplateInstruction<2> {
private:
int slot_index_;
+ Check check_;
};
« src/hydrogen.cc ('K') | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698