| 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 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 Type type_; | 1346 Type type_; |
| 1347 }; | 1347 }; |
| 1348 | 1348 |
| 1349 | 1349 |
| 1350 class HEnterInlined: public HTemplateInstruction<0> { | 1350 class HEnterInlined: public HTemplateInstruction<0> { |
| 1351 public: | 1351 public: |
| 1352 HEnterInlined(Handle<JSFunction> closure, | 1352 HEnterInlined(Handle<JSFunction> closure, |
| 1353 int arguments_count, | 1353 int arguments_count, |
| 1354 FunctionLiteral* function, | 1354 FunctionLiteral* function, |
| 1355 CallKind call_kind, | 1355 CallKind call_kind, |
| 1356 bool is_construct, | 1356 bool is_construct) |
| 1357 Variable* arguments) | |
| 1358 : closure_(closure), | 1357 : closure_(closure), |
| 1359 arguments_count_(arguments_count), | 1358 arguments_count_(arguments_count), |
| 1360 function_(function), | 1359 function_(function), |
| 1361 call_kind_(call_kind), | 1360 call_kind_(call_kind), |
| 1362 is_construct_(is_construct), | 1361 is_construct_(is_construct) { |
| 1363 arguments_(arguments), | |
| 1364 materializes_arguments_(false) { | |
| 1365 } | 1362 } |
| 1366 | 1363 |
| 1367 virtual void PrintDataTo(StringStream* stream); | 1364 virtual void PrintDataTo(StringStream* stream); |
| 1368 | 1365 |
| 1369 Handle<JSFunction> closure() const { return closure_; } | 1366 Handle<JSFunction> closure() const { return closure_; } |
| 1370 int arguments_count() const { return arguments_count_; } | 1367 int arguments_count() const { return arguments_count_; } |
| 1371 FunctionLiteral* function() const { return function_; } | 1368 FunctionLiteral* function() const { return function_; } |
| 1372 CallKind call_kind() const { return call_kind_; } | 1369 CallKind call_kind() const { return call_kind_; } |
| 1373 bool is_construct() const { return is_construct_; } | 1370 bool is_construct() const { return is_construct_; } |
| 1374 | 1371 |
| 1375 virtual Representation RequiredInputRepresentation(int index) { | 1372 virtual Representation RequiredInputRepresentation(int index) { |
| 1376 return Representation::None(); | 1373 return Representation::None(); |
| 1377 } | 1374 } |
| 1378 | 1375 |
| 1379 bool materializes_arguments() { return materializes_arguments_; } | |
| 1380 void set_materializes_arguments(bool materializes_arguments) { | |
| 1381 materializes_arguments_ = materializes_arguments; | |
| 1382 } | |
| 1383 | |
| 1384 Variable* arguments() { return arguments_; } | |
| 1385 | |
| 1386 DECLARE_CONCRETE_INSTRUCTION(EnterInlined) | 1376 DECLARE_CONCRETE_INSTRUCTION(EnterInlined) |
| 1387 | 1377 |
| 1388 private: | 1378 private: |
| 1389 Handle<JSFunction> closure_; | 1379 Handle<JSFunction> closure_; |
| 1390 int arguments_count_; | 1380 int arguments_count_; |
| 1391 FunctionLiteral* function_; | 1381 FunctionLiteral* function_; |
| 1392 CallKind call_kind_; | 1382 CallKind call_kind_; |
| 1393 bool is_construct_; | 1383 bool is_construct_; |
| 1394 Variable* arguments_; | |
| 1395 bool materializes_arguments_; | |
| 1396 }; | 1384 }; |
| 1397 | 1385 |
| 1398 | 1386 |
| 1399 class HLeaveInlined: public HTemplateInstruction<0> { | 1387 class HLeaveInlined: public HTemplateInstruction<0> { |
| 1400 public: | 1388 public: |
| 1401 explicit HLeaveInlined(bool arguments_pushed) | 1389 HLeaveInlined() {} |
| 1402 : arguments_pushed_(arguments_pushed) { } | |
| 1403 | 1390 |
| 1404 virtual Representation RequiredInputRepresentation(int index) { | 1391 virtual Representation RequiredInputRepresentation(int index) { |
| 1405 return Representation::None(); | 1392 return Representation::None(); |
| 1406 } | 1393 } |
| 1407 | 1394 |
| 1408 bool arguments_pushed() { | |
| 1409 return arguments_pushed_; | |
| 1410 } | |
| 1411 | |
| 1412 DECLARE_CONCRETE_INSTRUCTION(LeaveInlined) | 1395 DECLARE_CONCRETE_INSTRUCTION(LeaveInlined) |
| 1413 | |
| 1414 private: | |
| 1415 bool arguments_pushed_; | |
| 1416 }; | 1396 }; |
| 1417 | 1397 |
| 1418 | 1398 |
| 1419 class HPushArgument: public HUnaryOperation { | 1399 class HPushArgument: public HUnaryOperation { |
| 1420 public: | 1400 public: |
| 1421 explicit HPushArgument(HValue* value) : HUnaryOperation(value) { | 1401 explicit HPushArgument(HValue* value) : HUnaryOperation(value) { |
| 1422 set_representation(Representation::Tagged()); | 1402 set_representation(Representation::Tagged()); |
| 1423 } | 1403 } |
| 1424 | 1404 |
| 1425 virtual Representation RequiredInputRepresentation(int index) { | 1405 virtual Representation RequiredInputRepresentation(int index) { |
| (...skipping 3415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4841 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); | 4821 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); |
| 4842 }; | 4822 }; |
| 4843 | 4823 |
| 4844 | 4824 |
| 4845 #undef DECLARE_INSTRUCTION | 4825 #undef DECLARE_INSTRUCTION |
| 4846 #undef DECLARE_CONCRETE_INSTRUCTION | 4826 #undef DECLARE_CONCRETE_INSTRUCTION |
| 4847 | 4827 |
| 4848 } } // namespace v8::internal | 4828 } } // namespace v8::internal |
| 4849 | 4829 |
| 4850 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4830 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |