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

Side by Side Diff: src/stub-cache.h

Issue 6594037: Strict Mode assignment to read only property. (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
« no previous file with comments | « src/runtime.cc ('k') | src/stub-cache.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 MUST_USE_RESULT static MaybeObject* ComputeKeyedLoadPixelArray( 136 MUST_USE_RESULT static MaybeObject* ComputeKeyedLoadPixelArray(
137 JSObject* receiver); 137 JSObject* receiver);
138 138
139 // --- 139 // ---
140 140
141 MUST_USE_RESULT static MaybeObject* ComputeStoreField( 141 MUST_USE_RESULT static MaybeObject* ComputeStoreField(
142 String* name, 142 String* name,
143 JSObject* receiver, 143 JSObject* receiver,
144 int field_index, 144 int field_index,
145 Map* transition, 145 Map* transition,
146 Code::ExtraICState extra_ic_state); 146 StrictModeFlag strict_mode);
147 147
148 MUST_USE_RESULT static MaybeObject* ComputeStoreNormal( 148 MUST_USE_RESULT static MaybeObject* ComputeStoreNormal(
149 Code::ExtraICState extra_ic_state); 149 StrictModeFlag strict_mode);
150 150
151 MUST_USE_RESULT static MaybeObject* ComputeStoreGlobal( 151 MUST_USE_RESULT static MaybeObject* ComputeStoreGlobal(
152 String* name, 152 String* name,
153 GlobalObject* receiver, 153 GlobalObject* receiver,
154 JSGlobalPropertyCell* cell, 154 JSGlobalPropertyCell* cell,
155 Code::ExtraICState extra_ic_state); 155 StrictModeFlag strict_mode);
156 156
157 MUST_USE_RESULT static MaybeObject* ComputeStoreCallback( 157 MUST_USE_RESULT static MaybeObject* ComputeStoreCallback(
158 String* name, 158 String* name,
159 JSObject* receiver, 159 JSObject* receiver,
160 AccessorInfo* callback, 160 AccessorInfo* callback,
161 Code::ExtraICState extra_ic_state); 161 StrictModeFlag strict_mode);
162 162
163 MUST_USE_RESULT static MaybeObject* ComputeStoreInterceptor( 163 MUST_USE_RESULT static MaybeObject* ComputeStoreInterceptor(
164 String* name, 164 String* name,
165 JSObject* receiver, 165 JSObject* receiver,
166 Code::ExtraICState extra_ic_state); 166 StrictModeFlag strict_mode);
167 167
168 // --- 168 // ---
169 169
170 MUST_USE_RESULT static MaybeObject* ComputeKeyedStoreField( 170 MUST_USE_RESULT static MaybeObject* ComputeKeyedStoreField(
171 String* name, 171 String* name,
172 JSObject* receiver, 172 JSObject* receiver,
173 int field_index, 173 int field_index,
174 Map* transition = NULL); 174 Map* transition,
175 StrictModeFlag strict_mode);
175 176
176 MUST_USE_RESULT static MaybeObject* ComputeKeyedStoreSpecialized( 177 MUST_USE_RESULT static MaybeObject* ComputeKeyedStoreSpecialized(
177 JSObject* receiver); 178 JSObject* receiver,
179 StrictModeFlag strict_mode);
178 180
179 MUST_USE_RESULT static MaybeObject* ComputeKeyedStorePixelArray( 181 MUST_USE_RESULT static MaybeObject* ComputeKeyedStorePixelArray(
180 JSObject* receiver); 182 JSObject* receiver,
183 StrictModeFlag strict_mode);
181 184
182 MUST_USE_RESULT static MaybeObject* ComputeKeyedLoadOrStoreExternalArray( 185 MUST_USE_RESULT static MaybeObject* ComputeKeyedLoadOrStoreExternalArray(
183 JSObject* receiver, 186 JSObject* receiver,
184 bool is_store); 187 bool is_store,
188 StrictModeFlag strict_mode);
185 189
186 // --- 190 // ---
187 191
188 MUST_USE_RESULT static MaybeObject* ComputeCallField(int argc, 192 MUST_USE_RESULT static MaybeObject* ComputeCallField(int argc,
189 InLoopFlag in_loop, 193 InLoopFlag in_loop,
190 Code::Kind, 194 Code::Kind,
191 String* name, 195 String* name,
192 Object* object, 196 Object* object,
193 JSObject* holder, 197 JSObject* holder,
194 int index); 198 int index);
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 MUST_USE_RESULT MaybeObject* CompileLoadSpecialized(JSObject* receiver); 625 MUST_USE_RESULT MaybeObject* CompileLoadSpecialized(JSObject* receiver);
622 MUST_USE_RESULT MaybeObject* CompileLoadPixelArray(JSObject* receiver); 626 MUST_USE_RESULT MaybeObject* CompileLoadPixelArray(JSObject* receiver);
623 627
624 private: 628 private:
625 MaybeObject* GetCode(PropertyType type, String* name); 629 MaybeObject* GetCode(PropertyType type, String* name);
626 }; 630 };
627 631
628 632
629 class StoreStubCompiler: public StubCompiler { 633 class StoreStubCompiler: public StubCompiler {
630 public: 634 public:
631 explicit StoreStubCompiler(Code::ExtraICState extra_ic_state) 635 explicit StoreStubCompiler(StrictModeFlag strict_mode)
632 : extra_ic_state_(extra_ic_state) { } 636 : strict_mode_(strict_mode) { }
633 637
634 MUST_USE_RESULT MaybeObject* CompileStoreField(JSObject* object, 638 MUST_USE_RESULT MaybeObject* CompileStoreField(JSObject* object,
635 int index, 639 int index,
636 Map* transition, 640 Map* transition,
637 String* name); 641 String* name);
638 642
639 MUST_USE_RESULT MaybeObject* CompileStoreCallback(JSObject* object, 643 MUST_USE_RESULT MaybeObject* CompileStoreCallback(JSObject* object,
640 AccessorInfo* callbacks, 644 AccessorInfo* callbacks,
641 String* name); 645 String* name);
642 MUST_USE_RESULT MaybeObject* CompileStoreInterceptor(JSObject* object, 646 MUST_USE_RESULT MaybeObject* CompileStoreInterceptor(JSObject* object,
643 String* name); 647 String* name);
644 MUST_USE_RESULT MaybeObject* CompileStoreGlobal(GlobalObject* object, 648 MUST_USE_RESULT MaybeObject* CompileStoreGlobal(GlobalObject* object,
645 JSGlobalPropertyCell* holder, 649 JSGlobalPropertyCell* holder,
646 String* name); 650 String* name);
647 651
648 652
649 private: 653 private:
650 MaybeObject* GetCode(PropertyType type, String* name); 654 MaybeObject* GetCode(PropertyType type, String* name);
651 655
652 Code::ExtraICState extra_ic_state_; 656 StrictModeFlag strict_mode_;
653 }; 657 };
654 658
655 659
656 class KeyedStoreStubCompiler: public StubCompiler { 660 class KeyedStoreStubCompiler: public StubCompiler {
657 public: 661 public:
662 explicit KeyedStoreStubCompiler(StrictModeFlag strict_mode)
663 : strict_mode_(strict_mode) { }
664
658 MUST_USE_RESULT MaybeObject* CompileStoreField(JSObject* object, 665 MUST_USE_RESULT MaybeObject* CompileStoreField(JSObject* object,
659 int index, 666 int index,
660 Map* transition, 667 Map* transition,
661 String* name); 668 String* name);
662 669
663 MUST_USE_RESULT MaybeObject* CompileStoreSpecialized(JSObject* receiver); 670 MUST_USE_RESULT MaybeObject* CompileStoreSpecialized(JSObject* receiver);
664 671
665 MUST_USE_RESULT MaybeObject* CompileStorePixelArray(JSObject* receiver); 672 MUST_USE_RESULT MaybeObject* CompileStorePixelArray(JSObject* receiver);
666 673
667 private: 674 private:
668 MaybeObject* GetCode(PropertyType type, String* name); 675 MaybeObject* GetCode(PropertyType type, String* name);
676
677 StrictModeFlag strict_mode_;
669 }; 678 };
670 679
671 680
672 // Subset of FUNCTIONS_WITH_ID_LIST with custom constant/global call 681 // Subset of FUNCTIONS_WITH_ID_LIST with custom constant/global call
673 // IC stubs. 682 // IC stubs.
674 #define CUSTOM_CALL_IC_GENERATORS(V) \ 683 #define CUSTOM_CALL_IC_GENERATORS(V) \
675 V(ArrayPush) \ 684 V(ArrayPush) \
676 V(ArrayPop) \ 685 V(ArrayPop) \
677 V(StringCharCodeAt) \ 686 V(StringCharCodeAt) \
678 V(StringCharAt) \ 687 V(StringCharAt) \
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 MUST_USE_RESULT MaybeObject* CompileKeyedStoreStub( 840 MUST_USE_RESULT MaybeObject* CompileKeyedStoreStub(
832 ExternalArrayType array_type, Code::Flags flags); 841 ExternalArrayType array_type, Code::Flags flags);
833 842
834 private: 843 private:
835 MaybeObject* GetCode(Code::Flags flags); 844 MaybeObject* GetCode(Code::Flags flags);
836 }; 845 };
837 846
838 } } // namespace v8::internal 847 } } // namespace v8::internal
839 848
840 #endif // V8_STUB_CACHE_H_ 849 #endif // V8_STUB_CACHE_H_
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698