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