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

Unified Diff: src/hydrogen-instructions.h

Issue 6094020: Simplify CheckPrototypeMaps. (Closed)
Patch Set: Update ARM lithium Created 9 years, 11 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/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 f7eb17344ad714bfc233cc8ce72cf08025583482..8a95cd78b0ace4e50be0bef6f3bbbce504b12860 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -92,6 +92,7 @@ class LChunkBuilder;
// HCallNew
// HCallRuntime
// HCallStub
+// HCheckPrototypeMaps
// HConstant
// HControlInstruction
// HDeoptimize
@@ -125,7 +126,6 @@ class LChunkBuilder;
// HCheckInstanceType
// HCheckMap
// HCheckNonSmi
-// HCheckPrototypeMaps
// HCheckSmi
// HDeleteProperty
// HFixedArrayLength
@@ -1622,42 +1622,40 @@ class HCheckNonSmi: public HUnaryOperation {
};
-class HCheckPrototypeMaps: public HUnaryOperation {
+class HCheckPrototypeMaps: public HInstruction {
public:
- HCheckPrototypeMaps(HValue* value,
- Handle<JSObject> holder,
- Handle<Map> receiver_map)
- : HUnaryOperation(value),
- holder_(holder),
- receiver_map_(receiver_map) {
- set_representation(Representation::Tagged());
+ HCheckPrototypeMaps(Handle<JSObject> prototype, Handle<JSObject> holder)
+ : prototype_(prototype), holder_(holder) {
SetFlag(kUseGVN);
SetFlag(kDependsOnMaps);
}
- virtual Representation RequiredInputRepresentation(int index) const {
- return Representation::Tagged();
- }
-
#ifdef DEBUG
virtual void Verify() const;
#endif
+ Handle<JSObject> prototype() const { return prototype_; }
Handle<JSObject> holder() const { return holder_; }
- Handle<Map> receiver_map() const { return receiver_map_; }
DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check_prototype_maps")
+ virtual intptr_t Hashcode() const {
+ ASSERT(!Heap::allow_allocation(false));
fschneider 2011/01/12 22:45:01 I think ASSERT(!Heap::IsAllocationAllowed()); w
+ intptr_t hash = reinterpret_cast<intptr_t>(*prototype());
+ hash = 17 * hash + reinterpret_cast<intptr_t>(*holder());
+ return hash;
+ }
+
protected:
virtual bool DataEquals(HValue* other) const {
HCheckPrototypeMaps* b = HCheckPrototypeMaps::cast(other);
- return holder_.is_identical_to(b->holder()) &&
- receiver_map_.is_identical_to(b->receiver_map());
+ return prototype_.is_identical_to(b->prototype()) &&
+ holder_.is_identical_to(b->holder());
}
private:
+ Handle<JSObject> prototype_;
Handle<JSObject> holder_;
- Handle<Map> receiver_map_;
};
« 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