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

Side by Side Diff: src/hydrogen.h

Issue 16206004: Add smi support to all binops minus shr, sar, shl, div and mod. (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/hydrogen.cc » ('j') | src/hydrogen.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 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 IfBuilder(HGraphBuilder* builder, 1042 IfBuilder(HGraphBuilder* builder,
1043 HIfContinuation* continuation); 1043 HIfContinuation* continuation);
1044 1044
1045 ~IfBuilder() { 1045 ~IfBuilder() {
1046 if (!finished_) End(); 1046 if (!finished_) End();
1047 } 1047 }
1048 1048
1049 HInstruction* IfCompare( 1049 HInstruction* IfCompare(
1050 HValue* left, 1050 HValue* left,
1051 HValue* right, 1051 HValue* right,
1052 Token::Value token, 1052 Token::Value token);
1053 Representation input_representation = Representation::Integer32());
1054 1053
1055 HInstruction* IfCompareMap(HValue* left, Handle<Map> map); 1054 HInstruction* IfCompareMap(HValue* left, Handle<Map> map);
1056 1055
1057 template<class Condition> 1056 template<class Condition>
1058 HInstruction* If(HValue *p) { 1057 HInstruction* If(HValue *p) {
1059 HControlInstruction* compare = new(zone()) Condition(p); 1058 HControlInstruction* compare = new(zone()) Condition(p);
1060 AddCompare(compare); 1059 AddCompare(compare);
1061 return compare; 1060 return compare;
1062 } 1061 }
1063 1062
(...skipping 11 matching lines...) Expand all
1075 HBasicBlock* block0 = compare->SuccessorAt(0); 1074 HBasicBlock* block0 = compare->SuccessorAt(0);
1076 HBasicBlock* block1 = compare->SuccessorAt(1); 1075 HBasicBlock* block1 = compare->SuccessorAt(1);
1077 compare->SetSuccessorAt(0, block1); 1076 compare->SetSuccessorAt(0, block1);
1078 compare->SetSuccessorAt(1, block0); 1077 compare->SetSuccessorAt(1, block0);
1079 return compare; 1078 return compare;
1080 } 1079 }
1081 1080
1082 HInstruction* OrIfCompare( 1081 HInstruction* OrIfCompare(
1083 HValue* p1, 1082 HValue* p1,
1084 HValue* p2, 1083 HValue* p2,
1085 Token::Value token, 1084 Token::Value token) {
1086 Representation input_representation = Representation::Integer32()) {
1087 Or(); 1085 Or();
1088 return IfCompare(p1, p2, token, input_representation); 1086 return IfCompare(p1, p2, token);
1089 } 1087 }
1090 1088
1091 HInstruction* OrIfCompareMap(HValue* left, Handle<Map> map) { 1089 HInstruction* OrIfCompareMap(HValue* left, Handle<Map> map) {
1092 Or(); 1090 Or();
1093 return IfCompareMap(left, map); 1091 return IfCompareMap(left, map);
1094 } 1092 }
1095 1093
1096 template<class Condition> 1094 template<class Condition>
1097 HInstruction* OrIf(HValue *p) { 1095 HInstruction* OrIf(HValue *p) {
1098 Or(); 1096 Or();
1099 return If<Condition>(p); 1097 return If<Condition>(p);
1100 } 1098 }
1101 1099
1102 template<class Condition, class P2> 1100 template<class Condition, class P2>
1103 HInstruction* OrIf(HValue* p1, P2 p2) { 1101 HInstruction* OrIf(HValue* p1, P2 p2) {
1104 Or(); 1102 Or();
1105 return If<Condition>(p1, p2); 1103 return If<Condition>(p1, p2);
1106 } 1104 }
1107 1105
1108 HInstruction* AndIfCompare( 1106 HInstruction* AndIfCompare(
1109 HValue* p1, 1107 HValue* p1,
1110 HValue* p2, 1108 HValue* p2,
1111 Token::Value token, 1109 Token::Value token) {
1112 Representation input_representation = Representation::Integer32()) {
1113 And(); 1110 And();
1114 return IfCompare(p1, p2, token, input_representation); 1111 return IfCompare(p1, p2, token);
1115 } 1112 }
1116 1113
1117 HInstruction* AndIfCompareMap(HValue* left, Handle<Map> map) { 1114 HInstruction* AndIfCompareMap(HValue* left, Handle<Map> map) {
1118 And(); 1115 And();
1119 return IfCompareMap(left, map); 1116 return IfCompareMap(left, map);
1120 } 1117 }
1121 1118
1122 template<class Condition> 1119 template<class Condition>
1123 HInstruction* AndIf(HValue *p) { 1120 HInstruction* AndIf(HValue *p) {
1124 And(); 1121 And();
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
1949 EmbeddedVector<char, 64> filename_; 1946 EmbeddedVector<char, 64> filename_;
1950 HeapStringAllocator string_allocator_; 1947 HeapStringAllocator string_allocator_;
1951 StringStream trace_; 1948 StringStream trace_;
1952 int indent_; 1949 int indent_;
1953 }; 1950 };
1954 1951
1955 1952
1956 } } // namespace v8::internal 1953 } } // namespace v8::internal
1957 1954
1958 #endif // V8_HYDROGEN_H_ 1955 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698