Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1253 HValue* dependency, | 1253 HValue* dependency, |
| 1254 ElementsKind elements_kind, | 1254 ElementsKind elements_kind, |
| 1255 bool is_store, | 1255 bool is_store, |
| 1256 LoadKeyedHoleMode load_mode, | 1256 LoadKeyedHoleMode load_mode, |
| 1257 KeyedAccessStoreMode store_mode); | 1257 KeyedAccessStoreMode store_mode); |
| 1258 | 1258 |
| 1259 HLoadNamedField* BuildLoadNamedField(HValue* object, HObjectAccess access); | 1259 HLoadNamedField* BuildLoadNamedField(HValue* object, HObjectAccess access); |
| 1260 HInstruction* BuildLoadStringLength(HValue* object, HValue* checked_value); | 1260 HInstruction* BuildLoadStringLength(HValue* object, HValue* checked_value); |
| 1261 HStoreNamedField* AddStoreMapConstant(HValue* object, Handle<Map>); | 1261 HStoreNamedField* AddStoreMapConstant(HValue* object, Handle<Map>); |
| 1262 HLoadNamedField* AddLoadElements(HValue* object); | 1262 HLoadNamedField* AddLoadElements(HValue* object); |
| 1263 | |
| 1264 bool MatchRotateRight(HValue* left, | |
| 1265 HValue* right, | |
| 1266 HValue** operand, | |
| 1267 HValue** shift_amount); | |
| 1268 | |
| 1269 HInstruction* BuildBinaryOperation(Token::Value op, | |
| 1270 HValue* left, | |
| 1271 HValue* right, | |
| 1272 Handle<Type> left_type, | |
| 1273 Handle<Type> right_type, | |
| 1274 Handle<Type> result_type, | |
| 1275 Maybe<int> fixed_right_arg, | |
| 1276 HValue* context); | |
| 1277 | |
| 1263 HLoadNamedField* AddLoadFixedArrayLength(HValue *object); | 1278 HLoadNamedField* AddLoadFixedArrayLength(HValue *object); |
| 1264 | 1279 |
| 1265 HValue* AddLoadJSBuiltin(Builtins::JavaScript builtin); | 1280 HValue* AddLoadJSBuiltin(Builtins::JavaScript builtin); |
| 1266 | 1281 |
| 1282 HValue* EnforceNumberType(HValue* number, Handle<Type> expected); | |
| 1267 HValue* TruncateToNumber(HValue* value, Handle<Type>* expected); | 1283 HValue* TruncateToNumber(HValue* value, Handle<Type>* expected); |
| 1268 | 1284 |
| 1269 void PushAndAdd(HInstruction* instr); | 1285 void PushAndAdd(HInstruction* instr); |
| 1270 | 1286 |
| 1271 void FinishExitWithHardDeoptimization(const char* reason, | 1287 void FinishExitWithHardDeoptimization(const char* reason, |
| 1272 HBasicBlock* continuation); | 1288 HBasicBlock* continuation); |
| 1273 | 1289 |
| 1274 void AddIncrementCounter(StatsCounter* counter); | 1290 void AddIncrementCounter(StatsCounter* counter); |
| 1275 | 1291 |
| 1276 class IfBuilder V8_FINAL { | 1292 class IfBuilder V8_FINAL { |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 1298 return compare; | 1314 return compare; |
| 1299 } | 1315 } |
| 1300 | 1316 |
| 1301 template<class Condition, class P2, class P3> | 1317 template<class Condition, class P2, class P3> |
| 1302 HInstruction* If(HValue* p1, P2 p2, P3 p3) { | 1318 HInstruction* If(HValue* p1, P2 p2, P3 p3) { |
| 1303 HControlInstruction* compare = new(zone()) Condition(p1, p2, p3); | 1319 HControlInstruction* compare = new(zone()) Condition(p1, p2, p3); |
| 1304 AddCompare(compare); | 1320 AddCompare(compare); |
| 1305 return compare; | 1321 return compare; |
| 1306 } | 1322 } |
| 1307 | 1323 |
| 1324 template<class Condition> | |
| 1325 HInstruction* IfNot(HValue* p1) { | |
| 1326 HControlInstruction* compare = new(zone()) Condition(p1); | |
|
Sven Panne
2013/09/16 13:38:09
This template and the following 2 should probably
| |
| 1327 AddCompare(compare); | |
| 1328 HBasicBlock* block0 = compare->SuccessorAt(0); | |
| 1329 HBasicBlock* block1 = compare->SuccessorAt(1); | |
| 1330 compare->SetSuccessorAt(0, block1); | |
| 1331 compare->SetSuccessorAt(1, block0); | |
| 1332 return compare; | |
| 1333 } | |
| 1334 | |
| 1308 template<class Condition, class P2> | 1335 template<class Condition, class P2> |
| 1309 HInstruction* IfNot(HValue* p1, P2 p2) { | 1336 HInstruction* IfNot(HValue* p1, P2 p2) { |
| 1310 HControlInstruction* compare = new(zone()) Condition(p1, p2); | 1337 HControlInstruction* compare = new(zone()) Condition(p1, p2); |
| 1311 AddCompare(compare); | 1338 AddCompare(compare); |
| 1312 HBasicBlock* block0 = compare->SuccessorAt(0); | 1339 HBasicBlock* block0 = compare->SuccessorAt(0); |
| 1313 HBasicBlock* block1 = compare->SuccessorAt(1); | 1340 HBasicBlock* block1 = compare->SuccessorAt(1); |
| 1314 compare->SetSuccessorAt(0, block1); | 1341 compare->SetSuccessorAt(0, block1); |
| 1315 compare->SetSuccessorAt(1, block0); | 1342 compare->SetSuccessorAt(1, block0); |
| 1316 return compare; | 1343 return compare; |
| 1317 } | 1344 } |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2104 ElementsKind kind, | 2131 ElementsKind kind, |
| 2105 HValue* object_elements); | 2132 HValue* object_elements); |
| 2106 | 2133 |
| 2107 void AddCheckPrototypeMaps(Handle<JSObject> holder, | 2134 void AddCheckPrototypeMaps(Handle<JSObject> holder, |
| 2108 Handle<Map> receiver_map); | 2135 Handle<Map> receiver_map); |
| 2109 | 2136 |
| 2110 void AddCheckConstantFunction(Handle<JSObject> holder, | 2137 void AddCheckConstantFunction(Handle<JSObject> holder, |
| 2111 HValue* receiver, | 2138 HValue* receiver, |
| 2112 Handle<Map> receiver_map); | 2139 Handle<Map> receiver_map); |
| 2113 | 2140 |
| 2114 bool MatchRotateRight(HValue* left, | |
| 2115 HValue* right, | |
| 2116 HValue** operand, | |
| 2117 HValue** shift_amount); | |
| 2118 | |
| 2119 // The translation state of the currently-being-translated function. | 2141 // The translation state of the currently-being-translated function. |
| 2120 FunctionState* function_state_; | 2142 FunctionState* function_state_; |
| 2121 | 2143 |
| 2122 // The base of the function state stack. | 2144 // The base of the function state stack. |
| 2123 FunctionState initial_function_state_; | 2145 FunctionState initial_function_state_; |
| 2124 | 2146 |
| 2125 // Expression context of the currently visited subexpression. NULL when | 2147 // Expression context of the currently visited subexpression. NULL when |
| 2126 // visiting statements. | 2148 // visiting statements. |
| 2127 AstContext* ast_context_; | 2149 AstContext* ast_context_; |
| 2128 | 2150 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2300 } | 2322 } |
| 2301 | 2323 |
| 2302 private: | 2324 private: |
| 2303 HGraphBuilder* builder_; | 2325 HGraphBuilder* builder_; |
| 2304 }; | 2326 }; |
| 2305 | 2327 |
| 2306 | 2328 |
| 2307 } } // namespace v8::internal | 2329 } } // namespace v8::internal |
| 2308 | 2330 |
| 2309 #endif // V8_HYDROGEN_H_ | 2331 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |