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

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

Issue 163363003: Don't mix handler flags into regular flag compuation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/builtins.cc ('k') | src/code-stubs.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 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 virtual InlineCacheState GetICState() { 182 virtual InlineCacheState GetICState() {
183 return UNINITIALIZED; 183 return UNINITIALIZED;
184 } 184 }
185 virtual ExtraICState GetExtraICState() { 185 virtual ExtraICState GetExtraICState() {
186 return kNoExtraICState; 186 return kNoExtraICState;
187 } 187 }
188 virtual Code::StubType GetStubType() { 188 virtual Code::StubType GetStubType() {
189 return Code::NORMAL; 189 return Code::NORMAL;
190 } 190 }
191 virtual Code::Kind GetHandlerKind() {
192 return Code::STUB;
193 }
194 191
195 virtual void PrintName(StringStream* stream); 192 virtual void PrintName(StringStream* stream);
196 193
197 // Returns a name for logging/debugging purposes. 194 // Returns a name for logging/debugging purposes.
198 SmartArrayPointer<const char> GetName(); 195 SmartArrayPointer<const char> GetName();
199 196
200 protected: 197 protected:
201 static bool CanUseFPRegisters(); 198 static bool CanUseFPRegisters();
202 199
203 // Generates the assembler code for the stub. 200 // Generates the assembler code for the stub.
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 875
879 protected: 876 protected:
880 class KindBits: public BitField<Code::Kind, 0, 4> {}; 877 class KindBits: public BitField<Code::Kind, 0, 4> {};
881 virtual Code::Kind kind() const = 0; 878 virtual Code::Kind kind() const = 0;
882 }; 879 };
883 880
884 881
885 class HandlerStub: public HICStub { 882 class HandlerStub: public HICStub {
886 public: 883 public:
887 virtual Code::Kind GetCodeKind() const { return Code::HANDLER; } 884 virtual Code::Kind GetCodeKind() const { return Code::HANDLER; }
888 virtual Code::Kind GetHandlerKind() { return kind(); } 885 virtual ExtraICState GetExtraICState() {
886 return Code::HandlerKindField::encode(kind());
887 }
889 888
890 protected: 889 protected:
891 HandlerStub() : HICStub() { } 890 HandlerStub() : HICStub() { }
892 virtual int NotMissMinorKey() { return bit_field_; } 891 virtual int NotMissMinorKey() { return bit_field_; }
893 int bit_field_; 892 int bit_field_;
894 }; 893 };
895 894
896 895
897 class LoadFieldStub: public HandlerStub { 896 class LoadFieldStub: public HandlerStub {
898 public: 897 public:
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 } 973 }
975 974
976 virtual Code::Kind kind() const { return Code::STORE_IC; } 975 virtual Code::Kind kind() const { return Code::STORE_IC; }
977 976
978 virtual Handle<Code> GenerateCode(Isolate* isolate); 977 virtual Handle<Code> GenerateCode(Isolate* isolate);
979 978
980 virtual void InitializeInterfaceDescriptor( 979 virtual void InitializeInterfaceDescriptor(
981 Isolate* isolate, 980 Isolate* isolate,
982 CodeStubInterfaceDescriptor* descriptor); 981 CodeStubInterfaceDescriptor* descriptor);
983 982
984 virtual ExtraICState GetExtraICState() { return bit_field_; }
985
986 bool is_constant() { 983 bool is_constant() {
987 return IsConstantBits::decode(bit_field_); 984 return IsConstantBits::decode(bit_field_);
988 } 985 }
989 void set_is_constant(bool value) { 986 void set_is_constant(bool value) {
990 bit_field_ = IsConstantBits::update(bit_field_, value); 987 bit_field_ = IsConstantBits::update(bit_field_, value);
991 } 988 }
992 989
993 Representation representation() { 990 Representation representation() {
994 return Representation::FromKind(RepresentationBits::decode(bit_field_)); 991 return Representation::FromKind(RepresentationBits::decode(bit_field_));
995 } 992 }
996 void set_representation(Representation r) { 993 void set_representation(Representation r) {
997 bit_field_ = RepresentationBits::update(bit_field_, r.kind()); 994 bit_field_ = RepresentationBits::update(bit_field_, r.kind());
998 } 995 }
999 996
1000 private: 997 private:
1001 virtual int NotMissMinorKey() { return GetExtraICState(); }
1002 Major MajorKey() { return StoreGlobal; } 998 Major MajorKey() { return StoreGlobal; }
1003 999
1004 class IsConstantBits: public BitField<bool, 0, 1> {}; 1000 class IsConstantBits: public BitField<bool, 0, 1> {};
1005 class RepresentationBits: public BitField<Representation::Kind, 1, 8> {}; 1001 class RepresentationBits: public BitField<Representation::Kind, 1, 8> {};
1006 1002
1007 int bit_field_;
1008
1009 DISALLOW_COPY_AND_ASSIGN(StoreGlobalStub); 1003 DISALLOW_COPY_AND_ASSIGN(StoreGlobalStub);
1010 }; 1004 };
1011 1005
1012 1006
1013 class CallApiFunctionStub : public PlatformCodeStub { 1007 class CallApiFunctionStub : public PlatformCodeStub {
1014 public: 1008 public:
1015 CallApiFunctionStub(bool restore_context, 1009 CallApiFunctionStub(bool restore_context,
1016 bool call_data_undefined, 1010 bool call_data_undefined,
1017 int argc) { 1011 int argc) {
1018 bit_field_ = 1012 bit_field_ =
(...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after
2476 2470
2477 2471
2478 class CallDescriptors { 2472 class CallDescriptors {
2479 public: 2473 public:
2480 static void InitializeForIsolate(Isolate* isolate); 2474 static void InitializeForIsolate(Isolate* isolate);
2481 }; 2475 };
2482 2476
2483 } } // namespace v8::internal 2477 } } // namespace v8::internal
2484 2478
2485 #endif // V8_CODE_STUBS_H_ 2479 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698