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

Unified Diff: src/hydrogen-instructions.h

Issue 21536003: Migrate instance of deprecated maps in HCheckMaps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | « no previous file | src/hydrogen-instructions.cc » ('j') | src/ia32/lithium-ia32.h » ('J')
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 b9eab45293befcf143e0bfa77abc8f347cc459b9..5c1c12528b61d92201839c6f33b141612e89fd56 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -1086,6 +1086,7 @@ class HValue: public ZoneObject {
virtual HValue* Canonicalize() { return this; }
bool Equals(HValue* other);
+ virtual int CompareOperandCount() { return OperandCount(); }
danno 2013/08/05 10:07:36 See comment below about storing the context explic
Toon Verwaest 2013/08/05 11:32:13 Done.
virtual intptr_t Hashcode();
// Compute unique ids upfront that is safe wrt GC and parallel recompilation.
@@ -2866,7 +2867,7 @@ class HLoadExternalArrayPointer: public HUnaryOperation {
};
-class HCheckMaps: public HTemplateInstruction<2> {
+class HCheckMaps: public HTemplateInstruction<3> {
danno 2013/08/05 10:07:36 It seems to me this class would be much cleaner if
Toon Verwaest 2013/08/05 11:32:13 Done.
public:
static HCheckMaps* New(Zone* zone, HValue* context, HValue* value,
Handle<Map> map, CompilationInfo* info,
@@ -2874,9 +2875,11 @@ class HCheckMaps: public HTemplateInstruction<2> {
static HCheckMaps* New(Zone* zone, HValue* context,
HValue* value, SmallMapList* maps,
HValue *typecheck = NULL) {
- HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck);
+ HCheckMaps* check_map = new(zone) HCheckMaps(
+ context, value, zone, typecheck);
for (int i = 0; i < maps->length(); i++) {
check_map->map_set_.Add(maps->at(i), zone);
+ check_map->has_migration_target_ |= maps->at(i)->is_migration_target();
}
check_map->map_set_.Sort();
return check_map;
@@ -2893,13 +2896,19 @@ class HCheckMaps: public HTemplateInstruction<2> {
virtual void PrintDataTo(StringStream* stream);
HValue* value() { return OperandAt(0); }
+ HValue* context() { return OperandAt(2); }
SmallMapList* map_set() { return &map_set_; }
+ bool has_migration_target() {
+ return has_migration_target_;
+ }
+
virtual void FinalizeUniqueValueId();
DECLARE_CONCRETE_INSTRUCTION(CheckMaps)
protected:
+ virtual int CompareOperandCount() { return OperandCount() - 1; }
virtual bool DataEquals(HValue* other) {
ASSERT_EQ(map_set_.length(), map_unique_ids_.length());
HCheckMaps* b = HCheckMaps::cast(other);
@@ -2917,13 +2926,14 @@ class HCheckMaps: public HTemplateInstruction<2> {
private:
// Clients should use one of the static New* methods above.
- HCheckMaps(HValue* value, Zone *zone, HValue* typecheck)
- : HTemplateInstruction<2>(value->type()),
- omit_(false), map_unique_ids_(0, zone) {
+ HCheckMaps(HValue* context, HValue* value, Zone *zone, HValue* typecheck)
+ : HTemplateInstruction<3>(value->type()),
+ omit_(false), has_migration_target_(false), map_unique_ids_(0, zone) {
SetOperandAt(0, value);
// Use the object value for the dependency if NULL is passed.
// TODO(titzer): do GVN flags already express this dependency?
SetOperandAt(1, typecheck != NULL ? typecheck : value);
+ SetOperandAt(2, context);
set_representation(Representation::Tagged());
SetFlag(kUseGVN);
SetFlag(kTrackSideEffectDominators);
@@ -2941,6 +2951,7 @@ class HCheckMaps: public HTemplateInstruction<2> {
}
bool omit_;
+ bool has_migration_target_;
SmallMapList map_set_;
ZoneList<UniqueValueId> map_unique_ids_;
};
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | src/ia32/lithium-ia32.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698