| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 V(FixedArrayBaseLength) \ | 107 V(FixedArrayBaseLength) \ |
| 108 V(ForceRepresentation) \ | 108 V(ForceRepresentation) \ |
| 109 V(FunctionLiteral) \ | 109 V(FunctionLiteral) \ |
| 110 V(GetCachedArrayIndex) \ | 110 V(GetCachedArrayIndex) \ |
| 111 V(GlobalObject) \ | 111 V(GlobalObject) \ |
| 112 V(GlobalReceiver) \ | 112 V(GlobalReceiver) \ |
| 113 V(Goto) \ | 113 V(Goto) \ |
| 114 V(HasCachedArrayIndexAndBranch) \ | 114 V(HasCachedArrayIndexAndBranch) \ |
| 115 V(HasInstanceTypeAndBranch) \ | 115 V(HasInstanceTypeAndBranch) \ |
| 116 V(In) \ | 116 V(In) \ |
| 117 V(InlinedContext) \ |
| 117 V(InstanceOf) \ | 118 V(InstanceOf) \ |
| 118 V(InstanceOfKnownGlobal) \ | 119 V(InstanceOfKnownGlobal) \ |
| 119 V(InvokeFunction) \ | 120 V(InvokeFunction) \ |
| 120 V(IsConstructCallAndBranch) \ | 121 V(IsConstructCallAndBranch) \ |
| 121 V(IsNullAndBranch) \ | 122 V(IsNullAndBranch) \ |
| 122 V(IsObjectAndBranch) \ | 123 V(IsObjectAndBranch) \ |
| 123 V(IsSmiAndBranch) \ | 124 V(IsSmiAndBranch) \ |
| 124 V(IsUndetectableAndBranch) \ | 125 V(IsUndetectableAndBranch) \ |
| 125 V(JSArrayLength) \ | 126 V(JSArrayLength) \ |
| 126 V(LeaveInlined) \ | 127 V(LeaveInlined) \ |
| (...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1287 | 1288 |
| 1288 private: | 1289 private: |
| 1289 Type type_; | 1290 Type type_; |
| 1290 }; | 1291 }; |
| 1291 | 1292 |
| 1292 | 1293 |
| 1293 class HEnterInlined: public HTemplateInstruction<0> { | 1294 class HEnterInlined: public HTemplateInstruction<0> { |
| 1294 public: | 1295 public: |
| 1295 HEnterInlined(Handle<JSFunction> closure, | 1296 HEnterInlined(Handle<JSFunction> closure, |
| 1296 FunctionLiteral* function, | 1297 FunctionLiteral* function, |
| 1297 CallKind call_kind) | 1298 CallKind call_kind, |
| 1299 bool context_changed) |
| 1298 : closure_(closure), | 1300 : closure_(closure), |
| 1299 function_(function), | 1301 function_(function), |
| 1300 call_kind_(call_kind) { | 1302 call_kind_(call_kind), |
| 1301 } | 1303 context_changed_(context_changed) {} |
| 1302 | 1304 |
| 1303 virtual void PrintDataTo(StringStream* stream); | 1305 virtual void PrintDataTo(StringStream* stream); |
| 1304 | 1306 |
| 1305 Handle<JSFunction> closure() const { return closure_; } | 1307 Handle<JSFunction> closure() const { return closure_; } |
| 1306 FunctionLiteral* function() const { return function_; } | 1308 FunctionLiteral* function() const { return function_; } |
| 1307 CallKind call_kind() const { return call_kind_; } | 1309 CallKind call_kind() const { return call_kind_; } |
| 1310 bool context_changed() const { return context_changed_; } |
| 1308 | 1311 |
| 1309 virtual Representation RequiredInputRepresentation(int index) const { | 1312 virtual Representation RequiredInputRepresentation(int index) const { |
| 1310 return Representation::None(); | 1313 return Representation::None(); |
| 1311 } | 1314 } |
| 1312 | 1315 |
| 1313 DECLARE_CONCRETE_INSTRUCTION(EnterInlined) | 1316 DECLARE_CONCRETE_INSTRUCTION(EnterInlined) |
| 1314 | 1317 |
| 1315 private: | 1318 private: |
| 1316 Handle<JSFunction> closure_; | 1319 Handle<JSFunction> closure_; |
| 1317 FunctionLiteral* function_; | 1320 FunctionLiteral* function_; |
| 1318 CallKind call_kind_; | 1321 CallKind call_kind_; |
| 1322 bool context_changed_; |
| 1319 }; | 1323 }; |
| 1320 | 1324 |
| 1321 | 1325 |
| 1322 class HLeaveInlined: public HTemplateInstruction<0> { | 1326 class HLeaveInlined: public HTemplateInstruction<0> { |
| 1323 public: | 1327 public: |
| 1324 HLeaveInlined() {} | 1328 HLeaveInlined() {} |
| 1325 | 1329 |
| 1326 virtual Representation RequiredInputRepresentation(int index) const { | 1330 virtual Representation RequiredInputRepresentation(int index) const { |
| 1327 return Representation::None(); | 1331 return Representation::None(); |
| 1328 } | 1332 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1376 return Representation::None(); | 1380 return Representation::None(); |
| 1377 } | 1381 } |
| 1378 | 1382 |
| 1379 DECLARE_CONCRETE_INSTRUCTION(Context) | 1383 DECLARE_CONCRETE_INSTRUCTION(Context) |
| 1380 | 1384 |
| 1381 protected: | 1385 protected: |
| 1382 virtual bool DataEquals(HValue* other) { return true; } | 1386 virtual bool DataEquals(HValue* other) { return true; } |
| 1383 }; | 1387 }; |
| 1384 | 1388 |
| 1385 | 1389 |
| 1390 class HInlinedContext: public HTemplateInstruction<0> { |
| 1391 public: |
| 1392 explicit HInlinedContext(Handle<JSFunction> closure) |
| 1393 : closure_(closure) { |
| 1394 set_representation(Representation::Tagged()); |
| 1395 SetFlag(kUseGVN); |
| 1396 } |
| 1397 |
| 1398 Handle<JSFunction> closure() const { return closure_; } |
| 1399 |
| 1400 virtual Representation RequiredInputRepresentation(int index) const { |
| 1401 return Representation::None(); |
| 1402 } |
| 1403 |
| 1404 DECLARE_CONCRETE_INSTRUCTION(InlinedContext); |
| 1405 |
| 1406 protected: |
| 1407 virtual bool DataEquals(HValue* other) { return false; } // Or check context. |
| 1408 |
| 1409 private: |
| 1410 Handle<JSFunction> closure_; |
| 1411 }; |
| 1412 |
| 1413 |
| 1386 class HOuterContext: public HUnaryOperation { | 1414 class HOuterContext: public HUnaryOperation { |
| 1387 public: | 1415 public: |
| 1388 explicit HOuterContext(HValue* inner) : HUnaryOperation(inner) { | 1416 explicit HOuterContext(HValue* inner) : HUnaryOperation(inner) { |
| 1389 set_representation(Representation::Tagged()); | 1417 set_representation(Representation::Tagged()); |
| 1390 SetFlag(kUseGVN); | 1418 SetFlag(kUseGVN); |
| 1391 } | 1419 } |
| 1392 | 1420 |
| 1393 DECLARE_CONCRETE_INSTRUCTION(OuterContext); | 1421 DECLARE_CONCRETE_INSTRUCTION(OuterContext); |
| 1394 | 1422 |
| 1395 virtual Representation RequiredInputRepresentation(int index) const { | 1423 virtual Representation RequiredInputRepresentation(int index) const { |
| (...skipping 2805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4201 | 4229 |
| 4202 DECLARE_CONCRETE_INSTRUCTION(In) | 4230 DECLARE_CONCRETE_INSTRUCTION(In) |
| 4203 }; | 4231 }; |
| 4204 | 4232 |
| 4205 #undef DECLARE_INSTRUCTION | 4233 #undef DECLARE_INSTRUCTION |
| 4206 #undef DECLARE_CONCRETE_INSTRUCTION | 4234 #undef DECLARE_CONCRETE_INSTRUCTION |
| 4207 | 4235 |
| 4208 } } // namespace v8::internal | 4236 } } // namespace v8::internal |
| 4209 | 4237 |
| 4210 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4238 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |