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

Unified Diff: src/hydrogen-instructions.h

Issue 8857001: [hydrogen] don't bailout assignments to consts (Closed) Base URL: gh:v8/v8@master
Patch Set: [arm] fixed illegal access errorwq 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
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index c9a4bf062d3a7c3c6b4c79d36d4abe4959c6d8e2..b994a4501f3e6156c8e5d92cacba7991e50fc07a 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -3447,14 +3447,24 @@ class HStoreGlobalGeneric: public HTemplateInstruction<3> {
class HLoadContextSlot: public HUnaryOperation {
public:
+ enum Check {
+ kEmpty,
+ kIsHoleCheck
fschneider 2011/12/12 09:55:56 Please rebase your change. It seems to conflict wi
+ };
+
HLoadContextSlot(HValue* context , int slot_index)
- : HUnaryOperation(context), slot_index_(slot_index) {
+ : HUnaryOperation(context), slot_index_(slot_index), check_(kEmpty) {
set_representation(Representation::Tagged());
SetFlag(kUseGVN);
SetFlag(kDependsOnContextSlots);
}
+ void ForceIsHoleCheck() {
+ check_ = kIsHoleCheck;
+ }
+
int slot_index() const { return slot_index_; }
+ bool RequiresHoleCheck() const { return check_ == kIsHoleCheck; }
virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged();
@@ -3472,21 +3482,32 @@ class HLoadContextSlot: public HUnaryOperation {
private:
int slot_index_;
+ Check check_;
};
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 +3523,7 @@ class HStoreContextSlot: public HTemplateInstruction<2> {
private:
int slot_index_;
+ Check check_;
};
« no previous file with comments | « 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