Chromium Code Reviews| 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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 661 int MinorKey() { return 1; } | 661 int MinorKey() { return 1; } |
| 662 | 662 |
| 663 const char* GetName() { return "JSConstructEntryStub"; } | 663 const char* GetName() { return "JSConstructEntryStub"; } |
| 664 }; | 664 }; |
| 665 | 665 |
| 666 | 666 |
| 667 class ArgumentsAccessStub: public CodeStub { | 667 class ArgumentsAccessStub: public CodeStub { |
| 668 public: | 668 public: |
| 669 enum Type { | 669 enum Type { |
| 670 READ_ELEMENT, | 670 READ_ELEMENT, |
| 671 NEW_NON_STRICT, | 671 NEW_NON_STRICT_FAST, |
| 672 NEW_NON_STRICT_SLOW, | |
| 672 NEW_STRICT | 673 NEW_STRICT |
| 673 }; | 674 }; |
| 674 | 675 |
| 675 explicit ArgumentsAccessStub(Type type) : type_(type) { } | 676 explicit ArgumentsAccessStub(Type type) : type_(type) { } |
| 676 | 677 |
| 677 private: | 678 private: |
| 678 Type type_; | 679 Type type_; |
| 679 | 680 |
| 680 Major MajorKey() { return ArgumentsAccess; } | 681 Major MajorKey() { return ArgumentsAccess; } |
| 681 int MinorKey() { return type_; } | 682 int MinorKey() { return type_; } |
| 682 | 683 |
| 683 void Generate(MacroAssembler* masm); | 684 void Generate(MacroAssembler* masm); |
| 684 void GenerateReadElement(MacroAssembler* masm); | 685 void GenerateReadElement(MacroAssembler* masm); |
| 685 void GenerateNewObject(MacroAssembler* masm); | 686 void GenerateNewStrict(MacroAssembler* masm); |
| 687 void GenerateNewNonStrictFast(MacroAssembler* masm); | |
| 688 void GenerateNewNonStrictSlow(MacroAssembler* masm); | |
| 686 | 689 |
| 687 int GetArgumentsBoilerplateIndex() const { | 690 int GetArgumentsBoilerplateIndex() const { |
|
Kevin Millikin (Chromium)
2011/04/27 11:49:28
I think this function and the next (GetArgumentsOb
rossberg
2011/04/27 23:18:00
Done.
| |
| 688 return (type_ == NEW_STRICT) | 691 return (type_ == NEW_STRICT) |
| 689 ? Context::STRICT_MODE_ARGUMENTS_BOILERPLATE_INDEX | 692 ? Context::STRICT_MODE_ARGUMENTS_BOILERPLATE_INDEX |
| 690 : Context::ARGUMENTS_BOILERPLATE_INDEX; | 693 : Context::ARGUMENTS_BOILERPLATE_INDEX; |
| 691 } | 694 } |
| 692 | 695 |
| 693 int GetArgumentsObjectSize() const { | 696 int GetArgumentsObjectSize() const { |
| 694 if (type_ == NEW_STRICT) | 697 if (type_ == NEW_STRICT) |
| 695 return Heap::kArgumentsObjectSizeStrict; | 698 return Heap::kArgumentsObjectSizeStrict; |
| 696 else | 699 else |
| 697 return Heap::kArgumentsObjectSize; | 700 return Heap::kArgumentsObjectSize; |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 962 private: | 965 private: |
| 963 MacroAssembler* masm_; | 966 MacroAssembler* masm_; |
| 964 bool previous_allow_; | 967 bool previous_allow_; |
| 965 | 968 |
| 966 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); | 969 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); |
| 967 }; | 970 }; |
| 968 | 971 |
| 969 } } // namespace v8::internal | 972 } } // namespace v8::internal |
| 970 | 973 |
| 971 #endif // V8_CODE_STUBS_H_ | 974 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |