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 91413003: Remove the strict-mode flag from store handlers. It's only relevant to the IC stub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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/builtins.cc ('k') | src/ic.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 STATIC_ASSERT(KindBits::kSize == 4); 951 STATIC_ASSERT(KindBits::kSize == 4);
952 class InobjectBits: public BitField<bool, 4, 1> {}; 952 class InobjectBits: public BitField<bool, 4, 1> {};
953 class IndexBits: public BitField<int, 5, 11> {}; 953 class IndexBits: public BitField<int, 5, 11> {};
954 class UnboxedDoubleBits: public BitField<bool, 16, 1> {}; 954 class UnboxedDoubleBits: public BitField<bool, 16, 1> {};
955 virtual CodeStub::Major MajorKey() { return LoadField; } 955 virtual CodeStub::Major MajorKey() { return LoadField; }
956 }; 956 };
957 957
958 958
959 class StoreGlobalStub : public HandlerStub { 959 class StoreGlobalStub : public HandlerStub {
960 public: 960 public:
961 StoreGlobalStub(StrictModeFlag strict_mode, bool is_constant) { 961 explicit StoreGlobalStub(bool is_constant) {
962 bit_field_ = StrictModeBits::encode(strict_mode) | 962 bit_field_ = IsConstantBits::encode(is_constant);
963 IsConstantBits::encode(is_constant);
964 } 963 }
965 964
966 Handle<Code> GetCodeCopyFromTemplate(Isolate* isolate, 965 Handle<Code> GetCodeCopyFromTemplate(Isolate* isolate,
967 Map* receiver_map, 966 Map* receiver_map,
968 PropertyCell* cell) { 967 PropertyCell* cell) {
969 Handle<Code> code = CodeStub::GetCodeCopyFromTemplate(isolate); 968 Handle<Code> code = CodeStub::GetCodeCopyFromTemplate(isolate);
970 // Replace the placeholder cell and global object map with the actual global 969 // Replace the placeholder cell and global object map with the actual global
971 // cell and receiver map. 970 // cell and receiver map.
972 Map* cell_map = isolate->heap()->global_property_cell_map(); 971 Map* cell_map = isolate->heap()->global_property_cell_map();
973 code->ReplaceNthObject(1, cell_map, cell); 972 code->ReplaceNthObject(1, cell_map, cell);
(...skipping 22 matching lines...) Expand all
996 return Representation::FromKind(RepresentationBits::decode(bit_field_)); 995 return Representation::FromKind(RepresentationBits::decode(bit_field_));
997 } 996 }
998 void set_representation(Representation r) { 997 void set_representation(Representation r) {
999 bit_field_ = RepresentationBits::update(bit_field_, r.kind()); 998 bit_field_ = RepresentationBits::update(bit_field_, r.kind());
1000 } 999 }
1001 1000
1002 private: 1001 private:
1003 virtual int NotMissMinorKey() { return GetExtraICState(); } 1002 virtual int NotMissMinorKey() { return GetExtraICState(); }
1004 Major MajorKey() { return StoreGlobal; } 1003 Major MajorKey() { return StoreGlobal; }
1005 1004
1006 class StrictModeBits: public BitField<StrictModeFlag, 0, 1> {}; 1005 class IsConstantBits: public BitField<bool, 0, 1> {};
1007 class IsConstantBits: public BitField<bool, 1, 1> {}; 1006 class RepresentationBits: public BitField<Representation::Kind, 1, 8> {};
1008 class RepresentationBits: public BitField<Representation::Kind, 2, 8> {};
1009 1007
1010 int bit_field_; 1008 int bit_field_;
1011 1009
1012 DISALLOW_COPY_AND_ASSIGN(StoreGlobalStub); 1010 DISALLOW_COPY_AND_ASSIGN(StoreGlobalStub);
1013 }; 1011 };
1014 1012
1015 1013
1016 class KeyedLoadFieldStub: public LoadFieldStub { 1014 class KeyedLoadFieldStub: public LoadFieldStub {
1017 public: 1015 public:
1018 KeyedLoadFieldStub(bool inobject, int index, Representation representation) 1016 KeyedLoadFieldStub(bool inobject, int index, Representation representation)
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after
2514 int MinorKey() { return 0; } 2512 int MinorKey() { return 0; }
2515 2513
2516 void Generate(MacroAssembler* masm); 2514 void Generate(MacroAssembler* masm);
2517 2515
2518 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 2516 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
2519 }; 2517 };
2520 2518
2521 } } // namespace v8::internal 2519 } } // namespace v8::internal
2522 2520
2523 #endif // V8_CODE_STUBS_H_ 2521 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698