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

Side by Side Diff: src/hydrogen-instructions.h

Issue 141653009: Check elimination improvement: propagation of state through phis is supported, CheckMap narrowing i… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review notes applied Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-check-elimination.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2764 matching lines...) Expand 10 before | Expand all | Expand 10 after
2775 HValue *typecheck = NULL); 2775 HValue *typecheck = NULL);
2776 static HCheckMaps* New(Zone* zone, HValue* context, 2776 static HCheckMaps* New(Zone* zone, HValue* context,
2777 HValue* value, SmallMapList* maps, 2777 HValue* value, SmallMapList* maps,
2778 HValue *typecheck = NULL) { 2778 HValue *typecheck = NULL) {
2779 HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck); 2779 HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck);
2780 for (int i = 0; i < maps->length(); i++) { 2780 for (int i = 0; i < maps->length(); i++) {
2781 check_map->Add(maps->at(i), zone); 2781 check_map->Add(maps->at(i), zone);
2782 } 2782 }
2783 return check_map; 2783 return check_map;
2784 } 2784 }
2785 static HCheckMaps* New(Zone* zone, HValue* context,
2786 HValue* value, UniqueSet<Map>* maps,
2787 HValue *typecheck = NULL) {
2788 HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck);
2789 for (int i = 0; i < maps->size(); i++) {
2790 check_map->Add(maps->at(i).handle(), zone);
2791 }
2792 return check_map;
2793 }
2785 2794
2786 bool CanOmitMapChecks() { return omit_; } 2795 bool CanOmitMapChecks() { return omit_; }
2787 2796
2788 virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; } 2797 virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; }
2789 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { 2798 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
2790 return Representation::Tagged(); 2799 return Representation::Tagged();
2791 } 2800 }
2792 virtual void HandleSideEffectDominator(GVNFlag side_effect, 2801 virtual void HandleSideEffectDominator(GVNFlag side_effect,
2793 HValue* dominator) V8_OVERRIDE; 2802 HValue* dominator) V8_OVERRIDE;
2794 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2803 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2795 2804
2796 HValue* value() { return OperandAt(0); } 2805 HValue* value() { return OperandAt(0); }
2806 HValue* typecheck() { return OperandAt(1); }
2797 2807
2798 Unique<Map> first_map() const { return map_set_.at(0); } 2808 Unique<Map> first_map() const { return map_set_.at(0); }
2799 UniqueSet<Map> map_set() const { return map_set_; } 2809 UniqueSet<Map> map_set() const { return map_set_; }
2800 2810
2801 bool has_migration_target() const { 2811 bool has_migration_target() const {
2802 return has_migration_target_; 2812 return has_migration_target_;
2803 } 2813 }
2804 2814
2805 DECLARE_CONCRETE_INSTRUCTION(CheckMaps) 2815 DECLARE_CONCRETE_INSTRUCTION(CheckMaps)
2806 2816
(...skipping 4735 matching lines...) Expand 10 before | Expand all | Expand 10 after
7542 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7552 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7543 }; 7553 };
7544 7554
7545 7555
7546 #undef DECLARE_INSTRUCTION 7556 #undef DECLARE_INSTRUCTION
7547 #undef DECLARE_CONCRETE_INSTRUCTION 7557 #undef DECLARE_CONCRETE_INSTRUCTION
7548 7558
7549 } } // namespace v8::internal 7559 } } // namespace v8::internal
7550 7560
7551 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7561 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen-check-elimination.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698