| 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 24 matching lines...) Expand all Loading... |
| 1301 template<class Condition, class P2, class P3> | 1317 template<class Condition, class P2, class P3> |
| 1302 Condition* If(HValue* p1, P2 p2, P3 p3) { | 1318 Condition* If(HValue* p1, P2 p2, P3 p3) { |
| 1303 Condition* compare = builder()->New<Condition>(p1, p2, p3); | 1319 Condition* compare = builder()->New<Condition>(p1, p2, p3); |
| 1304 AddCompare(compare); | 1320 AddCompare(compare); |
| 1305 return compare; | 1321 return compare; |
| 1306 } | 1322 } |
| 1307 | 1323 |
| 1308 template<class Condition> | 1324 template<class Condition> |
| 1309 Condition* IfNot(HValue* p) { | 1325 Condition* IfNot(HValue* p) { |
| 1310 Condition* compare = If<Condition>(p); | 1326 Condition* compare = If<Condition>(p); |
| 1311 HBasicBlock* block0 = compare->SuccessorAt(0); | 1327 compare->Not(); |
| 1312 HBasicBlock* block1 = compare->SuccessorAt(1); | |
| 1313 compare->SetSuccessorAt(0, block1); | |
| 1314 compare->SetSuccessorAt(1, block0); | |
| 1315 return compare; | 1328 return compare; |
| 1316 } | 1329 } |
| 1317 | 1330 |
| 1318 template<class Condition, class P2> | 1331 template<class Condition, class P2> |
| 1319 Condition* IfNot(HValue* p1, P2 p2) { | 1332 Condition* IfNot(HValue* p1, P2 p2) { |
| 1320 Condition* compare = If<Condition>(p1, p2); | 1333 Condition* compare = If<Condition>(p1, p2); |
| 1321 HBasicBlock* block0 = compare->SuccessorAt(0); | 1334 compare->Not(); |
| 1322 HBasicBlock* block1 = compare->SuccessorAt(1); | |
| 1323 compare->SetSuccessorAt(0, block1); | |
| 1324 compare->SetSuccessorAt(1, block0); | |
| 1325 return compare; | 1335 return compare; |
| 1326 } | 1336 } |
| 1327 | 1337 |
| 1328 template<class Condition, class P2, class P3> | 1338 template<class Condition, class P2, class P3> |
| 1329 Condition* IfNot(HValue* p1, P2 p2, P3 p3) { | 1339 Condition* IfNot(HValue* p1, P2 p2, P3 p3) { |
| 1330 Condition* compare = If<Condition>(p1, p2, p3); | 1340 Condition* compare = If<Condition>(p1, p2, p3); |
| 1331 HBasicBlock* block0 = compare->SuccessorAt(0); | 1341 compare->Not(); |
| 1332 HBasicBlock* block1 = compare->SuccessorAt(1); | |
| 1333 compare->SetSuccessorAt(0, block1); | |
| 1334 compare->SetSuccessorAt(1, block0); | |
| 1335 return compare; | 1342 return compare; |
| 1336 } | 1343 } |
| 1337 | 1344 |
| 1338 template<class Condition> | 1345 template<class Condition> |
| 1339 Condition* OrIf(HValue *p) { | 1346 Condition* OrIf(HValue *p) { |
| 1340 Or(); | 1347 Or(); |
| 1341 return If<Condition>(p); | 1348 return If<Condition>(p); |
| 1342 } | 1349 } |
| 1343 | 1350 |
| 1344 template<class Condition, class P2> | 1351 template<class Condition, class P2> |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1382 | 1389 |
| 1383 void Deopt(const char* reason); | 1390 void Deopt(const char* reason); |
| 1384 void ElseDeopt(const char* reason) { | 1391 void ElseDeopt(const char* reason) { |
| 1385 Else(); | 1392 Else(); |
| 1386 Deopt(reason); | 1393 Deopt(reason); |
| 1387 } | 1394 } |
| 1388 | 1395 |
| 1389 void Return(HValue* value); | 1396 void Return(HValue* value); |
| 1390 | 1397 |
| 1391 private: | 1398 private: |
| 1392 void AddCompare(HControlInstruction* compare); | 1399 HControlInstruction* AddCompare(HControlInstruction* compare); |
| 1393 | 1400 |
| 1394 HGraphBuilder* builder() const { return builder_; } | 1401 HGraphBuilder* builder() const { return builder_; } |
| 1395 | 1402 |
| 1396 HGraphBuilder* builder_; | 1403 HGraphBuilder* builder_; |
| 1397 int position_; | 1404 int position_; |
| 1398 bool finished_ : 1; | 1405 bool finished_ : 1; |
| 1399 bool deopt_then_ : 1; | 1406 bool deopt_then_ : 1; |
| 1400 bool deopt_else_ : 1; | 1407 bool deopt_else_ : 1; |
| 1401 bool did_then_ : 1; | 1408 bool did_then_ : 1; |
| 1402 bool did_else_ : 1; | 1409 bool did_else_ : 1; |
| (...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2182 ElementsKind kind, | 2189 ElementsKind kind, |
| 2183 HValue* object_elements); | 2190 HValue* object_elements); |
| 2184 | 2191 |
| 2185 void AddCheckPrototypeMaps(Handle<JSObject> holder, | 2192 void AddCheckPrototypeMaps(Handle<JSObject> holder, |
| 2186 Handle<Map> receiver_map); | 2193 Handle<Map> receiver_map); |
| 2187 | 2194 |
| 2188 void AddCheckConstantFunction(Handle<JSObject> holder, | 2195 void AddCheckConstantFunction(Handle<JSObject> holder, |
| 2189 HValue* receiver, | 2196 HValue* receiver, |
| 2190 Handle<Map> receiver_map); | 2197 Handle<Map> receiver_map); |
| 2191 | 2198 |
| 2192 bool MatchRotateRight(HValue* left, | |
| 2193 HValue* right, | |
| 2194 HValue** operand, | |
| 2195 HValue** shift_amount); | |
| 2196 | |
| 2197 // The translation state of the currently-being-translated function. | 2199 // The translation state of the currently-being-translated function. |
| 2198 FunctionState* function_state_; | 2200 FunctionState* function_state_; |
| 2199 | 2201 |
| 2200 // The base of the function state stack. | 2202 // The base of the function state stack. |
| 2201 FunctionState initial_function_state_; | 2203 FunctionState initial_function_state_; |
| 2202 | 2204 |
| 2203 // Expression context of the currently visited subexpression. NULL when | 2205 // Expression context of the currently visited subexpression. NULL when |
| 2204 // visiting statements. | 2206 // visiting statements. |
| 2205 AstContext* ast_context_; | 2207 AstContext* ast_context_; |
| 2206 | 2208 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2378 } | 2380 } |
| 2379 | 2381 |
| 2380 private: | 2382 private: |
| 2381 HGraphBuilder* builder_; | 2383 HGraphBuilder* builder_; |
| 2382 }; | 2384 }; |
| 2383 | 2385 |
| 2384 | 2386 |
| 2385 } } // namespace v8::internal | 2387 } } // namespace v8::internal |
| 2386 | 2388 |
| 2387 #endif // V8_HYDROGEN_H_ | 2389 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |