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

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

Issue 15769010: Improve code for integral modulus calculation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | « no previous file | src/ia32/lithium-codegen-ia32.cc » ('j') | src/ia32/lithium-codegen-ia32.cc » ('J')
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 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 } 1028 }
1029 1029
1030 GVNFlagSet ObservableChangesFlags() const { 1030 GVNFlagSet ObservableChangesFlags() const {
1031 GVNFlagSet result = gvn_flags_; 1031 GVNFlagSet result = gvn_flags_;
1032 result.Intersect(AllChangesFlagSet()); 1032 result.Intersect(AllChangesFlagSet());
1033 result.Intersect(AllObservableSideEffectsFlagSet()); 1033 result.Intersect(AllObservableSideEffectsFlagSet());
1034 return result; 1034 return result;
1035 } 1035 }
1036 1036
1037 Range* range() const { return range_; } 1037 Range* range() const { return range_; }
1038 // We should really use the null object pattern here...
1038 bool HasRange() const { return range_ != NULL; } 1039 bool HasRange() const { return range_ != NULL; }
1040 bool CanBeNegative() const { return !HasRange() || range()->CanBeNegative(); }
1041 bool CanBeZero() const { return !HasRange() || range()->CanBeZero(); }
1042 bool RangeCanInclude(int value) const {
1043 return !HasRange() || range()->Includes(value);
1044 }
1039 void AddNewRange(Range* r, Zone* zone); 1045 void AddNewRange(Range* r, Zone* zone);
1040 void RemoveLastAddedRange(); 1046 void RemoveLastAddedRange();
1041 void ComputeInitialRange(Zone* zone); 1047 void ComputeInitialRange(Zone* zone);
1042 1048
1043 // Representation helpers. 1049 // Representation helpers.
1044 virtual Representation observed_input_representation(int index) { 1050 virtual Representation observed_input_representation(int index) {
1045 return Representation::None(); 1051 return Representation::None();
1046 } 1052 }
1047 virtual Representation RequiredInputRepresentation(int index) = 0; 1053 virtual Representation RequiredInputRepresentation(int index) = 0;
1048 virtual void InferRepresentation(HInferRepresentation* h_infer); 1054 virtual void InferRepresentation(HInferRepresentation* h_infer);
(...skipping 5509 matching lines...) Expand 10 before | Expand all | Expand 10 after
6558 virtual bool IsDeletable() const { return true; } 6564 virtual bool IsDeletable() const { return true; }
6559 }; 6565 };
6560 6566
6561 6567
6562 #undef DECLARE_INSTRUCTION 6568 #undef DECLARE_INSTRUCTION
6563 #undef DECLARE_CONCRETE_INSTRUCTION 6569 #undef DECLARE_CONCRETE_INSTRUCTION
6564 6570
6565 } } // namespace v8::internal 6571 } } // namespace v8::internal
6566 6572
6567 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6573 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | src/ia32/lithium-codegen-ia32.cc » ('j') | src/ia32/lithium-codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698