Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: src/x64/lithium-x64.h

Issue 50863002: Use register allocator for context on x64. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: added comment to test case Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 465
466 class LParameter V8_FINAL : public LTemplateInstruction<1, 0, 0> { 466 class LParameter V8_FINAL : public LTemplateInstruction<1, 0, 0> {
467 public: 467 public:
468 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { 468 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
469 return false; 469 return false;
470 } 470 }
471 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") 471 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
472 }; 472 };
473 473
474 474
475 class LCallStub V8_FINAL : public LTemplateInstruction<1, 0, 0> { 475 class LCallStub V8_FINAL : public LTemplateInstruction<1, 1, 0> {
476 public: 476 public:
477 explicit LCallStub(LOperand* context) {
478 inputs_[0] = context;
479 }
480
481 LOperand* context() { return inputs_[0]; }
482
477 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") 483 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub")
478 DECLARE_HYDROGEN_ACCESSOR(CallStub) 484 DECLARE_HYDROGEN_ACCESSOR(CallStub)
479 485
480 TranscendentalCache::Type transcendental_type() { 486 TranscendentalCache::Type transcendental_type() {
481 return hydrogen()->transcendental_type(); 487 return hydrogen()->transcendental_type();
482 } 488 }
483 }; 489 };
484 490
485 491
486 class LUnknownOSRValue V8_FINAL : public LTemplateInstruction<1, 0, 0> { 492 class LUnknownOSRValue V8_FINAL : public LTemplateInstruction<1, 0, 0> {
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 inputs_[0] = value; 726 inputs_[0] = value;
721 } 727 }
722 728
723 LOperand* value() { return inputs_[0]; } 729 LOperand* value() { return inputs_[0]; }
724 730
725 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round") 731 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round")
726 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 732 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
727 }; 733 };
728 734
729 735
730 class LMathAbs V8_FINAL : public LTemplateInstruction<1, 1, 0> { 736 class LMathAbs V8_FINAL : public LTemplateInstruction<1, 2, 0> {
731 public: 737 public:
732 explicit LMathAbs(LOperand* value) { 738 explicit LMathAbs(LOperand* context, LOperand* value) {
739 inputs_[1] = context;
733 inputs_[0] = value; 740 inputs_[0] = value;
734 } 741 }
735 742
743 LOperand* context() { return inputs_[1]; }
736 LOperand* value() { return inputs_[0]; } 744 LOperand* value() { return inputs_[0]; }
737 745
738 DECLARE_CONCRETE_INSTRUCTION(MathAbs, "math-abs") 746 DECLARE_CONCRETE_INSTRUCTION(MathAbs, "math-abs")
739 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 747 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
740 }; 748 };
741 749
742 750
743 class LMathLog V8_FINAL : public LTemplateInstruction<1, 1, 0> { 751 class LMathLog V8_FINAL : public LTemplateInstruction<1, 1, 0> {
744 public: 752 public:
745 explicit LMathLog(LOperand* value) { 753 explicit LMathLog(LOperand* value) {
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 LOperand* temp() { return temps_[0]; } 922 LOperand* temp() { return temps_[0]; }
915 923
916 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, 924 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch,
917 "is-undetectable-and-branch") 925 "is-undetectable-and-branch")
918 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) 926 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
919 927
920 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 928 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
921 }; 929 };
922 930
923 931
924 class LStringCompareAndBranch V8_FINAL : public LControlInstruction<2, 0> { 932 class LStringCompareAndBranch V8_FINAL : public LControlInstruction<3, 0> {
925 public: 933 public:
926 explicit LStringCompareAndBranch(LOperand* left, LOperand* right) { 934 explicit LStringCompareAndBranch(LOperand* context,
927 inputs_[0] = left; 935 LOperand* left,
928 inputs_[1] = right; 936 LOperand* right) {
937 inputs_[0] = context;
938 inputs_[1] = left;
939 inputs_[2] = right;
929 } 940 }
930 941
931 LOperand* left() { return inputs_[0]; } 942 LOperand* context() { return inputs_[0]; }
932 LOperand* right() { return inputs_[1]; } 943 LOperand* left() { return inputs_[1]; }
944 LOperand* right() { return inputs_[2]; }
933 945
934 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, 946 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch,
935 "string-compare-and-branch") 947 "string-compare-and-branch")
936 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) 948 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch)
937 949
938 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 950 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
939 951
940 Token::Value op() const { return hydrogen()->token(); } 952 Token::Value op() const { return hydrogen()->token(); }
941 }; 953 };
942 954
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 LOperand* temp2() { return temps_[1]; } 1012 LOperand* temp2() { return temps_[1]; }
1001 1013
1002 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, 1014 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch,
1003 "class-of-test-and-branch") 1015 "class-of-test-and-branch")
1004 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) 1016 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
1005 1017
1006 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1018 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1007 }; 1019 };
1008 1020
1009 1021
1010 class LCmpT V8_FINAL : public LTemplateInstruction<1, 2, 0> { 1022 class LCmpT V8_FINAL : public LTemplateInstruction<1, 3, 0> {
1011 public: 1023 public:
1012 LCmpT(LOperand* left, LOperand* right) { 1024 LCmpT(LOperand* context, LOperand* left, LOperand* right) {
1013 inputs_[0] = left; 1025 inputs_[0] = context;
1014 inputs_[1] = right; 1026 inputs_[1] = left;
1027 inputs_[2] = right;
1015 } 1028 }
1016 1029
1017 LOperand* left() { return inputs_[0]; } 1030 LOperand* context() { return inputs_[0]; }
1018 LOperand* right() { return inputs_[1]; } 1031 LOperand* left() { return inputs_[1]; }
1032 LOperand* right() { return inputs_[2]; }
1019 1033
1020 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") 1034 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t")
1021 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric) 1035 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric)
1022 1036
1023 Token::Value op() const { return hydrogen()->token(); } 1037 Token::Value op() const { return hydrogen()->token(); }
1024 }; 1038 };
1025 1039
1026 1040
1027 class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 2, 0> { 1041 class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 3, 0> {
1028 public: 1042 public:
1029 LInstanceOf(LOperand* left, LOperand* right) { 1043 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) {
1030 inputs_[0] = left; 1044 inputs_[0] = context;
1031 inputs_[1] = right; 1045 inputs_[1] = left;
1046 inputs_[2] = right;
1032 } 1047 }
1033 1048
1034 LOperand* left() { return inputs_[0]; } 1049 LOperand* context() { return inputs_[0]; }
1035 LOperand* right() { return inputs_[1]; } 1050 LOperand* left() { return inputs_[1]; }
1051 LOperand* right() { return inputs_[2]; }
1036 1052
1037 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") 1053 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of")
1038 }; 1054 };
1039 1055
1040 1056
1041 class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 1, 1> { 1057 class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 2, 1> {
1042 public: 1058 public:
1043 LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) { 1059 LInstanceOfKnownGlobal(LOperand* context, LOperand* value, LOperand* temp) {
1044 inputs_[0] = value; 1060 inputs_[0] = context;
1061 inputs_[1] = value;
1045 temps_[0] = temp; 1062 temps_[0] = temp;
1046 } 1063 }
1047 1064
1048 LOperand* value() { return inputs_[0]; } 1065 LOperand* context() { return inputs_[0]; }
1066 LOperand* value() { return inputs_[1]; }
1049 LOperand* temp() { return temps_[0]; } 1067 LOperand* temp() { return temps_[0]; }
1050 1068
1051 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, 1069 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,
1052 "instance-of-known-global") 1070 "instance-of-known-global")
1053 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) 1071 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal)
1054 1072
1055 Handle<JSFunction> function() const { return hydrogen()->function(); } 1073 Handle<JSFunction> function() const { return hydrogen()->function(); }
1056 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { 1074 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() {
1057 return lazy_deopt_env_; 1075 return lazy_deopt_env_;
1058 } 1076 }
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 LOperand* value() { return inputs_[2]; } 1315 LOperand* value() { return inputs_[2]; }
1298 1316
1299 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") 1317 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char")
1300 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) 1318 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar)
1301 1319
1302 private: 1320 private:
1303 String::Encoding encoding_; 1321 String::Encoding encoding_;
1304 }; 1322 };
1305 1323
1306 1324
1307 class LThrow V8_FINAL : public LTemplateInstruction<0, 1, 0> { 1325 class LThrow V8_FINAL : public LTemplateInstruction<0, 2, 0> {
1308 public: 1326 public:
1309 explicit LThrow(LOperand* value) { 1327 explicit LThrow(LOperand* context, LOperand* value) {
1310 inputs_[0] = value; 1328 inputs_[0] = context;
1329 inputs_[1] = value;
1311 } 1330 }
1312 1331
1313 LOperand* value() { return inputs_[0]; } 1332 LOperand* context() { return inputs_[0]; }
1333 LOperand* value() { return inputs_[1]; }
1314 1334
1315 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") 1335 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw")
1316 }; 1336 };
1317 1337
1318 1338
1319 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { 1339 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1320 public: 1340 public:
1321 LAddI(LOperand* left, LOperand* right) { 1341 LAddI(LOperand* left, LOperand* right) {
1322 inputs_[0] = left; 1342 inputs_[0] = left;
1323 inputs_[1] = right; 1343 inputs_[1] = right;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 return LInstruction::kArithmeticD; 1424 return LInstruction::kArithmeticD;
1405 } 1425 }
1406 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; 1426 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE;
1407 virtual const char* Mnemonic() const V8_OVERRIDE; 1427 virtual const char* Mnemonic() const V8_OVERRIDE;
1408 1428
1409 private: 1429 private:
1410 Token::Value op_; 1430 Token::Value op_;
1411 }; 1431 };
1412 1432
1413 1433
1414 class LArithmeticT V8_FINAL : public LTemplateInstruction<1, 2, 0> { 1434 class LArithmeticT V8_FINAL : public LTemplateInstruction<1, 3, 0> {
1415 public: 1435 public:
1416 LArithmeticT(Token::Value op, LOperand* left, LOperand* right) 1436 LArithmeticT(Token::Value op,
1437 LOperand* context,
1438 LOperand* left,
1439 LOperand* right)
1417 : op_(op) { 1440 : op_(op) {
1418 inputs_[0] = left; 1441 inputs_[0] = context;
1419 inputs_[1] = right; 1442 inputs_[1] = left;
1443 inputs_[2] = right;
1420 } 1444 }
1421 1445
1422 Token::Value op() const { return op_; } 1446 Token::Value op() const { return op_; }
1423 LOperand* left() { return inputs_[0]; } 1447 LOperand* context() { return inputs_[0]; }
1424 LOperand* right() { return inputs_[1]; } 1448 LOperand* left() { return inputs_[1]; }
1449 LOperand* right() { return inputs_[2]; }
1425 1450
1426 virtual Opcode opcode() const V8_OVERRIDE { 1451 virtual Opcode opcode() const V8_OVERRIDE {
1427 return LInstruction::kArithmeticT; 1452 return LInstruction::kArithmeticT;
1428 } 1453 }
1429 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; 1454 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE;
1430 virtual const char* Mnemonic() const V8_OVERRIDE; 1455 virtual const char* Mnemonic() const V8_OVERRIDE;
1431 1456
1432 private: 1457 private:
1433 Token::Value op_; 1458 Token::Value op_;
1434 }; 1459 };
1435 1460
1436 1461
1437 class LReturn V8_FINAL : public LTemplateInstruction<0, 2, 0> { 1462 class LReturn V8_FINAL : public LTemplateInstruction<0, 3, 0> {
1438 public: 1463 public:
1439 explicit LReturn(LOperand* value, LOperand* parameter_count) { 1464 explicit LReturn(LOperand* value,
1465 LOperand* context,
1466 LOperand* parameter_count) {
1440 inputs_[0] = value; 1467 inputs_[0] = value;
1441 inputs_[1] = parameter_count; 1468 inputs_[1] = context;
1469 inputs_[2] = parameter_count;
1442 } 1470 }
1443 1471
1444 LOperand* value() { return inputs_[0]; } 1472 LOperand* value() { return inputs_[0]; }
1473 LOperand* context() { return inputs_[1]; }
1445 1474
1446 bool has_constant_parameter_count() { 1475 bool has_constant_parameter_count() {
1447 return parameter_count()->IsConstantOperand(); 1476 return parameter_count()->IsConstantOperand();
1448 } 1477 }
1449 LConstantOperand* constant_parameter_count() { 1478 LConstantOperand* constant_parameter_count() {
1450 ASSERT(has_constant_parameter_count()); 1479 ASSERT(has_constant_parameter_count());
1451 return LConstantOperand::cast(parameter_count()); 1480 return LConstantOperand::cast(parameter_count());
1452 } 1481 }
1453 LOperand* parameter_count() { return inputs_[1]; } 1482 LOperand* parameter_count() { return inputs_[2]; }
1454 1483
1455 DECLARE_CONCRETE_INSTRUCTION(Return, "return") 1484 DECLARE_CONCRETE_INSTRUCTION(Return, "return")
1456 DECLARE_HYDROGEN_ACCESSOR(Return) 1485 DECLARE_HYDROGEN_ACCESSOR(Return)
1457 }; 1486 };
1458 1487
1459 1488
1460 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1489 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1461 public: 1490 public:
1462 explicit LLoadNamedField(LOperand* object) { 1491 explicit LLoadNamedField(LOperand* object) {
1463 inputs_[0] = object; 1492 inputs_[0] = object;
1464 } 1493 }
1465 1494
1466 LOperand* object() { return inputs_[0]; } 1495 LOperand* object() { return inputs_[0]; }
1467 1496
1468 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") 1497 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field")
1469 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) 1498 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField)
1470 }; 1499 };
1471 1500
1472 1501
1473 class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1502 class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1474 public: 1503 public:
1475 explicit LLoadNamedGeneric(LOperand* object) { 1504 explicit LLoadNamedGeneric(LOperand* context, LOperand* object) {
1476 inputs_[0] = object; 1505 inputs_[0] = context;
1506 inputs_[1] = object;
1477 } 1507 }
1478 1508
1479 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") 1509 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic")
1480 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) 1510 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric)
1481 1511
1482 LOperand* object() { return inputs_[0]; } 1512 LOperand* context() { return inputs_[0]; }
1513 LOperand* object() { return inputs_[1]; }
1483 Handle<Object> name() const { return hydrogen()->name(); } 1514 Handle<Object> name() const { return hydrogen()->name(); }
1484 }; 1515 };
1485 1516
1486 1517
1487 class LLoadFunctionPrototype V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1518 class LLoadFunctionPrototype V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1488 public: 1519 public:
1489 explicit LLoadFunctionPrototype(LOperand* function) { 1520 explicit LLoadFunctionPrototype(LOperand* function) {
1490 inputs_[0] = function; 1521 inputs_[0] = function;
1491 } 1522 }
1492 1523
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 LOperand* elements() { return inputs_[0]; } 1567 LOperand* elements() { return inputs_[0]; }
1537 LOperand* key() { return inputs_[1]; } 1568 LOperand* key() { return inputs_[1]; }
1538 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1569 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1539 uint32_t additional_index() const { return hydrogen()->index_offset(); } 1570 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1540 ElementsKind elements_kind() const { 1571 ElementsKind elements_kind() const {
1541 return hydrogen()->elements_kind(); 1572 return hydrogen()->elements_kind();
1542 } 1573 }
1543 }; 1574 };
1544 1575
1545 1576
1546 class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { 1577 class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 3, 0> {
1547 public: 1578 public:
1548 LLoadKeyedGeneric(LOperand* obj, LOperand* key) { 1579 LLoadKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key) {
1549 inputs_[0] = obj; 1580 inputs_[0] = context;
1550 inputs_[1] = key; 1581 inputs_[1] = obj;
1582 inputs_[2] = key;
1551 } 1583 }
1552 1584
1553 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") 1585 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic")
1554 1586
1555 LOperand* object() { return inputs_[0]; } 1587 LOperand* context() { return inputs_[0]; }
1556 LOperand* key() { return inputs_[1]; } 1588 LOperand* object() { return inputs_[1]; }
1589 LOperand* key() { return inputs_[2]; }
1557 }; 1590 };
1558 1591
1559 1592
1560 class LLoadGlobalCell V8_FINAL : public LTemplateInstruction<1, 0, 0> { 1593 class LLoadGlobalCell V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1561 public: 1594 public:
1562 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") 1595 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell")
1563 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) 1596 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell)
1564 }; 1597 };
1565 1598
1566 1599
1567 class LLoadGlobalGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1600 class LLoadGlobalGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1568 public: 1601 public:
1569 explicit LLoadGlobalGeneric(LOperand* global_object) { 1602 explicit LLoadGlobalGeneric(LOperand* context, LOperand* global_object) {
1570 inputs_[0] = global_object; 1603 inputs_[0] = context;
1604 inputs_[1] = global_object;
1571 } 1605 }
1572 1606
1573 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic") 1607 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic")
1574 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric) 1608 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric)
1575 1609
1576 LOperand* global_object() { return inputs_[0]; } 1610 LOperand* context() { return inputs_[0]; }
1611 LOperand* global_object() { return inputs_[1]; }
1577 Handle<Object> name() const { return hydrogen()->name(); } 1612 Handle<Object> name() const { return hydrogen()->name(); }
1578 bool for_typeof() const { return hydrogen()->for_typeof(); } 1613 bool for_typeof() const { return hydrogen()->for_typeof(); }
1579 }; 1614 };
1580 1615
1581 1616
1582 class LStoreGlobalCell V8_FINAL : public LTemplateInstruction<0, 1, 1> { 1617 class LStoreGlobalCell V8_FINAL : public LTemplateInstruction<0, 1, 1> {
1583 public: 1618 public:
1584 explicit LStoreGlobalCell(LOperand* value, LOperand* temp) { 1619 explicit LStoreGlobalCell(LOperand* value, LOperand* temp) {
1585 inputs_[0] = value; 1620 inputs_[0] = value;
1586 temps_[0] = temp; 1621 temps_[0] = temp;
1587 } 1622 }
1588 1623
1589 LOperand* value() { return inputs_[0]; } 1624 LOperand* value() { return inputs_[0]; }
1590 LOperand* temp() { return temps_[0]; } 1625 LOperand* temp() { return temps_[0]; }
1591 1626
1592 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell") 1627 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell")
1593 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell) 1628 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell)
1594 }; 1629 };
1595 1630
1596 1631
1597 class LStoreGlobalGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> { 1632 class LStoreGlobalGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> {
1598 public: 1633 public:
1599 explicit LStoreGlobalGeneric(LOperand* global_object, 1634 explicit LStoreGlobalGeneric(LOperand* context,
1635 LOperand* global_object,
1600 LOperand* value) { 1636 LOperand* value) {
1601 inputs_[0] = global_object; 1637 inputs_[0] = context;
1602 inputs_[1] = value; 1638 inputs_[1] = global_object;
1639 inputs_[2] = value;
1603 } 1640 }
1604 1641
1605 LOperand* global_object() { return inputs_[0]; } 1642 LOperand* context() { return inputs_[0]; }
1606 LOperand* value() { return inputs_[1]; } 1643 LOperand* global_object() { return inputs_[1]; }
1644 LOperand* value() { return inputs_[2]; }
1607 1645
1608 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic") 1646 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic")
1609 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric) 1647 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric)
1610 1648
1611 Handle<Object> name() const { return hydrogen()->name(); } 1649 Handle<Object> name() const { return hydrogen()->name(); }
1612 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 1650 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
1613 }; 1651 };
1614 1652
1615 1653
1616 class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1654 class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1728 explicit LOuterContext(LOperand* context) { 1766 explicit LOuterContext(LOperand* context) {
1729 inputs_[0] = context; 1767 inputs_[0] = context;
1730 } 1768 }
1731 1769
1732 LOperand* context() { return inputs_[0]; } 1770 LOperand* context() { return inputs_[0]; }
1733 1771
1734 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") 1772 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context")
1735 }; 1773 };
1736 1774
1737 1775
1738 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 0, 0> { 1776 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 1, 0> {
1739 public: 1777 public:
1778 explicit LDeclareGlobals(LOperand* context) {
1779 inputs_[0] = context;
1780 }
1781
1782 LOperand* context() { return inputs_[0]; }
1783
1740 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") 1784 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals")
1741 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) 1785 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals)
1742 }; 1786 };
1743 1787
1744 1788
1745 class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 0, 0> { 1789 class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1746 public: 1790 public:
1791 explicit LGlobalObject(LOperand* context) {
1792 inputs_[0] = context;
1793 }
1794
1795 LOperand* context() { return inputs_[0]; }
1796
1747 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object") 1797 DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object")
1748 }; 1798 };
1749 1799
1750 1800
1751 class LGlobalReceiver V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1801 class LGlobalReceiver V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1752 public: 1802 public:
1753 explicit LGlobalReceiver(LOperand* global_object) { 1803 explicit LGlobalReceiver(LOperand* global_object) {
1754 inputs_[0] = global_object; 1804 inputs_[0] = global_object;
1755 } 1805 }
1756 1806
1757 LOperand* global() { return inputs_[0]; } 1807 LOperand* global() { return inputs_[0]; }
1758 1808
1759 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver") 1809 DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver")
1760 }; 1810 };
1761 1811
1762 1812
1763 class LCallConstantFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> { 1813 class LCallConstantFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1764 public: 1814 public:
1765 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") 1815 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function")
1766 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) 1816 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction)
1767 1817
1768 virtual void PrintDataTo(StringStream* stream); 1818 virtual void PrintDataTo(StringStream* stream);
1769 1819
1770 Handle<JSFunction> function() { return hydrogen()->function(); } 1820 Handle<JSFunction> function() { return hydrogen()->function(); }
1771 int arity() const { return hydrogen()->argument_count() - 1; } 1821 int arity() const { return hydrogen()->argument_count() - 1; }
1772 }; 1822 };
1773 1823
1774 1824
1775 class LInvokeFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1825 class LInvokeFunction V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1776 public: 1826 public:
1777 explicit LInvokeFunction(LOperand* function) { 1827 LInvokeFunction(LOperand* context, LOperand* function) {
1778 inputs_[0] = function; 1828 inputs_[0] = context;
1829 inputs_[1] = function;
1779 } 1830 }
1780 1831
1781 LOperand* function() { return inputs_[0]; } 1832 LOperand* context() { return inputs_[0]; }
1833 LOperand* function() { return inputs_[1]; }
1782 1834
1783 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") 1835 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
1784 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) 1836 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
1785 1837
1786 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1838 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1787 1839
1788 int arity() const { return hydrogen()->argument_count() - 1; } 1840 int arity() const { return hydrogen()->argument_count() - 1; }
1789 }; 1841 };
1790 1842
1791 1843
1792 class LCallKeyed V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1844 class LCallKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1793 public: 1845 public:
1794 explicit LCallKeyed(LOperand* key) { 1846 LCallKeyed(LOperand* context, LOperand* key) {
1795 inputs_[0] = key; 1847 inputs_[0] = context;
1848 inputs_[1] = key;
1796 } 1849 }
1797 1850
1798 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") 1851 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed")
1799 DECLARE_HYDROGEN_ACCESSOR(CallKeyed) 1852 DECLARE_HYDROGEN_ACCESSOR(CallKeyed)
1800 1853
1801 LOperand* key() { return inputs_[0]; } 1854 LOperand* context() { return inputs_[0]; }
1855 LOperand* key() { return inputs_[1]; }
1802 1856
1803 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1857 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1804 1858
1805 int arity() const { return hydrogen()->argument_count() - 1; } 1859 int arity() const { return hydrogen()->argument_count() - 1; }
1806 }; 1860 };
1807 1861
1808 1862
1809 class LCallNamed V8_FINAL : public LTemplateInstruction<1, 0, 0> { 1863 class LCallNamed V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1810 public: 1864 public:
1865 explicit LCallNamed(LOperand* context) {
1866 inputs_[0] = context;
1867 }
1868
1869 LOperand* context() { return inputs_[0]; }
1870
1811 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") 1871 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named")
1812 DECLARE_HYDROGEN_ACCESSOR(CallNamed) 1872 DECLARE_HYDROGEN_ACCESSOR(CallNamed)
1813 1873
1814 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1874 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1815 1875
1816 Handle<String> name() const { return hydrogen()->name(); } 1876 Handle<String> name() const { return hydrogen()->name(); }
1817 int arity() const { return hydrogen()->argument_count() - 1; } 1877 int arity() const { return hydrogen()->argument_count() - 1; }
1818 }; 1878 };
1819 1879
1820 1880
1821 class LCallFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1881 class LCallFunction V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1822 public: 1882 public:
1823 explicit LCallFunction(LOperand* function) { 1883 LCallFunction(LOperand* context, LOperand* function) {
1824 inputs_[0] = function; 1884 inputs_[0] = context;
1885 inputs_[1] = function;
1825 } 1886 }
1826 1887
1827 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") 1888 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function")
1828 DECLARE_HYDROGEN_ACCESSOR(CallFunction) 1889 DECLARE_HYDROGEN_ACCESSOR(CallFunction)
1829 1890
1830 LOperand* function() { return inputs_[0]; } 1891 LOperand* context() { return inputs_[0]; }
1892 LOperand* function() { return inputs_[1]; }
1831 int arity() const { return hydrogen()->argument_count() - 1; } 1893 int arity() const { return hydrogen()->argument_count() - 1; }
1832 }; 1894 };
1833 1895
1834 1896
1835 class LCallGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { 1897 class LCallGlobal V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1836 public: 1898 public:
1899 explicit LCallGlobal(LOperand* context) {
1900 inputs_[0] = context;
1901 }
1902
1903 LOperand* context() { return inputs_[0]; }
1904
1837 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") 1905 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global")
1838 DECLARE_HYDROGEN_ACCESSOR(CallGlobal) 1906 DECLARE_HYDROGEN_ACCESSOR(CallGlobal)
1839 1907
1840 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1908 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1841 1909
1842 Handle<String> name() const {return hydrogen()->name(); } 1910 Handle<String> name() const {return hydrogen()->name(); }
1843 int arity() const { return hydrogen()->argument_count() - 1; } 1911 int arity() const { return hydrogen()->argument_count() - 1; }
1844 }; 1912 };
1845 1913
1846 1914
1847 class LCallKnownGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { 1915 class LCallKnownGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1848 public: 1916 public:
1849 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") 1917 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global")
1850 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) 1918 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal)
1851 1919
1852 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1920 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1853 1921
1854 int arity() const { return hydrogen()->argument_count() - 1; } 1922 int arity() const { return hydrogen()->argument_count() - 1; }
1855 }; 1923 };
1856 1924
1857 1925
1858 class LCallNew V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1926 class LCallNew V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1859 public: 1927 public:
1860 explicit LCallNew(LOperand* constructor) { 1928 LCallNew(LOperand* context, LOperand* constructor) {
1861 inputs_[0] = constructor; 1929 inputs_[0] = context;
1930 inputs_[1] = constructor;
1862 } 1931 }
1863 1932
1864 LOperand* constructor() { return inputs_[0]; } 1933 LOperand* context() { return inputs_[0]; }
1934 LOperand* constructor() { return inputs_[1]; }
1865 1935
1866 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") 1936 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
1867 DECLARE_HYDROGEN_ACCESSOR(CallNew) 1937 DECLARE_HYDROGEN_ACCESSOR(CallNew)
1868 1938
1869 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1939 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1870 1940
1871 int arity() const { return hydrogen()->argument_count() - 1; } 1941 int arity() const { return hydrogen()->argument_count() - 1; }
1872 }; 1942 };
1873 1943
1874 1944
1875 class LCallNewArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1945 class LCallNewArray V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1876 public: 1946 public:
1877 explicit LCallNewArray(LOperand* constructor) { 1947 LCallNewArray(LOperand* context, LOperand* constructor) {
1878 inputs_[0] = constructor; 1948 inputs_[0] = context;
1949 inputs_[1] = constructor;
1879 } 1950 }
1880 1951
1881 LOperand* constructor() { return inputs_[0]; } 1952 LOperand* context() { return inputs_[0]; }
1953 LOperand* constructor() { return inputs_[1]; }
1882 1954
1883 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") 1955 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array")
1884 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) 1956 DECLARE_HYDROGEN_ACCESSOR(CallNewArray)
1885 1957
1886 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1958 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1887 1959
1888 int arity() const { return hydrogen()->argument_count() - 1; } 1960 int arity() const { return hydrogen()->argument_count() - 1; }
1889 }; 1961 };
1890 1962
1891 1963
1892 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 0, 0> { 1964 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1893 public: 1965 public:
1966 explicit LCallRuntime(LOperand* context) {
1967 inputs_[0] = context;
1968 }
1969
1970 LOperand* context() { return inputs_[0]; }
1971
1894 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") 1972 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
1895 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) 1973 DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
1896 1974
1897 virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE { 1975 virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE {
1898 return save_doubles() == kDontSaveFPRegs; 1976 return save_doubles() == kDontSaveFPRegs;
1899 } 1977 }
1900 1978
1901 const Runtime::Function* function() const { return hydrogen()->function(); } 1979 const Runtime::Function* function() const { return hydrogen()->function(); }
1902 int arity() const { return hydrogen()->argument_count(); } 1980 int arity() const { return hydrogen()->argument_count(); }
1903 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } 1981 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); }
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
2090 2168
2091 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2169 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2092 2170
2093 Handle<Map> transition() const { return hydrogen()->transition_map(); } 2171 Handle<Map> transition() const { return hydrogen()->transition_map(); }
2094 Representation representation() const { 2172 Representation representation() const {
2095 return hydrogen()->field_representation(); 2173 return hydrogen()->field_representation();
2096 } 2174 }
2097 }; 2175 };
2098 2176
2099 2177
2100 class LStoreNamedGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> { 2178 class LStoreNamedGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> {
2101 public: 2179 public:
2102 LStoreNamedGeneric(LOperand* object, LOperand* value) { 2180 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) {
2103 inputs_[0] = object; 2181 inputs_[0] = context;
2104 inputs_[1] = value; 2182 inputs_[1] = object;
2183 inputs_[2] = value;
2105 } 2184 }
2106 2185
2107 LOperand* object() { return inputs_[0]; } 2186 LOperand* context() { return inputs_[0]; }
2108 LOperand* value() { return inputs_[1]; } 2187 LOperand* object() { return inputs_[1]; }
2188 LOperand* value() { return inputs_[2]; }
2109 2189
2110 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 2190 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
2111 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 2191 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
2112 2192
2113 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2193 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2114 2194
2115 Handle<Object> name() const { return hydrogen()->name(); } 2195 Handle<Object> name() const { return hydrogen()->name(); }
2116 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 2196 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
2117 }; 2197 };
2118 2198
(...skipping 14 matching lines...) Expand all
2133 2213
2134 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") 2214 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
2135 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) 2215 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
2136 2216
2137 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2217 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2138 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } 2218 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
2139 uint32_t additional_index() const { return hydrogen()->index_offset(); } 2219 uint32_t additional_index() const { return hydrogen()->index_offset(); }
2140 }; 2220 };
2141 2221
2142 2222
2143 class LStoreKeyedGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> { 2223 class LStoreKeyedGeneric V8_FINAL : public LTemplateInstruction<0, 4, 0> {
2144 public: 2224 public:
2145 LStoreKeyedGeneric(LOperand* object, LOperand* key, LOperand* value) { 2225 LStoreKeyedGeneric(LOperand* context,
2146 inputs_[0] = object; 2226 LOperand* object,
2147 inputs_[1] = key; 2227 LOperand* key,
2148 inputs_[2] = value; 2228 LOperand* value) {
2229 inputs_[0] = context;
2230 inputs_[1] = object;
2231 inputs_[2] = key;
2232 inputs_[3] = value;
2149 } 2233 }
2150 2234
2151 LOperand* object() { return inputs_[0]; } 2235 LOperand* context() { return inputs_[0]; }
2152 LOperand* key() { return inputs_[1]; } 2236 LOperand* object() { return inputs_[1]; }
2153 LOperand* value() { return inputs_[2]; } 2237 LOperand* key() { return inputs_[2]; }
2238 LOperand* value() { return inputs_[3]; }
2154 2239
2155 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") 2240 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
2156 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) 2241 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
2157 2242
2158 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2243 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2159 2244
2160 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 2245 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
2161 }; 2246 };
2162 2247
2163 2248
2164 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 1, 2> { 2249 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 2, 2> {
2165 public: 2250 public:
2166 LTransitionElementsKind(LOperand* object, 2251 LTransitionElementsKind(LOperand* object,
2252 LOperand* context,
2167 LOperand* new_map_temp, 2253 LOperand* new_map_temp,
2168 LOperand* temp) { 2254 LOperand* temp) {
2169 inputs_[0] = object; 2255 inputs_[0] = object;
2256 inputs_[1] = context;
2170 temps_[0] = new_map_temp; 2257 temps_[0] = new_map_temp;
2171 temps_[1] = temp; 2258 temps_[1] = temp;
2172 } 2259 }
2173 2260
2174 LOperand* object() { return inputs_[0]; } 2261 LOperand* object() { return inputs_[0]; }
2262 LOperand* context() { return inputs_[1]; }
2175 LOperand* new_map_temp() { return temps_[0]; } 2263 LOperand* new_map_temp() { return temps_[0]; }
2176 LOperand* temp() { return temps_[1]; } 2264 LOperand* temp() { return temps_[1]; }
2177 2265
2178 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, 2266 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind,
2179 "transition-elements-kind") 2267 "transition-elements-kind")
2180 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) 2268 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
2181 2269
2182 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2270 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2183 2271
2184 Handle<Map> original_map() { return hydrogen()->original_map().handle(); } 2272 Handle<Map> original_map() { return hydrogen()->original_map().handle(); }
(...skipping 14 matching lines...) Expand all
2199 } 2287 }
2200 2288
2201 LOperand* object() { return inputs_[0]; } 2289 LOperand* object() { return inputs_[0]; }
2202 LOperand* temp() { return temps_[0]; } 2290 LOperand* temp() { return temps_[0]; }
2203 2291
2204 DECLARE_CONCRETE_INSTRUCTION(TrapAllocationMemento, 2292 DECLARE_CONCRETE_INSTRUCTION(TrapAllocationMemento,
2205 "trap-allocation-memento") 2293 "trap-allocation-memento")
2206 }; 2294 };
2207 2295
2208 2296
2209 class LStringAdd V8_FINAL : public LTemplateInstruction<1, 2, 0> { 2297 class LStringAdd V8_FINAL : public LTemplateInstruction<1, 3, 0> {
2210 public: 2298 public:
2211 LStringAdd(LOperand* left, LOperand* right) { 2299 LStringAdd(LOperand* context, LOperand* left, LOperand* right) {
2212 inputs_[0] = left; 2300 inputs_[0] = context;
2213 inputs_[1] = right; 2301 inputs_[1] = left;
2302 inputs_[2] = right;
2214 } 2303 }
2215 2304
2216 LOperand* left() { return inputs_[0]; } 2305 LOperand* context() { return inputs_[0]; }
2217 LOperand* right() { return inputs_[1]; } 2306 LOperand* left() { return inputs_[1]; }
2307 LOperand* right() { return inputs_[2]; }
2218 2308
2219 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") 2309 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add")
2220 DECLARE_HYDROGEN_ACCESSOR(StringAdd) 2310 DECLARE_HYDROGEN_ACCESSOR(StringAdd)
2221 }; 2311 };
2222 2312
2223 2313
2224 class LStringCharCodeAt V8_FINAL : public LTemplateInstruction<1, 2, 0> { 2314 class LStringCharCodeAt V8_FINAL : public LTemplateInstruction<1, 3, 0> {
2225 public: 2315 public:
2226 LStringCharCodeAt(LOperand* string, LOperand* index) { 2316 LStringCharCodeAt(LOperand* context, LOperand* string, LOperand* index) {
2227 inputs_[0] = string; 2317 inputs_[0] = context;
2228 inputs_[1] = index; 2318 inputs_[1] = string;
2319 inputs_[2] = index;
2229 } 2320 }
2230 2321
2231 LOperand* string() { return inputs_[0]; } 2322 LOperand* context() { return inputs_[0]; }
2232 LOperand* index() { return inputs_[1]; } 2323 LOperand* string() { return inputs_[1]; }
2324 LOperand* index() { return inputs_[2]; }
2233 2325
2234 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") 2326 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at")
2235 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) 2327 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt)
2236 }; 2328 };
2237 2329
2238 2330
2239 class LStringCharFromCode V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2331 class LStringCharFromCode V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2240 public: 2332 public:
2241 explicit LStringCharFromCode(LOperand* char_code) { 2333 explicit LStringCharFromCode(LOperand* context, LOperand* char_code) {
2242 inputs_[0] = char_code; 2334 inputs_[0] = context;
2335 inputs_[1] = char_code;
2243 } 2336 }
2244 2337
2245 LOperand* char_code() { return inputs_[0]; } 2338 LOperand* context() { return inputs_[0]; }
2339 LOperand* char_code() { return inputs_[1]; }
2246 2340
2247 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") 2341 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code")
2248 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) 2342 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode)
2249 }; 2343 };
2250 2344
2251 2345
2252 class LCheckValue V8_FINAL : public LTemplateInstruction<0, 1, 0> { 2346 class LCheckValue V8_FINAL : public LTemplateInstruction<0, 1, 0> {
2253 public: 2347 public:
2254 explicit LCheckValue(LOperand* value) { 2348 explicit LCheckValue(LOperand* value) {
2255 inputs_[0] = value; 2349 inputs_[0] = value;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
2345 inputs_[0] = value; 2439 inputs_[0] = value;
2346 } 2440 }
2347 2441
2348 LOperand* value() { return inputs_[0]; } 2442 LOperand* value() { return inputs_[0]; }
2349 2443
2350 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") 2444 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi")
2351 DECLARE_HYDROGEN_ACCESSOR(CheckHeapObject) 2445 DECLARE_HYDROGEN_ACCESSOR(CheckHeapObject)
2352 }; 2446 };
2353 2447
2354 2448
2355 class LAllocate V8_FINAL : public LTemplateInstruction<1, 1, 1> { 2449 class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 1> {
2356 public: 2450 public:
2357 LAllocate(LOperand* size, LOperand* temp) { 2451 LAllocate(LOperand* context, LOperand* size, LOperand* temp) {
2358 inputs_[0] = size; 2452 inputs_[0] = context;
2453 inputs_[1] = size;
2359 temps_[0] = temp; 2454 temps_[0] = temp;
2360 } 2455 }
2361 2456
2362 LOperand* size() { return inputs_[0]; } 2457 LOperand* context() { return inputs_[0]; }
2458 LOperand* size() { return inputs_[1]; }
2363 LOperand* temp() { return temps_[0]; } 2459 LOperand* temp() { return temps_[0]; }
2364 2460
2365 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate") 2461 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate")
2366 DECLARE_HYDROGEN_ACCESSOR(Allocate) 2462 DECLARE_HYDROGEN_ACCESSOR(Allocate)
2367 }; 2463 };
2368 2464
2369 2465
2370 class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> { 2466 class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2371 public: 2467 public:
2468 explicit LRegExpLiteral(LOperand* context) {
2469 inputs_[0] = context;
2470 }
2471
2472 LOperand* context() { return inputs_[0]; }
2473
2372 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") 2474 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal")
2373 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) 2475 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral)
2374 }; 2476 };
2375 2477
2376 2478
2377 class LFunctionLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> { 2479 class LFunctionLiteral V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2378 public: 2480 public:
2481 explicit LFunctionLiteral(LOperand* context) {
2482 inputs_[0] = context;
2483 }
2484
2485 LOperand* context() { return inputs_[0]; }
2486
2379 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") 2487 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal")
2380 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) 2488 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral)
2381 }; 2489 };
2382 2490
2383 2491
2384 class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2492 class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2385 public: 2493 public:
2386 explicit LToFastProperties(LOperand* value) { 2494 explicit LToFastProperties(LOperand* value) {
2387 inputs_[0] = value; 2495 inputs_[0] = value;
2388 } 2496 }
2389 2497
2390 LOperand* value() { return inputs_[0]; } 2498 LOperand* value() { return inputs_[0]; }
2391 2499
2392 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") 2500 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties")
2393 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) 2501 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties)
2394 }; 2502 };
2395 2503
2396 2504
2397 class LTypeof V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2505 class LTypeof V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2398 public: 2506 public:
2399 explicit LTypeof(LOperand* value) { 2507 LTypeof(LOperand* context, LOperand* value) {
2400 inputs_[0] = value; 2508 inputs_[0] = context;
2509 inputs_[1] = value;
2401 } 2510 }
2402 2511
2403 LOperand* value() { return inputs_[0]; } 2512 LOperand* context() { return inputs_[0]; }
2513 LOperand* value() { return inputs_[1]; }
2404 2514
2405 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") 2515 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof")
2406 }; 2516 };
2407 2517
2408 2518
2409 class LTypeofIsAndBranch V8_FINAL : public LControlInstruction<1, 0> { 2519 class LTypeofIsAndBranch V8_FINAL : public LControlInstruction<1, 0> {
2410 public: 2520 public:
2411 explicit LTypeofIsAndBranch(LOperand* value) { 2521 explicit LTypeofIsAndBranch(LOperand* value) {
2412 inputs_[0] = value; 2522 inputs_[0] = value;
2413 } 2523 }
(...skipping 27 matching lines...) Expand all
2441 public: 2551 public:
2442 LOsrEntry() {} 2552 LOsrEntry() {}
2443 2553
2444 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { 2554 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
2445 return false; 2555 return false;
2446 } 2556 }
2447 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") 2557 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
2448 }; 2558 };
2449 2559
2450 2560
2451 class LStackCheck V8_FINAL : public LTemplateInstruction<0, 0, 0> { 2561 class LStackCheck V8_FINAL : public LTemplateInstruction<0, 1, 0> {
2452 public: 2562 public:
2563 explicit LStackCheck(LOperand* context) {
2564 inputs_[0] = context;
2565 }
2566
2567 LOperand* context() { return inputs_[0]; }
2568
2453 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") 2569 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check")
2454 DECLARE_HYDROGEN_ACCESSOR(StackCheck) 2570 DECLARE_HYDROGEN_ACCESSOR(StackCheck)
2455 2571
2456 Label* done_label() { return &done_label_; } 2572 Label* done_label() { return &done_label_; }
2457 2573
2458 private: 2574 private:
2459 Label done_label_; 2575 Label done_label_;
2460 }; 2576 };
2461 2577
2462 2578
2463 class LForInPrepareMap V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2579 class LForInPrepareMap V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2464 public: 2580 public:
2465 explicit LForInPrepareMap(LOperand* object) { 2581 LForInPrepareMap(LOperand* context, LOperand* object) {
2466 inputs_[0] = object; 2582 inputs_[0] = context;
2583 inputs_[1] = object;
2467 } 2584 }
2468 2585
2469 LOperand* object() { return inputs_[0]; } 2586 LOperand* context() { return inputs_[0]; }
2587 LOperand* object() { return inputs_[1]; }
2470 2588
2471 DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap, "for-in-prepare-map") 2589 DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap, "for-in-prepare-map")
2472 }; 2590 };
2473 2591
2474 2592
2475 class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2593 class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2476 public: 2594 public:
2477 explicit LForInCacheArray(LOperand* map) { 2595 explicit LForInCacheArray(LOperand* map) {
2478 inputs_[0] = map; 2596 inputs_[0] = map;
2479 } 2597 }
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
2697 2815
2698 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2816 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2699 }; 2817 };
2700 2818
2701 #undef DECLARE_HYDROGEN_ACCESSOR 2819 #undef DECLARE_HYDROGEN_ACCESSOR
2702 #undef DECLARE_CONCRETE_INSTRUCTION 2820 #undef DECLARE_CONCRETE_INSTRUCTION
2703 2821
2704 } } // namespace v8::int 2822 } } // namespace v8::int
2705 2823
2706 #endif // V8_X64_LITHIUM_X64_H_ 2824 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698