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

Unified Diff: src/hydrogen-instructions.h

Issue 8054008: Improve our simple elimination of hole checks. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 3 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/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
===================================================================
--- src/hydrogen-instructions.h (revision 9445)
+++ src/hydrogen-instructions.h (working copy)
@@ -3201,15 +3201,15 @@
class HLoadGlobalCell: public HTemplateInstruction<0> {
public:
- HLoadGlobalCell(Handle<JSGlobalPropertyCell> cell, bool check_hole_value)
- : cell_(cell), check_hole_value_(check_hole_value) {
+ HLoadGlobalCell(Handle<JSGlobalPropertyCell> cell, PropertyDetails details)
+ : cell_(cell), details_(details) {
set_representation(Representation::Tagged());
SetFlag(kUseGVN);
SetFlag(kDependsOnGlobalVars);
}
Handle<JSGlobalPropertyCell> cell() const { return cell_; }
- bool check_hole_value() const { return check_hole_value_; }
+ bool RequiresHoleCheck();
virtual void PrintDataTo(StringStream* stream);
@@ -3232,7 +3232,7 @@
private:
Handle<JSGlobalPropertyCell> cell_;
- bool check_hole_value_;
+ PropertyDetails details_;
};
@@ -3273,15 +3273,17 @@
public:
HStoreGlobalCell(HValue* value,
Handle<JSGlobalPropertyCell> cell,
- bool check_hole_value)
+ PropertyDetails details)
: HUnaryOperation(value),
cell_(cell),
- check_hole_value_(check_hole_value) {
+ details_(details) {
SetFlag(kChangesGlobalVars);
}
Handle<JSGlobalPropertyCell> cell() const { return cell_; }
- bool check_hole_value() const { return check_hole_value_; }
+ bool RequiresHoleCheck() {
+ return !details_.IsDontDelete() || details_.IsReadOnly();
+ }
virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged();
@@ -3292,7 +3294,7 @@
private:
Handle<JSGlobalPropertyCell> cell_;
- bool check_hole_value_;
+ PropertyDetails details_;
};
@@ -3543,7 +3545,7 @@
virtual void PrintDataTo(StringStream* stream);
- bool RequiresHoleCheck() const;
+ bool RequiresHoleCheck();
DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement)
@@ -3574,8 +3576,6 @@
virtual void PrintDataTo(StringStream* stream);
- bool RequiresHoleCheck() const;
-
DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement)
protected:
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698