| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1340 } | 1340 } |
| 1341 | 1341 |
| 1342 HValue* argument() { return OperandAt(0); } | 1342 HValue* argument() { return OperandAt(0); } |
| 1343 | 1343 |
| 1344 DECLARE_CONCRETE_INSTRUCTION(PushArgument) | 1344 DECLARE_CONCRETE_INSTRUCTION(PushArgument) |
| 1345 }; | 1345 }; |
| 1346 | 1346 |
| 1347 | 1347 |
| 1348 class HThisFunction: public HTemplateInstruction<0> { | 1348 class HThisFunction: public HTemplateInstruction<0> { |
| 1349 public: | 1349 public: |
| 1350 HThisFunction() { | 1350 explicit HThisFunction(Handle<JSFunction> closure) : closure_(closure) { |
| 1351 set_representation(Representation::Tagged()); | 1351 set_representation(Representation::Tagged()); |
| 1352 SetFlag(kUseGVN); | 1352 SetFlag(kUseGVN); |
| 1353 } | 1353 } |
| 1354 | 1354 |
| 1355 virtual Representation RequiredInputRepresentation(int index) { | 1355 virtual Representation RequiredInputRepresentation(int index) { |
| 1356 return Representation::None(); | 1356 return Representation::None(); |
| 1357 } | 1357 } |
| 1358 | 1358 |
| 1359 Handle<JSFunction> closure() const { return closure_; } |
| 1360 |
| 1359 DECLARE_CONCRETE_INSTRUCTION(ThisFunction) | 1361 DECLARE_CONCRETE_INSTRUCTION(ThisFunction) |
| 1360 | 1362 |
| 1361 protected: | 1363 protected: |
| 1362 virtual bool DataEquals(HValue* other) { return true; } | 1364 virtual bool DataEquals(HValue* other) { |
| 1365 HThisFunction* b = HThisFunction::cast(other); |
| 1366 return *closure() == *b->closure(); |
| 1367 } |
| 1368 |
| 1369 private: |
| 1370 Handle<JSFunction> closure_; |
| 1363 }; | 1371 }; |
| 1364 | 1372 |
| 1365 | 1373 |
| 1366 class HContext: public HTemplateInstruction<0> { | 1374 class HContext: public HTemplateInstruction<0> { |
| 1367 public: | 1375 public: |
| 1368 HContext() { | 1376 HContext() { |
| 1369 set_representation(Representation::Tagged()); | 1377 set_representation(Representation::Tagged()); |
| 1370 SetFlag(kUseGVN); | 1378 SetFlag(kUseGVN); |
| 1371 } | 1379 } |
| 1372 | 1380 |
| (...skipping 2875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4248 | 4256 |
| 4249 DECLARE_CONCRETE_INSTRUCTION(In) | 4257 DECLARE_CONCRETE_INSTRUCTION(In) |
| 4250 }; | 4258 }; |
| 4251 | 4259 |
| 4252 #undef DECLARE_INSTRUCTION | 4260 #undef DECLARE_INSTRUCTION |
| 4253 #undef DECLARE_CONCRETE_INSTRUCTION | 4261 #undef DECLARE_CONCRETE_INSTRUCTION |
| 4254 | 4262 |
| 4255 } } // namespace v8::internal | 4263 } } // namespace v8::internal |
| 4256 | 4264 |
| 4257 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4265 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |