OLD | NEW |
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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 Isolate* isolate, | 1080 Isolate* isolate, |
1081 CodeStubInterfaceDescriptor* descriptor); | 1081 CodeStubInterfaceDescriptor* descriptor); |
1082 | 1082 |
1083 virtual Handle<Code> GenerateCode(Isolate* isolate); | 1083 virtual Handle<Code> GenerateCode(Isolate* isolate); |
1084 | 1084 |
1085 private: | 1085 private: |
1086 virtual int NotMissMinorKey() { | 1086 virtual int NotMissMinorKey() { |
1087 return GetExtraICState() | ArgcBits::encode(argc_); | 1087 return GetExtraICState() | ArgcBits::encode(argc_); |
1088 } | 1088 } |
1089 | 1089 |
1090 // We have to start storing extra ic bits at 1, because calls use bit zero | 1090 class HoleyBits: public BitField<bool, 0, 1> {}; |
1091 // for string stub state. | 1091 STATIC_ASSERT(Code::kArgumentsBits <= kStubMinorKeyBits - 1); |
1092 STATIC_ASSERT(CallICBase::StringStubState::kShift == 0); | 1092 class ArgcBits: public BitField<int, 1, Code::kArgumentsBits> {}; |
1093 STATIC_ASSERT(CallICBase::StringStubState::kSize == 1); | |
1094 class HoleyBits: public BitField<bool, 1, 1> {}; | |
1095 STATIC_ASSERT(Code::kArgumentsBits <= kStubMinorKeyBits - 2); | |
1096 class ArgcBits: public BitField<int, 2, Code::kArgumentsBits> {}; | |
1097 virtual CodeStub::Major MajorKey() { return KeyedArrayCall; } | 1093 virtual CodeStub::Major MajorKey() { return KeyedArrayCall; } |
1098 int bit_field_; | 1094 int bit_field_; |
1099 int argc_; | 1095 int argc_; |
1100 }; | 1096 }; |
1101 | 1097 |
1102 | 1098 |
1103 class BinaryOpICStub : public HydrogenCodeStub { | 1099 class BinaryOpICStub : public HydrogenCodeStub { |
1104 public: | 1100 public: |
1105 BinaryOpICStub(Token::Value op, OverwriteMode mode) | 1101 BinaryOpICStub(Token::Value op, OverwriteMode mode) |
1106 : HydrogenCodeStub(UNINITIALIZED), state_(op, mode) {} | 1102 : HydrogenCodeStub(UNINITIALIZED), state_(op, mode) {} |
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2470 | 2466 |
2471 | 2467 |
2472 class CallDescriptors { | 2468 class CallDescriptors { |
2473 public: | 2469 public: |
2474 static void InitializeForIsolate(Isolate* isolate); | 2470 static void InitializeForIsolate(Isolate* isolate); |
2475 }; | 2471 }; |
2476 | 2472 |
2477 } } // namespace v8::internal | 2473 } } // namespace v8::internal |
2478 | 2474 |
2479 #endif // V8_CODE_STUBS_H_ | 2475 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |