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

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

Issue 7039036: Fix calls of strict mode function with an implicit receiver. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix presubmit 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
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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 void Print() { 723 void Print() {
724 PrintF("CallFunctionStub (args %d, in_loop %d, flags %d)\n", 724 PrintF("CallFunctionStub (args %d, in_loop %d, flags %d)\n",
725 argc_, 725 argc_,
726 static_cast<int>(in_loop_), 726 static_cast<int>(in_loop_),
727 static_cast<int>(flags_)); 727 static_cast<int>(flags_));
728 } 728 }
729 #endif 729 #endif
730 730
731 // Minor key encoding in 32 bits with Bitfield <Type, shift, size>. 731 // Minor key encoding in 32 bits with Bitfield <Type, shift, size>.
732 class InLoopBits: public BitField<InLoopFlag, 0, 1> {}; 732 class InLoopBits: public BitField<InLoopFlag, 0, 1> {};
733 class FlagBits: public BitField<CallFunctionFlags, 1, 1> {}; 733 class FlagBits: public BitField<CallFunctionFlags, 1, 2> {};
734 class ArgcBits: public BitField<int, 2, 32 - 2> {}; 734 class ArgcBits: public BitField<int, 3, 32 - 3> {};
735 735
736 Major MajorKey() { return CallFunction; } 736 Major MajorKey() { return CallFunction; }
737 int MinorKey() { 737 int MinorKey() {
738 // Encode the parameters in a unique 32 bit value. 738 // Encode the parameters in a unique 32 bit value.
739 return InLoopBits::encode(in_loop_) 739 return InLoopBits::encode(in_loop_)
740 | FlagBits::encode(flags_) 740 | FlagBits::encode(flags_)
741 | ArgcBits::encode(argc_); 741 | ArgcBits::encode(argc_);
742 } 742 }
743 743
744 InLoopFlag InLoop() { return in_loop_; } 744 InLoopFlag InLoop() { return in_loop_; }
745
745 bool ReceiverMightBeValue() { 746 bool ReceiverMightBeValue() {
746 return (flags_ & RECEIVER_MIGHT_BE_VALUE) != 0; 747 return (flags_ & RECEIVER_MIGHT_BE_VALUE) != 0;
747 } 748 }
749
750 bool NonValueReceiverMightBeImplicit() {
751 return (flags_ & NON_VALUE_RECEIVER_MIGHT_BE_IMPLICIT) != 0;
752 }
748 }; 753 };
749 754
750 755
751 enum StringIndexFlags { 756 enum StringIndexFlags {
752 // Accepts smis or heap numbers. 757 // Accepts smis or heap numbers.
753 STRING_INDEX_IS_NUMBER, 758 STRING_INDEX_IS_NUMBER,
754 759
755 // Accepts smis or heap numbers that are valid array indices 760 // Accepts smis or heap numbers that are valid array indices
756 // (ECMA-262 15.4). Invalid indices are reported as being out of 761 // (ECMA-262 15.4). Invalid indices are reported as being out of
757 // range. 762 // range.
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 private: 923 private:
919 MacroAssembler* masm_; 924 MacroAssembler* masm_;
920 bool previous_allow_; 925 bool previous_allow_;
921 926
922 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); 927 DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope);
923 }; 928 };
924 929
925 } } // namespace v8::internal 930 } } // namespace v8::internal
926 931
927 #endif // V8_CODE_STUBS_H_ 932 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/debug.cc » ('j') | src/ia32/builtins-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698