| 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 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1462 } | 1462 } |
| 1463 | 1463 |
| 1464 HValue* argument() { return OperandAt(0); } | 1464 HValue* argument() { return OperandAt(0); } |
| 1465 | 1465 |
| 1466 DECLARE_CONCRETE_INSTRUCTION(PushArgument) | 1466 DECLARE_CONCRETE_INSTRUCTION(PushArgument) |
| 1467 }; | 1467 }; |
| 1468 | 1468 |
| 1469 | 1469 |
| 1470 class HThisFunction: public HTemplateInstruction<0> { | 1470 class HThisFunction: public HTemplateInstruction<0> { |
| 1471 public: | 1471 public: |
| 1472 explicit HThisFunction(Handle<JSFunction> closure) : closure_(closure) { | 1472 HThisFunction() { |
| 1473 set_representation(Representation::Tagged()); | 1473 set_representation(Representation::Tagged()); |
| 1474 SetFlag(kUseGVN); | 1474 SetFlag(kUseGVN); |
| 1475 } | 1475 } |
| 1476 | 1476 |
| 1477 virtual Representation RequiredInputRepresentation(int index) { | 1477 virtual Representation RequiredInputRepresentation(int index) { |
| 1478 return Representation::None(); | 1478 return Representation::None(); |
| 1479 } | 1479 } |
| 1480 | 1480 |
| 1481 Handle<JSFunction> closure() const { return closure_; } | |
| 1482 | |
| 1483 DECLARE_CONCRETE_INSTRUCTION(ThisFunction) | 1481 DECLARE_CONCRETE_INSTRUCTION(ThisFunction) |
| 1484 | 1482 |
| 1485 protected: | 1483 protected: |
| 1486 virtual bool DataEquals(HValue* other) { | 1484 virtual bool DataEquals(HValue* other) { return true; } |
| 1487 HThisFunction* b = HThisFunction::cast(other); | |
| 1488 return *closure() == *b->closure(); | |
| 1489 } | |
| 1490 | |
| 1491 private: | |
| 1492 Handle<JSFunction> closure_; | |
| 1493 }; | 1485 }; |
| 1494 | 1486 |
| 1495 | 1487 |
| 1496 class HContext: public HTemplateInstruction<0> { | 1488 class HContext: public HTemplateInstruction<0> { |
| 1497 public: | 1489 public: |
| 1498 HContext() { | 1490 HContext() { |
| 1499 set_representation(Representation::Tagged()); | 1491 set_representation(Representation::Tagged()); |
| 1500 SetFlag(kUseGVN); | 1492 SetFlag(kUseGVN); |
| 1501 } | 1493 } |
| 1502 | 1494 |
| (...skipping 3599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5102 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); | 5094 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); |
| 5103 }; | 5095 }; |
| 5104 | 5096 |
| 5105 | 5097 |
| 5106 #undef DECLARE_INSTRUCTION | 5098 #undef DECLARE_INSTRUCTION |
| 5107 #undef DECLARE_CONCRETE_INSTRUCTION | 5099 #undef DECLARE_CONCRETE_INSTRUCTION |
| 5108 | 5100 |
| 5109 } } // namespace v8::internal | 5101 } } // namespace v8::internal |
| 5110 | 5102 |
| 5111 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 5103 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |