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

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

Issue 145773008: A64: Synchronize with r17104. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 months 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/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 HValue* hydrogen_value() const { return hydrogen_value_; } 267 HValue* hydrogen_value() const { return hydrogen_value_; }
268 268
269 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { } 269 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { }
270 270
271 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } 271 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); }
272 bool IsCall() const { return IsCallBits::decode(bit_field_); } 272 bool IsCall() const { return IsCallBits::decode(bit_field_); }
273 273
274 // Interface to the register allocator and iterators. 274 // Interface to the register allocator and iterators.
275 bool ClobbersTemps() const { return IsCall(); } 275 bool ClobbersTemps() const { return IsCall(); }
276 bool ClobbersRegisters() const { return IsCall(); } 276 bool ClobbersRegisters() const { return IsCall(); }
277 bool ClobbersDoubleRegisters() const { return IsCall(); } 277 virtual bool ClobbersDoubleRegisters() const { return IsCall(); }
278 278
279 // Interface to the register allocator and iterators. 279 // Interface to the register allocator and iterators.
280 bool IsMarkedAsCall() const { return IsCall(); } 280 bool IsMarkedAsCall() const { return IsCall(); }
281 281
282 virtual bool HasResult() const = 0; 282 virtual bool HasResult() const = 0;
283 virtual LOperand* result() const = 0; 283 virtual LOperand* result() const = 0;
284 284
285 LOperand* FirstInput() { return InputAt(0); } 285 LOperand* FirstInput() { return InputAt(0); }
286 LOperand* Output() { return HasResult() ? result() : NULL; } 286 LOperand* Output() { return HasResult() ? result() : NULL; }
287 287
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { 394 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
395 return !IsRedundant(); 395 return !IsRedundant();
396 } 396 }
397 397
398 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") 398 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap")
399 }; 399 };
400 400
401 401
402 class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> { 402 class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> {
403 public: 403 public:
404 explicit LGoto(int block_id) : block_id_(block_id) { } 404 explicit LGoto(HBasicBlock* block) : block_(block) { }
405 405
406 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE; 406 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE;
407 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") 407 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
408 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 408 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
409 virtual bool IsControl() const V8_OVERRIDE { return true; } 409 virtual bool IsControl() const V8_OVERRIDE { return true; }
410 410
411 int block_id() const { return block_id_; } 411 int block_id() const { return block_->block_id(); }
412 412
413 private: 413 private:
414 int block_id_; 414 HBasicBlock* block_;
415 }; 415 };
416 416
417 417
418 class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> { 418 class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> {
419 public: 419 public:
420 LLazyBailout() : gap_instructions_size_(0) { } 420 LLazyBailout() : gap_instructions_size_(0) { }
421 421
422 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout") 422 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout")
423 423
424 void set_gap_instructions_size(int gap_instructions_size) { 424 void set_gap_instructions_size(int gap_instructions_size) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 475
476 class LParameter V8_FINAL : public LTemplateInstruction<1, 0, 0> { 476 class LParameter V8_FINAL : public LTemplateInstruction<1, 0, 0> {
477 public: 477 public:
478 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { 478 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
479 return false; 479 return false;
480 } 480 }
481 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") 481 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
482 }; 482 };
483 483
484 484
485 class LCallStub V8_FINAL : public LTemplateInstruction<1, 0, 0> { 485 class LCallStub V8_FINAL : public LTemplateInstruction<1, 1, 0> {
486 public: 486 public:
487 explicit LCallStub(LOperand* context) {
488 inputs_[0] = context;
489 }
490
491 LOperand* context() { return inputs_[0]; }
492
487 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") 493 DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub")
488 DECLARE_HYDROGEN_ACCESSOR(CallStub) 494 DECLARE_HYDROGEN_ACCESSOR(CallStub)
489 495
490 TranscendentalCache::Type transcendental_type() { 496 TranscendentalCache::Type transcendental_type() {
491 return hydrogen()->transcendental_type(); 497 return hydrogen()->transcendental_type();
492 } 498 }
493 }; 499 };
494 500
495 501
496 class LUnknownOSRValue V8_FINAL : public LTemplateInstruction<1, 0, 0> { 502 class LUnknownOSRValue V8_FINAL : public LTemplateInstruction<1, 0, 0> {
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 687
682 LOperand* left() { return inputs_[0]; } 688 LOperand* left() { return inputs_[0]; }
683 LOperand* right() { return inputs_[1]; } 689 LOperand* right() { return inputs_[1]; }
684 LOperand* temp() { return temps_[0]; } 690 LOperand* temp() { return temps_[0]; }
685 691
686 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div") 692 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div")
687 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) 693 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv)
688 }; 694 };
689 695
690 696
691 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 1> { 697 class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
692 public: 698 public:
693 LMulI(LOperand* left, LOperand* right, LOperand* temp) { 699 LMulI(LOperand* left, LOperand* right) {
694 inputs_[0] = left; 700 inputs_[0] = left;
695 inputs_[1] = right; 701 inputs_[1] = right;
696 temps_[0] = temp;
697 } 702 }
698 703
699 LOperand* left() { return inputs_[0]; } 704 LOperand* left() { return inputs_[0]; }
700 LOperand* right() { return inputs_[1]; } 705 LOperand* right() { return inputs_[1]; }
701 LOperand* temp() { return temps_[0]; }
702 706
703 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") 707 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i")
704 DECLARE_HYDROGEN_ACCESSOR(Mul) 708 DECLARE_HYDROGEN_ACCESSOR(Mul)
705 }; 709 };
706 710
707 711
708 // Instruction for computing multiplier * multiplicand + addend. 712 // Instruction for computing multiplier * multiplicand + addend.
709 class LMultiplyAddD V8_FINAL : public LTemplateInstruction<1, 3, 0> { 713 class LMultiplyAddD V8_FINAL : public LTemplateInstruction<1, 3, 0> {
710 public: 714 public:
711 LMultiplyAddD(LOperand* addend, LOperand* multiplier, 715 LMultiplyAddD(LOperand* addend, LOperand* multiplier,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 } 779 }
776 780
777 LOperand* value() { return inputs_[0]; } 781 LOperand* value() { return inputs_[0]; }
778 LOperand* temp() { return temps_[0]; } 782 LOperand* temp() { return temps_[0]; }
779 783
780 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round") 784 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round")
781 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 785 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
782 }; 786 };
783 787
784 788
785 class LMathAbs V8_FINAL : public LTemplateInstruction<1, 1, 0> { 789 class LMathAbs V8_FINAL : public LTemplateInstruction<1, 2, 0> {
786 public: 790 public:
787 explicit LMathAbs(LOperand* value) { 791 LMathAbs(LOperand* context, LOperand* value) {
792 inputs_[1] = context;
788 inputs_[0] = value; 793 inputs_[0] = value;
789 } 794 }
790 795
796 LOperand* context() { return inputs_[1]; }
791 LOperand* value() { return inputs_[0]; } 797 LOperand* value() { return inputs_[0]; }
792 798
793 DECLARE_CONCRETE_INSTRUCTION(MathAbs, "math-abs") 799 DECLARE_CONCRETE_INSTRUCTION(MathAbs, "math-abs")
794 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 800 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
795 }; 801 };
796 802
797 803
798 class LMathLog V8_FINAL : public LTemplateInstruction<1, 1, 0> { 804 class LMathLog V8_FINAL : public LTemplateInstruction<1, 1, 0> {
799 public: 805 public:
800 explicit LMathLog(LOperand* value) { 806 explicit LMathLog(LOperand* value) {
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 LOperand* temp() { return temps_[0]; } 985 LOperand* temp() { return temps_[0]; }
980 986
981 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, 987 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch,
982 "is-undetectable-and-branch") 988 "is-undetectable-and-branch")
983 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) 989 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
984 990
985 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 991 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
986 }; 992 };
987 993
988 994
989 class LStringCompareAndBranch V8_FINAL : public LControlInstruction<2, 0> { 995 class LStringCompareAndBranch V8_FINAL : public LControlInstruction<3, 0> {
990 public: 996 public:
991 LStringCompareAndBranch(LOperand* left, LOperand* right) { 997 LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) {
992 inputs_[0] = left; 998 inputs_[0] = context;
993 inputs_[1] = right; 999 inputs_[1] = left;
1000 inputs_[2] = right;
994 } 1001 }
995 1002
996 LOperand* left() { return inputs_[0]; } 1003 LOperand* context() { return inputs_[0]; }
997 LOperand* right() { return inputs_[1]; } 1004 LOperand* left() { return inputs_[1]; }
1005 LOperand* right() { return inputs_[2]; }
998 1006
999 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, 1007 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch,
1000 "string-compare-and-branch") 1008 "string-compare-and-branch")
1001 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) 1009 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch)
1002 1010
1003 Token::Value op() const { return hydrogen()->token(); } 1011 Token::Value op() const { return hydrogen()->token(); }
1004 1012
1005 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1013 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1006 }; 1014 };
1007 1015
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 LOperand* temp() { return temps_[0]; } 1071 LOperand* temp() { return temps_[0]; }
1064 1072
1065 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, 1073 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch,
1066 "class-of-test-and-branch") 1074 "class-of-test-and-branch")
1067 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) 1075 DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
1068 1076
1069 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1077 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1070 }; 1078 };
1071 1079
1072 1080
1073 class LCmpT V8_FINAL : public LTemplateInstruction<1, 2, 0> { 1081 class LCmpT V8_FINAL : public LTemplateInstruction<1, 3, 0> {
1074 public: 1082 public:
1075 LCmpT(LOperand* left, LOperand* right) { 1083 LCmpT(LOperand* context, LOperand* left, LOperand* right) {
1076 inputs_[0] = left; 1084 inputs_[0] = context;
1077 inputs_[1] = right; 1085 inputs_[1] = left;
1086 inputs_[2] = right;
1078 } 1087 }
1079 1088
1080 LOperand* left() { return inputs_[0]; } 1089 LOperand* context() { return inputs_[0]; }
1081 LOperand* right() { return inputs_[1]; } 1090 LOperand* left() { return inputs_[1]; }
1091 LOperand* right() { return inputs_[2]; }
1082 1092
1083 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") 1093 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t")
1084 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric) 1094 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric)
1085 1095
1086 Token::Value op() const { return hydrogen()->token(); } 1096 Token::Value op() const { return hydrogen()->token(); }
1087 }; 1097 };
1088 1098
1089 1099
1090 class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 2, 0> { 1100 class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 3, 0> {
1091 public: 1101 public:
1092 LInstanceOf(LOperand* left, LOperand* right) { 1102 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) {
1093 inputs_[0] = left; 1103 inputs_[0] = context;
1094 inputs_[1] = right; 1104 inputs_[1] = left;
1105 inputs_[2] = right;
1095 } 1106 }
1096 1107
1097 LOperand* left() { return inputs_[0]; } 1108 LOperand* context() { return inputs_[0]; }
1098 LOperand* right() { return inputs_[1]; } 1109 LOperand* left() { return inputs_[1]; }
1110 LOperand* right() { return inputs_[2]; }
1099 1111
1100 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") 1112 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of")
1101 }; 1113 };
1102 1114
1103 1115
1104 class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 1, 1> { 1116 class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 2, 1> {
1105 public: 1117 public:
1106 LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) { 1118 LInstanceOfKnownGlobal(LOperand* context, LOperand* value, LOperand* temp) {
1107 inputs_[0] = value; 1119 inputs_[0] = context;
1120 inputs_[1] = value;
1108 temps_[0] = temp; 1121 temps_[0] = temp;
1109 } 1122 }
1110 1123
1111 LOperand* value() { return inputs_[0]; } 1124 LOperand* context() { return inputs_[0]; }
1125 LOperand* value() { return inputs_[1]; }
1112 LOperand* temp() { return temps_[0]; } 1126 LOperand* temp() { return temps_[0]; }
1113 1127
1114 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, 1128 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,
1115 "instance-of-known-global") 1129 "instance-of-known-global")
1116 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) 1130 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal)
1117 1131
1118 Handle<JSFunction> function() const { return hydrogen()->function(); } 1132 Handle<JSFunction> function() const { return hydrogen()->function(); }
1119 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { 1133 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() {
1120 return lazy_deopt_env_; 1134 return lazy_deopt_env_;
1121 } 1135 }
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 LOperand* value() { return inputs_[2]; } 1381 LOperand* value() { return inputs_[2]; }
1368 1382
1369 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char") 1383 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar, "seq-string-set-char")
1370 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar) 1384 DECLARE_HYDROGEN_ACCESSOR(SeqStringSetChar)
1371 1385
1372 private: 1386 private:
1373 String::Encoding encoding_; 1387 String::Encoding encoding_;
1374 }; 1388 };
1375 1389
1376 1390
1377 class LThrow V8_FINAL : public LTemplateInstruction<0, 1, 0> { 1391 class LThrow V8_FINAL : public LTemplateInstruction<0, 2, 0> {
1378 public: 1392 public:
1379 explicit LThrow(LOperand* value) { 1393 LThrow(LOperand* context, LOperand* value) {
1380 inputs_[0] = value; 1394 inputs_[0] = context;
1395 inputs_[1] = value;
1381 } 1396 }
1382 1397
1383 LOperand* value() { return inputs_[0]; } 1398 LOperand* context() { return inputs_[0]; }
1399 LOperand* value() { return inputs_[1]; }
1384 1400
1385 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") 1401 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw")
1386 }; 1402 };
1387 1403
1388 1404
1389 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { 1405 class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1390 public: 1406 public:
1391 LAddI(LOperand* left, LOperand* right) { 1407 LAddI(LOperand* left, LOperand* right) {
1392 inputs_[0] = left; 1408 inputs_[0] = left;
1393 inputs_[1] = right; 1409 inputs_[1] = right;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 return LInstruction::kArithmeticD; 1485 return LInstruction::kArithmeticD;
1470 } 1486 }
1471 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; 1487 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE;
1472 virtual const char* Mnemonic() const V8_OVERRIDE; 1488 virtual const char* Mnemonic() const V8_OVERRIDE;
1473 1489
1474 private: 1490 private:
1475 Token::Value op_; 1491 Token::Value op_;
1476 }; 1492 };
1477 1493
1478 1494
1479 class LArithmeticT V8_FINAL : public LTemplateInstruction<1, 2, 0> { 1495 class LArithmeticT V8_FINAL : public LTemplateInstruction<1, 3, 0> {
1480 public: 1496 public:
1481 LArithmeticT(Token::Value op, LOperand* left, LOperand* right) 1497 LArithmeticT(Token::Value op,
1498 LOperand* context,
1499 LOperand* left,
1500 LOperand* right)
1482 : op_(op) { 1501 : op_(op) {
1483 inputs_[0] = left; 1502 inputs_[0] = context;
1484 inputs_[1] = right; 1503 inputs_[1] = left;
1504 inputs_[2] = right;
1485 } 1505 }
1486 1506
1487 LOperand* left() { return inputs_[0]; } 1507 LOperand* context() { return inputs_[0]; }
1488 LOperand* right() { return inputs_[1]; } 1508 LOperand* left() { return inputs_[1]; }
1509 LOperand* right() { return inputs_[2]; }
1489 Token::Value op() const { return op_; } 1510 Token::Value op() const { return op_; }
1490 1511
1491 virtual Opcode opcode() const V8_FINAL { return LInstruction::kArithmeticT; } 1512 virtual Opcode opcode() const V8_FINAL { return LInstruction::kArithmeticT; }
1492 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; 1513 virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE;
1493 virtual const char* Mnemonic() const V8_OVERRIDE; 1514 virtual const char* Mnemonic() const V8_OVERRIDE;
1494 1515
1495 private: 1516 private:
1496 Token::Value op_; 1517 Token::Value op_;
1497 }; 1518 };
1498 1519
1499 1520
1500 class LReturn V8_FINAL : public LTemplateInstruction<0, 2, 0> { 1521 class LReturn V8_FINAL : public LTemplateInstruction<0, 3, 0> {
1501 public: 1522 public:
1502 explicit LReturn(LOperand* value, LOperand* parameter_count) { 1523 LReturn(LOperand* value, LOperand* context, LOperand* parameter_count) {
1503 inputs_[0] = value; 1524 inputs_[0] = value;
1504 inputs_[1] = parameter_count; 1525 inputs_[1] = context;
1526 inputs_[2] = parameter_count;
1505 } 1527 }
1506 1528
1507 LOperand* value() { return inputs_[0]; } 1529 LOperand* value() { return inputs_[0]; }
1508 1530
1509 bool has_constant_parameter_count() { 1531 bool has_constant_parameter_count() {
1510 return parameter_count()->IsConstantOperand(); 1532 return parameter_count()->IsConstantOperand();
1511 } 1533 }
1512 LConstantOperand* constant_parameter_count() { 1534 LConstantOperand* constant_parameter_count() {
1513 ASSERT(has_constant_parameter_count()); 1535 ASSERT(has_constant_parameter_count());
1514 return LConstantOperand::cast(parameter_count()); 1536 return LConstantOperand::cast(parameter_count());
1515 } 1537 }
1516 LOperand* parameter_count() { return inputs_[1]; } 1538 LOperand* parameter_count() { return inputs_[2]; }
1517 1539
1518 DECLARE_CONCRETE_INSTRUCTION(Return, "return") 1540 DECLARE_CONCRETE_INSTRUCTION(Return, "return")
1519 }; 1541 };
1520 1542
1521 1543
1522 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1544 class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1523 public: 1545 public:
1524 explicit LLoadNamedField(LOperand* object) { 1546 explicit LLoadNamedField(LOperand* object) {
1525 inputs_[0] = object; 1547 inputs_[0] = object;
1526 } 1548 }
1527 1549
1528 LOperand* object() { return inputs_[0]; } 1550 LOperand* object() { return inputs_[0]; }
1529 1551
1530 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") 1552 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field")
1531 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) 1553 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField)
1532 }; 1554 };
1533 1555
1534 1556
1535 class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1557 class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1536 public: 1558 public:
1537 explicit LLoadNamedGeneric(LOperand* object) { 1559 LLoadNamedGeneric(LOperand* context, LOperand* object) {
1538 inputs_[0] = object; 1560 inputs_[0] = context;
1561 inputs_[1] = object;
1539 } 1562 }
1540 1563
1541 LOperand* object() { return inputs_[0]; } 1564 LOperand* context() { return inputs_[0]; }
1565 LOperand* object() { return inputs_[1]; }
1542 1566
1543 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic") 1567 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric, "load-named-generic")
1544 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric) 1568 DECLARE_HYDROGEN_ACCESSOR(LoadNamedGeneric)
1545 1569
1546 Handle<Object> name() const { return hydrogen()->name(); } 1570 Handle<Object> name() const { return hydrogen()->name(); }
1547 }; 1571 };
1548 1572
1549 1573
1550 class LLoadFunctionPrototype V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1574 class LLoadFunctionPrototype V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1551 public: 1575 public:
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1600 } 1624 }
1601 1625
1602 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") 1626 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed")
1603 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) 1627 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
1604 1628
1605 virtual void PrintDataTo(StringStream* stream); 1629 virtual void PrintDataTo(StringStream* stream);
1606 uint32_t additional_index() const { return hydrogen()->index_offset(); } 1630 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1607 }; 1631 };
1608 1632
1609 1633
1610 class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { 1634 class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 3, 0> {
1611 public: 1635 public:
1612 LLoadKeyedGeneric(LOperand* object, LOperand* key) { 1636 LLoadKeyedGeneric(LOperand* context, LOperand* object, LOperand* key) {
1613 inputs_[0] = object; 1637 inputs_[0] = context;
1614 inputs_[1] = key; 1638 inputs_[1] = object;
1639 inputs_[2] = key;
1615 } 1640 }
1616 1641
1617 LOperand* object() { return inputs_[0]; } 1642 LOperand* context() { return inputs_[0]; }
1618 LOperand* key() { return inputs_[1]; } 1643 LOperand* object() { return inputs_[1]; }
1644 LOperand* key() { return inputs_[2]; }
1619 1645
1620 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") 1646 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic")
1621 }; 1647 };
1622 1648
1623 1649
1624 class LLoadGlobalCell V8_FINAL : public LTemplateInstruction<1, 0, 0> { 1650 class LLoadGlobalCell V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1625 public: 1651 public:
1626 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") 1652 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell")
1627 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) 1653 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell)
1628 }; 1654 };
1629 1655
1630 1656
1631 class LLoadGlobalGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1657 class LLoadGlobalGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1632 public: 1658 public:
1633 explicit LLoadGlobalGeneric(LOperand* global_object) { 1659 LLoadGlobalGeneric(LOperand* context, LOperand* global_object) {
1634 inputs_[0] = global_object; 1660 inputs_[0] = context;
1661 inputs_[1] = global_object;
1635 } 1662 }
1636 1663
1637 LOperand* global_object() { return inputs_[0]; } 1664 LOperand* context() { return inputs_[0]; }
1665 LOperand* global_object() { return inputs_[1]; }
1638 1666
1639 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic") 1667 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load-global-generic")
1640 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric) 1668 DECLARE_HYDROGEN_ACCESSOR(LoadGlobalGeneric)
1641 1669
1642 Handle<Object> name() const { return hydrogen()->name(); } 1670 Handle<Object> name() const { return hydrogen()->name(); }
1643 bool for_typeof() const { return hydrogen()->for_typeof(); } 1671 bool for_typeof() const { return hydrogen()->for_typeof(); }
1644 }; 1672 };
1645 1673
1646 1674
1647 class LStoreGlobalCell V8_FINAL : public LTemplateInstruction<0, 1, 1> { 1675 class LStoreGlobalCell V8_FINAL : public LTemplateInstruction<0, 1, 1> {
1648 public: 1676 public:
1649 LStoreGlobalCell(LOperand* value, LOperand* temp) { 1677 LStoreGlobalCell(LOperand* value, LOperand* temp) {
1650 inputs_[0] = value; 1678 inputs_[0] = value;
1651 temps_[0] = temp; 1679 temps_[0] = temp;
1652 } 1680 }
1653 1681
1654 LOperand* value() { return inputs_[0]; } 1682 LOperand* value() { return inputs_[0]; }
1655 LOperand* temp() { return temps_[0]; } 1683 LOperand* temp() { return temps_[0]; }
1656 1684
1657 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell") 1685 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store-global-cell")
1658 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell) 1686 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalCell)
1659 }; 1687 };
1660 1688
1661 1689
1662 class LStoreGlobalGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> { 1690 class LStoreGlobalGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> {
1663 public: 1691 public:
1664 explicit LStoreGlobalGeneric(LOperand* global_object, 1692 LStoreGlobalGeneric(LOperand* context,
1665 LOperand* value) { 1693 LOperand* global_object,
1666 inputs_[0] = global_object; 1694 LOperand* value) {
1667 inputs_[1] = value; 1695 inputs_[0] = context;
1696 inputs_[1] = global_object;
1697 inputs_[2] = value;
1668 } 1698 }
1669 1699
1670 LOperand* global_object() { return inputs_[0]; } 1700 LOperand* context() { return inputs_[0]; }
1671 LOperand* value() { return inputs_[1]; } 1701 LOperand* global_object() { return inputs_[1]; }
1702 LOperand* value() { return inputs_[2]; }
1672 1703
1673 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic") 1704 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic")
1674 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric) 1705 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric)
1675 1706
1676 Handle<Object> name() const { return hydrogen()->name(); } 1707 Handle<Object> name() const { return hydrogen()->name(); }
1677 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 1708 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
1678 }; 1709 };
1679 1710
1680 1711
1681 class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1712 class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1791 explicit LOuterContext(LOperand* context) { 1822 explicit LOuterContext(LOperand* context) {
1792 inputs_[0] = context; 1823 inputs_[0] = context;
1793 } 1824 }
1794 1825
1795 LOperand* context() { return inputs_[0]; } 1826 LOperand* context() { return inputs_[0]; }
1796 1827
1797 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context") 1828 DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context")
1798 }; 1829 };
1799 1830
1800 1831
1801 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 0, 0> { 1832 class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 1, 0> {
1802 public: 1833 public:
1834 explicit LDeclareGlobals(LOperand* context) {
1835 inputs_[0] = context;
1836 }
1837
1838 LOperand* context() { return inputs_[0]; }
1839
1803 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") 1840 DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals")
1804 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) 1841 DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals)
1805 }; 1842 };
1806 1843
1807 1844
1808 class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1845 class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1809 public: 1846 public:
1810 explicit LGlobalObject(LOperand* context) { 1847 explicit LGlobalObject(LOperand* context) {
1811 inputs_[0] = context; 1848 inputs_[0] = context;
1812 } 1849 }
(...skipping 21 matching lines...) Expand all
1834 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") 1871 DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function")
1835 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) 1872 DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction)
1836 1873
1837 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1874 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1838 1875
1839 Handle<JSFunction> function() { return hydrogen()->function(); } 1876 Handle<JSFunction> function() { return hydrogen()->function(); }
1840 int arity() const { return hydrogen()->argument_count() - 1; } 1877 int arity() const { return hydrogen()->argument_count() - 1; }
1841 }; 1878 };
1842 1879
1843 1880
1844 class LInvokeFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1881 class LInvokeFunction V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1845 public: 1882 public:
1846 explicit LInvokeFunction(LOperand* function) { 1883 LInvokeFunction(LOperand* context, LOperand* function) {
1847 inputs_[0] = function; 1884 inputs_[0] = context;
1885 inputs_[1] = function;
1848 } 1886 }
1849 1887
1850 LOperand* function() { return inputs_[0]; } 1888 LOperand* context() { return inputs_[0]; }
1889 LOperand* function() { return inputs_[1]; }
1851 1890
1852 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") 1891 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
1853 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) 1892 DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
1854 1893
1855 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1894 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1856 1895
1857 int arity() const { return hydrogen()->argument_count() - 1; } 1896 int arity() const { return hydrogen()->argument_count() - 1; }
1858 }; 1897 };
1859 1898
1860 1899
1861 class LCallKeyed V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1900 class LCallKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1862 public: 1901 public:
1863 explicit LCallKeyed(LOperand* key) { 1902 LCallKeyed(LOperand* context, LOperand* key) {
1864 inputs_[0] = key; 1903 inputs_[0] = context;
1904 inputs_[1] = key;
1865 } 1905 }
1866 1906
1867 LOperand* key() { return inputs_[0]; } 1907 LOperand* context() { return inputs_[0]; }
1908 LOperand* key() { return inputs_[1]; }
1868 1909
1869 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") 1910 DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed")
1870 DECLARE_HYDROGEN_ACCESSOR(CallKeyed) 1911 DECLARE_HYDROGEN_ACCESSOR(CallKeyed)
1871 1912
1872 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1913 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1873 1914
1874 int arity() const { return hydrogen()->argument_count() - 1; } 1915 int arity() const { return hydrogen()->argument_count() - 1; }
1875 }; 1916 };
1876 1917
1877 1918
1878 1919
1879 class LCallNamed V8_FINAL : public LTemplateInstruction<1, 0, 0> { 1920 class LCallNamed V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1880 public: 1921 public:
1922 explicit LCallNamed(LOperand* context) {
1923 inputs_[0] = context;
1924 }
1925
1926 LOperand* context() { return inputs_[0]; }
1927
1881 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") 1928 DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named")
1882 DECLARE_HYDROGEN_ACCESSOR(CallNamed) 1929 DECLARE_HYDROGEN_ACCESSOR(CallNamed)
1883 1930
1884 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1931 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1885 1932
1886 Handle<String> name() const { return hydrogen()->name(); } 1933 Handle<String> name() const { return hydrogen()->name(); }
1887 int arity() const { return hydrogen()->argument_count() - 1; } 1934 int arity() const { return hydrogen()->argument_count() - 1; }
1888 }; 1935 };
1889 1936
1890 1937
1891 class LCallFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1938 class LCallFunction V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1892 public: 1939 public:
1893 explicit LCallFunction(LOperand* function) { 1940 LCallFunction(LOperand* context, LOperand* function) {
1894 inputs_[0] = function; 1941 inputs_[0] = context;
1942 inputs_[1] = function;
1895 } 1943 }
1896 1944
1897 LOperand* function() { return inputs_[0]; } 1945 LOperand* context() { return inputs_[0]; }
1946 LOperand* function() { return inputs_[1]; }
1898 1947
1899 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") 1948 DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function")
1900 DECLARE_HYDROGEN_ACCESSOR(CallFunction) 1949 DECLARE_HYDROGEN_ACCESSOR(CallFunction)
1901 1950
1902 int arity() const { return hydrogen()->argument_count() - 1; } 1951 int arity() const { return hydrogen()->argument_count() - 1; }
1903 }; 1952 };
1904 1953
1905 1954
1906 class LCallGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { 1955 class LCallGlobal V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1907 public: 1956 public:
1957 explicit LCallGlobal(LOperand* context) {
1958 inputs_[0] = context;
1959 }
1960
1961 LOperand* context() { return inputs_[0]; }
1962
1908 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") 1963 DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global")
1909 DECLARE_HYDROGEN_ACCESSOR(CallGlobal) 1964 DECLARE_HYDROGEN_ACCESSOR(CallGlobal)
1910 1965
1911 virtual void PrintDataTo(StringStream* stream); 1966 virtual void PrintDataTo(StringStream* stream);
1912 1967
1913 Handle<String> name() const {return hydrogen()->name(); } 1968 Handle<String> name() const {return hydrogen()->name(); }
1914 int arity() const { return hydrogen()->argument_count() - 1; } 1969 int arity() const { return hydrogen()->argument_count() - 1; }
1915 }; 1970 };
1916 1971
1917 1972
1918 class LCallKnownGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { 1973 class LCallKnownGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1919 public: 1974 public:
1920 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") 1975 DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global")
1921 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) 1976 DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal)
1922 1977
1923 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1978 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1924 1979
1925 int arity() const { return hydrogen()->argument_count() - 1; } 1980 int arity() const { return hydrogen()->argument_count() - 1; }
1926 }; 1981 };
1927 1982
1928 1983
1929 class LCallNew V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1984 class LCallNew V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1930 public: 1985 public:
1931 explicit LCallNew(LOperand* constructor) { 1986 LCallNew(LOperand* context, LOperand* constructor) {
1932 inputs_[0] = constructor; 1987 inputs_[0] = context;
1988 inputs_[1] = constructor;
1933 } 1989 }
1934 1990
1935 LOperand* constructor() { return inputs_[0]; } 1991 LOperand* context() { return inputs_[0]; }
1992 LOperand* constructor() { return inputs_[1]; }
1936 1993
1937 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") 1994 DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
1938 DECLARE_HYDROGEN_ACCESSOR(CallNew) 1995 DECLARE_HYDROGEN_ACCESSOR(CallNew)
1939 1996
1940 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1997 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1941 1998
1942 int arity() const { return hydrogen()->argument_count() - 1; } 1999 int arity() const { return hydrogen()->argument_count() - 1; }
1943 }; 2000 };
1944 2001
1945 2002
1946 class LCallNewArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2003 class LCallNewArray V8_FINAL : public LTemplateInstruction<1, 2, 0> {
1947 public: 2004 public:
1948 explicit LCallNewArray(LOperand* constructor) { 2005 LCallNewArray(LOperand* context, LOperand* constructor) {
1949 inputs_[0] = constructor; 2006 inputs_[0] = context;
2007 inputs_[1] = constructor;
1950 } 2008 }
1951 2009
1952 LOperand* constructor() { return inputs_[0]; } 2010 LOperand* context() { return inputs_[0]; }
2011 LOperand* constructor() { return inputs_[1]; }
1953 2012
1954 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") 2013 DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array")
1955 DECLARE_HYDROGEN_ACCESSOR(CallNewArray) 2014 DECLARE_HYDROGEN_ACCESSOR(CallNewArray)
1956 2015
1957 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2016 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1958 2017
1959 int arity() const { return hydrogen()->argument_count() - 1; } 2018 int arity() const { return hydrogen()->argument_count() - 1; }
1960 }; 2019 };
1961 2020
1962 2021
1963 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 0, 0> { 2022 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1964 public: 2023 public:
2024 explicit LCallRuntime(LOperand* context) {
2025 inputs_[0] = context;
2026 }
2027
2028 LOperand* context() { return inputs_[0]; }
2029
1965 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") 2030 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
1966 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) 2031 DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
1967 2032
2033 virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE {
2034 return save_doubles() == kDontSaveFPRegs;
2035 }
2036
1968 const Runtime::Function* function() const { return hydrogen()->function(); } 2037 const Runtime::Function* function() const { return hydrogen()->function(); }
1969 int arity() const { return hydrogen()->argument_count(); } 2038 int arity() const { return hydrogen()->argument_count(); }
2039 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); }
1970 }; 2040 };
1971 2041
1972 2042
1973 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2043 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1974 public: 2044 public:
1975 explicit LInteger32ToDouble(LOperand* value) { 2045 explicit LInteger32ToDouble(LOperand* value) {
1976 inputs_[0] = value; 2046 inputs_[0] = value;
1977 } 2047 }
1978 2048
1979 LOperand* value() { return inputs_[0]; } 2049 LOperand* value() { return inputs_[0]; }
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2160 2230
2161 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2231 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2162 2232
2163 Handle<Map> transition() const { return hydrogen()->transition_map(); } 2233 Handle<Map> transition() const { return hydrogen()->transition_map(); }
2164 Representation representation() const { 2234 Representation representation() const {
2165 return hydrogen()->field_representation(); 2235 return hydrogen()->field_representation();
2166 } 2236 }
2167 }; 2237 };
2168 2238
2169 2239
2170 class LStoreNamedGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> { 2240 class LStoreNamedGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> {
2171 public: 2241 public:
2172 LStoreNamedGeneric(LOperand* object, LOperand* value) { 2242 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) {
2173 inputs_[0] = object; 2243 inputs_[0] = context;
2174 inputs_[1] = value; 2244 inputs_[1] = object;
2245 inputs_[2] = value;
2175 } 2246 }
2176 2247
2177 LOperand* object() { return inputs_[0]; } 2248 LOperand* context() { return inputs_[0]; }
2178 LOperand* value() { return inputs_[1]; } 2249 LOperand* object() { return inputs_[1]; }
2250 LOperand* value() { return inputs_[2]; }
2179 2251
2180 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") 2252 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
2181 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) 2253 DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
2182 2254
2183 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2255 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2184 2256
2185 Handle<Object> name() const { return hydrogen()->name(); } 2257 Handle<Object> name() const { return hydrogen()->name(); }
2186 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 2258 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
2187 }; 2259 };
2188 2260
(...skipping 16 matching lines...) Expand all
2205 2277
2206 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") 2278 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
2207 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) 2279 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
2208 2280
2209 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2281 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2210 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } 2282 bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
2211 uint32_t additional_index() const { return hydrogen()->index_offset(); } 2283 uint32_t additional_index() const { return hydrogen()->index_offset(); }
2212 }; 2284 };
2213 2285
2214 2286
2215 class LStoreKeyedGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> { 2287 class LStoreKeyedGeneric V8_FINAL : public LTemplateInstruction<0, 4, 0> {
2216 public: 2288 public:
2217 LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* value) { 2289 LStoreKeyedGeneric(LOperand* context,
2218 inputs_[0] = obj; 2290 LOperand* obj,
2219 inputs_[1] = key; 2291 LOperand* key,
2220 inputs_[2] = value; 2292 LOperand* value) {
2293 inputs_[0] = context;
2294 inputs_[1] = obj;
2295 inputs_[2] = key;
2296 inputs_[3] = value;
2221 } 2297 }
2222 2298
2223 LOperand* object() { return inputs_[0]; } 2299 LOperand* context() { return inputs_[0]; }
2224 LOperand* key() { return inputs_[1]; } 2300 LOperand* object() { return inputs_[1]; }
2225 LOperand* value() { return inputs_[2]; } 2301 LOperand* key() { return inputs_[2]; }
2302 LOperand* value() { return inputs_[3]; }
2226 2303
2227 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") 2304 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
2228 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) 2305 DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
2229 2306
2230 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2307 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2231 2308
2232 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 2309 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
2233 }; 2310 };
2234 2311
2235 2312
2236 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 1, 1> { 2313 class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 2, 1> {
2237 public: 2314 public:
2238 LTransitionElementsKind(LOperand* object, 2315 LTransitionElementsKind(LOperand* object,
2316 LOperand* context,
2239 LOperand* new_map_temp) { 2317 LOperand* new_map_temp) {
2240 inputs_[0] = object; 2318 inputs_[0] = object;
2319 inputs_[1] = context;
2241 temps_[0] = new_map_temp; 2320 temps_[0] = new_map_temp;
2242 } 2321 }
2243 2322
2323 LOperand* context() { return inputs_[1]; }
2244 LOperand* object() { return inputs_[0]; } 2324 LOperand* object() { return inputs_[0]; }
2245 LOperand* new_map_temp() { return temps_[0]; } 2325 LOperand* new_map_temp() { return temps_[0]; }
2246 2326
2247 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind, 2327 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind,
2248 "transition-elements-kind") 2328 "transition-elements-kind")
2249 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) 2329 DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
2250 2330
2251 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 2331 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
2252 2332
2253 Handle<Map> original_map() { return hydrogen()->original_map().handle(); } 2333 Handle<Map> original_map() { return hydrogen()->original_map().handle(); }
(...skipping 14 matching lines...) Expand all
2268 } 2348 }
2269 2349
2270 LOperand* object() { return inputs_[0]; } 2350 LOperand* object() { return inputs_[0]; }
2271 LOperand* temp() { return temps_[0]; } 2351 LOperand* temp() { return temps_[0]; }
2272 2352
2273 DECLARE_CONCRETE_INSTRUCTION(TrapAllocationMemento, 2353 DECLARE_CONCRETE_INSTRUCTION(TrapAllocationMemento,
2274 "trap-allocation-memento") 2354 "trap-allocation-memento")
2275 }; 2355 };
2276 2356
2277 2357
2278 class LStringAdd V8_FINAL : public LTemplateInstruction<1, 2, 0> { 2358 class LStringAdd V8_FINAL : public LTemplateInstruction<1, 3, 0> {
2279 public: 2359 public:
2280 LStringAdd(LOperand* left, LOperand* right) { 2360 LStringAdd(LOperand* context, LOperand* left, LOperand* right) {
2281 inputs_[0] = left; 2361 inputs_[0] = context;
2282 inputs_[1] = right; 2362 inputs_[1] = left;
2363 inputs_[2] = right;
2283 } 2364 }
2284 2365
2285 LOperand* left() { return inputs_[0]; } 2366 LOperand* context() { return inputs_[0]; }
2286 LOperand* right() { return inputs_[1]; } 2367 LOperand* left() { return inputs_[1]; }
2368 LOperand* right() { return inputs_[2]; }
2287 2369
2288 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add") 2370 DECLARE_CONCRETE_INSTRUCTION(StringAdd, "string-add")
2289 DECLARE_HYDROGEN_ACCESSOR(StringAdd) 2371 DECLARE_HYDROGEN_ACCESSOR(StringAdd)
2290 }; 2372 };
2291 2373
2292 2374
2293 2375
2294 class LStringCharCodeAt V8_FINAL : public LTemplateInstruction<1, 2, 0> { 2376 class LStringCharCodeAt V8_FINAL : public LTemplateInstruction<1, 3, 0> {
2295 public: 2377 public:
2296 LStringCharCodeAt(LOperand* string, LOperand* index) { 2378 LStringCharCodeAt(LOperand* context, LOperand* string, LOperand* index) {
2297 inputs_[0] = string; 2379 inputs_[0] = context;
2298 inputs_[1] = index; 2380 inputs_[1] = string;
2381 inputs_[2] = index;
2299 } 2382 }
2300 2383
2301 LOperand* string() { return inputs_[0]; } 2384 LOperand* context() { return inputs_[0]; }
2302 LOperand* index() { return inputs_[1]; } 2385 LOperand* string() { return inputs_[1]; }
2386 LOperand* index() { return inputs_[2]; }
2303 2387
2304 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at") 2388 DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string-char-code-at")
2305 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt) 2389 DECLARE_HYDROGEN_ACCESSOR(StringCharCodeAt)
2306 }; 2390 };
2307 2391
2308 2392
2309 class LStringCharFromCode V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2393 class LStringCharFromCode V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2310 public: 2394 public:
2311 explicit LStringCharFromCode(LOperand* char_code) { 2395 explicit LStringCharFromCode(LOperand* context, LOperand* char_code) {
2312 inputs_[0] = char_code; 2396 inputs_[0] = context;
2397 inputs_[1] = char_code;
2313 } 2398 }
2314 2399
2315 LOperand* char_code() { return inputs_[0]; } 2400 LOperand* context() { return inputs_[0]; }
2401 LOperand* char_code() { return inputs_[1]; }
2316 2402
2317 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") 2403 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code")
2318 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) 2404 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode)
2319 }; 2405 };
2320 2406
2321 2407
2322 class LCheckValue V8_FINAL : public LTemplateInstruction<0, 1, 0> { 2408 class LCheckValue V8_FINAL : public LTemplateInstruction<0, 1, 0> {
2323 public: 2409 public:
2324 explicit LCheckValue(LOperand* value) { 2410 explicit LCheckValue(LOperand* value) {
2325 inputs_[0] = value; 2411 inputs_[0] = value;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
2418 2504
2419 LOperand* unclamped() { return inputs_[0]; } 2505 LOperand* unclamped() { return inputs_[0]; }
2420 LOperand* temp() { return temps_[0]; } 2506 LOperand* temp() { return temps_[0]; }
2421 2507
2422 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") 2508 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8")
2423 }; 2509 };
2424 2510
2425 2511
2426 class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 2> { 2512 class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 2> {
2427 public: 2513 public:
2428 LAllocate(LOperand* size, LOperand* temp1, LOperand* temp2) { 2514 LAllocate(LOperand* context,
2515 LOperand* size,
2516 LOperand* temp1,
2517 LOperand* temp2) {
2518 inputs_[0] = context;
2429 inputs_[1] = size; 2519 inputs_[1] = size;
2430 temps_[0] = temp1; 2520 temps_[0] = temp1;
2431 temps_[1] = temp2; 2521 temps_[1] = temp2;
2432 } 2522 }
2433 2523
2524 LOperand* context() { return inputs_[0]; }
2434 LOperand* size() { return inputs_[1]; } 2525 LOperand* size() { return inputs_[1]; }
2435 LOperand* temp1() { return temps_[0]; } 2526 LOperand* temp1() { return temps_[0]; }
2436 LOperand* temp2() { return temps_[1]; } 2527 LOperand* temp2() { return temps_[1]; }
2437 2528
2438 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate") 2529 DECLARE_CONCRETE_INSTRUCTION(Allocate, "allocate")
2439 DECLARE_HYDROGEN_ACCESSOR(Allocate) 2530 DECLARE_HYDROGEN_ACCESSOR(Allocate)
2440 }; 2531 };
2441 2532
2442 2533
2443 class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> { 2534 class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2444 public: 2535 public:
2536 explicit LRegExpLiteral(LOperand* context) {
2537 inputs_[0] = context;
2538 }
2539
2540 LOperand* context() { return inputs_[0]; }
2541
2445 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") 2542 DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal")
2446 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) 2543 DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral)
2447 }; 2544 };
2448 2545
2449 2546
2450 class LFunctionLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> { 2547 class LFunctionLiteral V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2451 public: 2548 public:
2549 explicit LFunctionLiteral(LOperand* context) {
2550 inputs_[0] = context;
2551 }
2552
2553 LOperand* context() { return inputs_[0]; }
2554
2452 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") 2555 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal")
2453 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) 2556 DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral)
2454 }; 2557 };
2455 2558
2456 2559
2457 class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2560 class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2458 public: 2561 public:
2459 explicit LToFastProperties(LOperand* value) { 2562 explicit LToFastProperties(LOperand* value) {
2460 inputs_[0] = value; 2563 inputs_[0] = value;
2461 } 2564 }
2462 2565
2463 LOperand* value() { return inputs_[0]; } 2566 LOperand* value() { return inputs_[0]; }
2464 2567
2465 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties") 2568 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to-fast-properties")
2466 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties) 2569 DECLARE_HYDROGEN_ACCESSOR(ToFastProperties)
2467 }; 2570 };
2468 2571
2469 2572
2470 class LTypeof V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2573 class LTypeof V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2471 public: 2574 public:
2472 explicit LTypeof(LOperand* value) { 2575 LTypeof(LOperand* context, LOperand* value) {
2473 inputs_[0] = value; 2576 inputs_[0] = context;
2577 inputs_[1] = value;
2474 } 2578 }
2475 2579
2476 LOperand* value() { return inputs_[0]; } 2580 LOperand* context() { return inputs_[0]; }
2581 LOperand* value() { return inputs_[1]; }
2477 2582
2478 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") 2583 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof")
2479 }; 2584 };
2480 2585
2481 2586
2482 class LTypeofIsAndBranch V8_FINAL : public LControlInstruction<1, 0> { 2587 class LTypeofIsAndBranch V8_FINAL : public LControlInstruction<1, 0> {
2483 public: 2588 public:
2484 explicit LTypeofIsAndBranch(LOperand* value) { 2589 explicit LTypeofIsAndBranch(LOperand* value) {
2485 inputs_[0] = value; 2590 inputs_[0] = value;
2486 } 2591 }
(...skipping 26 matching lines...) Expand all
2513 public: 2618 public:
2514 LOsrEntry() {} 2619 LOsrEntry() {}
2515 2620
2516 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { 2621 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
2517 return false; 2622 return false;
2518 } 2623 }
2519 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") 2624 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
2520 }; 2625 };
2521 2626
2522 2627
2523 class LStackCheck V8_FINAL : public LTemplateInstruction<0, 0, 0> { 2628 class LStackCheck V8_FINAL : public LTemplateInstruction<0, 1, 0> {
2524 public: 2629 public:
2630 explicit LStackCheck(LOperand* context) {
2631 inputs_[0] = context;
2632 }
2633
2634 LOperand* context() { return inputs_[0]; }
2635
2525 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") 2636 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check")
2526 DECLARE_HYDROGEN_ACCESSOR(StackCheck) 2637 DECLARE_HYDROGEN_ACCESSOR(StackCheck)
2527 2638
2528 Label* done_label() { return &done_label_; } 2639 Label* done_label() { return &done_label_; }
2529 2640
2530 private: 2641 private:
2531 Label done_label_; 2642 Label done_label_;
2532 }; 2643 };
2533 2644
2534 2645
2535 class LForInPrepareMap V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2646 class LForInPrepareMap V8_FINAL : public LTemplateInstruction<1, 2, 0> {
2536 public: 2647 public:
2537 explicit LForInPrepareMap(LOperand* object) { 2648 LForInPrepareMap(LOperand* context, LOperand* object) {
2538 inputs_[0] = object; 2649 inputs_[0] = context;
2650 inputs_[1] = object;
2539 } 2651 }
2540 2652
2541 LOperand* object() { return inputs_[0]; } 2653 LOperand* context() { return inputs_[0]; }
2654 LOperand* object() { return inputs_[1]; }
2542 2655
2543 DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap, "for-in-prepare-map") 2656 DECLARE_CONCRETE_INSTRUCTION(ForInPrepareMap, "for-in-prepare-map")
2544 }; 2657 };
2545 2658
2546 2659
2547 class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2660 class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> {
2548 public: 2661 public:
2549 explicit LForInCacheArray(LOperand* map) { 2662 explicit LForInCacheArray(LOperand* map) {
2550 inputs_[0] = map; 2663 inputs_[0] = map;
2551 } 2664 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2587 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index") 2700 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index")
2588 }; 2701 };
2589 2702
2590 2703
2591 class LChunkBuilder; 2704 class LChunkBuilder;
2592 class LPlatformChunk V8_FINAL : public LChunk { 2705 class LPlatformChunk V8_FINAL : public LChunk {
2593 public: 2706 public:
2594 LPlatformChunk(CompilationInfo* info, HGraph* graph) 2707 LPlatformChunk(CompilationInfo* info, HGraph* graph)
2595 : LChunk(info, graph) { } 2708 : LChunk(info, graph) { }
2596 2709
2597 int GetNextSpillIndex(bool is_double); 2710 int GetNextSpillIndex(RegisterKind kind);
2598 LOperand* GetNextSpillSlot(bool is_double); 2711 LOperand* GetNextSpillSlot(RegisterKind kind);
2599 }; 2712 };
2600 2713
2601 2714
2602 class LChunkBuilder V8_FINAL BASE_EMBEDDED { 2715 class LChunkBuilder V8_FINAL BASE_EMBEDDED {
2603 public: 2716 public:
2604 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) 2717 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
2605 : chunk_(NULL), 2718 : chunk_(NULL),
2606 info_(info), 2719 info_(info),
2607 graph_(graph), 2720 graph_(graph),
2608 zone_(graph->zone()), 2721 zone_(graph->zone()),
2609 status_(UNUSED), 2722 status_(UNUSED),
2610 current_instruction_(NULL), 2723 current_instruction_(NULL),
2611 current_block_(NULL), 2724 current_block_(NULL),
2612 next_block_(NULL), 2725 next_block_(NULL),
2613 argument_count_(0), 2726 argument_count_(0),
2614 allocator_(allocator), 2727 allocator_(allocator),
2615 position_(RelocInfo::kNoPosition), 2728 position_(RelocInfo::kNoPosition),
2616 instruction_pending_deoptimization_environment_(NULL), 2729 instruction_pending_deoptimization_environment_(NULL),
2617 pending_deoptimization_ast_id_(BailoutId::None()) { } 2730 pending_deoptimization_ast_id_(BailoutId::None()) { }
2618 2731
2619 // Build the sequence for the graph. 2732 // Build the sequence for the graph.
2620 LPlatformChunk* Build(); 2733 LPlatformChunk* Build();
2621 2734
2735 LInstruction* CheckElideControlInstruction(HControlInstruction* instr);
2736
2622 // Declare methods that deal with the individual node types. 2737 // Declare methods that deal with the individual node types.
2623 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); 2738 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2624 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 2739 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
2625 #undef DECLARE_DO 2740 #undef DECLARE_DO
2626 2741
2627 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend); 2742 LInstruction* DoMultiplyAdd(HMul* mul, HValue* addend);
2628 2743
2629 static bool HasMagicNumberForDivisor(int32_t divisor); 2744 static bool HasMagicNumberForDivisor(int32_t divisor);
2630 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val); 2745 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val);
2631 2746
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
2769 2884
2770 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2885 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2771 }; 2886 };
2772 2887
2773 #undef DECLARE_HYDROGEN_ACCESSOR 2888 #undef DECLARE_HYDROGEN_ACCESSOR
2774 #undef DECLARE_CONCRETE_INSTRUCTION 2889 #undef DECLARE_CONCRETE_INSTRUCTION
2775 2890
2776 } } // namespace v8::internal 2891 } } // namespace v8::internal
2777 2892
2778 #endif // V8_MIPS_LITHIUM_MIPS_H_ 2893 #endif // V8_MIPS_LITHIUM_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698