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

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

Issue 6698015: Implement strict mode arguments caller/callee. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR Feedback. Created 9 years, 9 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
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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 int MinorKey() { return 1; } 647 int MinorKey() { return 1; }
648 648
649 const char* GetName() { return "JSConstructEntryStub"; } 649 const char* GetName() { return "JSConstructEntryStub"; }
650 }; 650 };
651 651
652 652
653 class ArgumentsAccessStub: public CodeStub { 653 class ArgumentsAccessStub: public CodeStub {
654 public: 654 public:
655 enum Type { 655 enum Type {
656 READ_ELEMENT, 656 READ_ELEMENT,
657 NEW_OBJECT 657 NEW_OBJECT,
658 NEW_OBJECT_STRICT
658 }; 659 };
659 660
660 explicit ArgumentsAccessStub(Type type) : type_(type) { } 661 explicit ArgumentsAccessStub(Type type) : type_(type) { }
661 662
662 private: 663 private:
663 Type type_; 664 Type type_;
664 665
665 Major MajorKey() { return ArgumentsAccess; } 666 Major MajorKey() { return ArgumentsAccess; }
666 int MinorKey() { return type_; } 667 int MinorKey() { return type_; }
667 668
668 void Generate(MacroAssembler* masm); 669 void Generate(MacroAssembler* masm);
669 void GenerateReadElement(MacroAssembler* masm); 670 void GenerateReadElement(MacroAssembler* masm);
670 void GenerateNewObject(MacroAssembler* masm); 671 void GenerateNewObject(MacroAssembler* masm);
671 672
673 int GetArgumentsBoilerplateIndex() const {
674 return (type_ == NEW_OBJECT_STRICT)
675 ? Context::ARGUMENTS_BOILERPLATE_STRICT_INDEX
676 : Context::ARGUMENTS_BOILERPLATE_INDEX;
677 }
678
679 int GetArgumentsObjectSize() const {
680 if (type_ == NEW_OBJECT_STRICT) {
681 return Heap::kArgumentsObjectSizeStrict;
682 } else {
683 return Heap::kArgumentsObjectSize;
684 }
Martin Maly 2011/03/16 01:21:24 This is tragic. Using ?: results in linker not bei
Kevin Millikin (Chromium) 2011/03/16 09:48:41 It looks like it's declared in heap.h, but there i
Martin Maly 2011/03/16 22:22:25 Done. Thanks for the detailed info!
685 }
686
672 const char* GetName() { return "ArgumentsAccessStub"; } 687 const char* GetName() { return "ArgumentsAccessStub"; }
673 688
674 #ifdef DEBUG 689 #ifdef DEBUG
675 void Print() { 690 void Print() {
676 PrintF("ArgumentsAccessStub (type %d)\n", type_); 691 PrintF("ArgumentsAccessStub (type %d)\n", type_);
677 } 692 }
678 #endif 693 #endif
679 }; 694 };
680 695
681 696
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 private: 949 private:
935 MacroAssembler* masm_; 950 MacroAssembler* masm_;
936 bool previous_allow_; 951 bool previous_allow_;
937 952
938 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); 953 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope);
939 }; 954 };
940 955
941 } } // namespace v8::internal 956 } } // namespace v8::internal
942 957
943 #endif // V8_CODE_STUBS_H_ 958 #endif // V8_CODE_STUBS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698