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

Side by Side Diff: src/code-stubs.h

Issue 6824081: Add a stub for allocating parameter maps. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/arguments/
Patch Set: '' Created 9 years, 7 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/bootstrapper.cc ('k') | src/codegen.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 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
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);
686 687 void GenerateNewNonStrictFast(MacroAssembler* masm);
687 int GetArgumentsBoilerplateIndex() const { 688 void GenerateNewNonStrictSlow(MacroAssembler* masm);
688 return (type_ == NEW_STRICT)
689 ? Context::STRICT_MODE_ARGUMENTS_BOILERPLATE_INDEX
690 : Context::ARGUMENTS_BOILERPLATE_INDEX;
691 }
692
693 int GetArgumentsObjectSize() const {
694 if (type_ == NEW_STRICT)
695 return Heap::kArgumentsObjectSizeStrict;
696 else
697 return Heap::kArgumentsObjectSize;
698 }
699 689
700 const char* GetName() { return "ArgumentsAccessStub"; } 690 const char* GetName() { return "ArgumentsAccessStub"; }
701 691
702 #ifdef DEBUG 692 #ifdef DEBUG
703 void Print() { 693 void Print() {
704 PrintF("ArgumentsAccessStub (type %d)\n", type_); 694 PrintF("ArgumentsAccessStub (type %d)\n", type_);
705 } 695 }
706 #endif 696 #endif
707 }; 697 };
708 698
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 private: 952 private:
963 MacroAssembler* masm_; 953 MacroAssembler* masm_;
964 bool previous_allow_; 954 bool previous_allow_;
965 955
966 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); 956 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope);
967 }; 957 };
968 958
969 } } // namespace v8::internal 959 } } // namespace v8::internal
970 960
971 #endif // V8_CODE_STUBS_H_ 961 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698