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

Side by Side Diff: src/hydrogen.h

Issue 14365014: Switch elements access to use IfBuilder instead of CheckBuilder. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Daniel Clifford. Created 7 years, 8 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/hydrogen.cc » ('j') | 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 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 return compare; 1060 return compare;
1061 } 1061 }
1062 1062
1063 template<class Condition, class P2> 1063 template<class Condition, class P2>
1064 HInstruction* If(HValue* p1, P2 p2) { 1064 HInstruction* If(HValue* p1, P2 p2) {
1065 HControlInstruction* compare = new(zone()) Condition(p1, p2); 1065 HControlInstruction* compare = new(zone()) Condition(p1, p2);
1066 AddCompare(compare); 1066 AddCompare(compare);
1067 return compare; 1067 return compare;
1068 } 1068 }
1069 1069
1070 template<class Condition>
1071 HInstruction* OrIfCompare( 1070 HInstruction* OrIfCompare(
1072 HValue* p1, 1071 HValue* p1,
1073 HValue* p2, 1072 HValue* p2,
1074 Token::Value token, 1073 Token::Value token,
1075 Representation input_representation = Representation::Integer32()) { 1074 Representation input_representation = Representation::Integer32()) {
1076 Or(); 1075 Or();
1077 return IfCompare(p1, p2, token, input_representation); 1076 return IfCompare(p1, p2, token, input_representation);
1078 } 1077 }
1079 1078
1080 HInstruction* OrIfCompareMap(HValue* left, Handle<Map> map) { 1079 HInstruction* OrIfCompareMap(HValue* left, Handle<Map> map) {
1081 Or(); 1080 Or();
1082 return IfCompareMap(left, map); 1081 return IfCompareMap(left, map);
1083 } 1082 }
1084 1083
1085 template<class Condition> 1084 template<class Condition>
1086 HInstruction* OrIf(HValue *p) { 1085 HInstruction* OrIf(HValue *p) {
1087 Or(); 1086 Or();
1088 return If<Condition>(p); 1087 return If<Condition>(p);
1089 } 1088 }
1090 1089
1091 template<class Condition, class P2> 1090 template<class Condition, class P2>
1092 HInstruction* OrIf(HValue* p1, P2 p2) { 1091 HInstruction* OrIf(HValue* p1, P2 p2) {
1093 Or(); 1092 Or();
1094 return If<Condition>(p1, p2); 1093 return If<Condition>(p1, p2);
1095 } 1094 }
1096 1095
1097 template<class Condition>
1098 HInstruction* AndIfCompare( 1096 HInstruction* AndIfCompare(
1099 HValue* p1, 1097 HValue* p1,
1100 HValue* p2, 1098 HValue* p2,
1101 Token::Value token, 1099 Token::Value token,
1102 Representation input_representation = Representation::Integer32()) { 1100 Representation input_representation = Representation::Integer32()) {
1103 And(); 1101 And();
1104 return IfCompare(p1, p2, token, input_representation); 1102 return IfCompare(p1, p2, token, input_representation);
1105 } 1103 }
1106 1104
1107 HInstruction* AndIfCompareMap(HValue* left, Handle<Map> map) { 1105 HInstruction* AndIfCompareMap(HValue* left, Handle<Map> map) {
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
1938 EmbeddedVector<char, 64> filename_; 1936 EmbeddedVector<char, 64> filename_;
1939 HeapStringAllocator string_allocator_; 1937 HeapStringAllocator string_allocator_;
1940 StringStream trace_; 1938 StringStream trace_;
1941 int indent_; 1939 int indent_;
1942 }; 1940 };
1943 1941
1944 1942
1945 } } // namespace v8::internal 1943 } } // namespace v8::internal
1946 1944
1947 #endif // V8_HYDROGEN_H_ 1945 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698