| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 int MinorKey() { return 1; } | 625 int MinorKey() { return 1; } |
| 626 | 626 |
| 627 const char* GetName() { return "JSConstructEntryStub"; } | 627 const char* GetName() { return "JSConstructEntryStub"; } |
| 628 }; | 628 }; |
| 629 | 629 |
| 630 | 630 |
| 631 class ArgumentsAccessStub: public CodeStub { | 631 class ArgumentsAccessStub: public CodeStub { |
| 632 public: | 632 public: |
| 633 enum Type { | 633 enum Type { |
| 634 READ_ELEMENT, | 634 READ_ELEMENT, |
| 635 NEW_NON_STRICT, | 635 NEW_NON_STRICT_FAST, |
| 636 NEW_NON_STRICT_SLOW, |
| 636 NEW_STRICT | 637 NEW_STRICT |
| 637 }; | 638 }; |
| 638 | 639 |
| 639 explicit ArgumentsAccessStub(Type type) : type_(type) { } | 640 explicit ArgumentsAccessStub(Type type) : type_(type) { } |
| 640 | 641 |
| 641 private: | 642 private: |
| 642 Type type_; | 643 Type type_; |
| 643 | 644 |
| 644 Major MajorKey() { return ArgumentsAccess; } | 645 Major MajorKey() { return ArgumentsAccess; } |
| 645 int MinorKey() { return type_; } | 646 int MinorKey() { return type_; } |
| 646 | 647 |
| 647 void Generate(MacroAssembler* masm); | 648 void Generate(MacroAssembler* masm); |
| 648 void GenerateReadElement(MacroAssembler* masm); | 649 void GenerateReadElement(MacroAssembler* masm); |
| 649 void GenerateNewObject(MacroAssembler* masm); | 650 void GenerateNewStrict(MacroAssembler* masm); |
| 650 | 651 void GenerateNewNonStrictFast(MacroAssembler* masm); |
| 651 int GetArgumentsBoilerplateIndex() const { | 652 void GenerateNewNonStrictSlow(MacroAssembler* masm); |
| 652 return (type_ == NEW_STRICT) | |
| 653 ? Context::STRICT_MODE_ARGUMENTS_BOILERPLATE_INDEX | |
| 654 : Context::ARGUMENTS_BOILERPLATE_INDEX; | |
| 655 } | |
| 656 | |
| 657 int GetArgumentsObjectSize() const { | |
| 658 if (type_ == NEW_STRICT) | |
| 659 return Heap::kArgumentsObjectSizeStrict; | |
| 660 else | |
| 661 return Heap::kArgumentsObjectSize; | |
| 662 } | |
| 663 | 653 |
| 664 const char* GetName() { return "ArgumentsAccessStub"; } | 654 const char* GetName() { return "ArgumentsAccessStub"; } |
| 665 | 655 |
| 666 #ifdef DEBUG | 656 #ifdef DEBUG |
| 667 void Print() { | 657 void Print() { |
| 668 PrintF("ArgumentsAccessStub (type %d)\n", type_); | 658 PrintF("ArgumentsAccessStub (type %d)\n", type_); |
| 669 } | 659 } |
| 670 #endif | 660 #endif |
| 671 }; | 661 }; |
| 672 | 662 |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 DECLARE_ARRAY_STUB_PRINT(KeyedStoreExternalArrayStub) | 997 DECLARE_ARRAY_STUB_PRINT(KeyedStoreExternalArrayStub) |
| 1008 | 998 |
| 1009 protected: | 999 protected: |
| 1010 JSObject::ElementsKind elements_kind_; | 1000 JSObject::ElementsKind elements_kind_; |
| 1011 }; | 1001 }; |
| 1012 | 1002 |
| 1013 | 1003 |
| 1014 } } // namespace v8::internal | 1004 } } // namespace v8::internal |
| 1015 | 1005 |
| 1016 #endif // V8_CODE_STUBS_H_ | 1006 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |