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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 // If a stub uses a special cache override this. | 238 // If a stub uses a special cache override this. |
239 virtual bool UseSpecialCache() { return false; } | 239 virtual bool UseSpecialCache() { return false; } |
240 | 240 |
241 // Computes the key based on major and minor. | 241 // Computes the key based on major and minor. |
242 uint32_t GetKey() { | 242 uint32_t GetKey() { |
243 ASSERT(static_cast<int>(MajorKey()) < NUMBER_OF_IDS); | 243 ASSERT(static_cast<int>(MajorKey()) < NUMBER_OF_IDS); |
244 return MinorKeyBits::encode(MinorKey()) | | 244 return MinorKeyBits::encode(MinorKey()) | |
245 MajorKeyBits::encode(MajorKey()); | 245 MajorKeyBits::encode(MajorKey()); |
246 } | 246 } |
247 | 247 |
| 248 STATIC_ASSERT(NUMBER_OF_IDS < (1 << kStubMajorKeyBits)); |
248 class MajorKeyBits: public BitField<uint32_t, 0, kStubMajorKeyBits> {}; | 249 class MajorKeyBits: public BitField<uint32_t, 0, kStubMajorKeyBits> {}; |
249 class MinorKeyBits: public BitField<uint32_t, | 250 class MinorKeyBits: public BitField<uint32_t, |
250 kStubMajorKeyBits, kStubMinorKeyBits> {}; // NOLINT | 251 kStubMajorKeyBits, kStubMinorKeyBits> {}; // NOLINT |
251 | 252 |
252 friend class BreakPointIterator; | 253 friend class BreakPointIterator; |
253 }; | 254 }; |
254 | 255 |
255 | 256 |
256 class PlatformCodeStub : public CodeStub { | 257 class PlatformCodeStub : public CodeStub { |
257 public: | 258 public: |
(...skipping 2089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2347 int MinorKey() { return 0; } | 2348 int MinorKey() { return 0; } |
2348 | 2349 |
2349 void Generate(MacroAssembler* masm); | 2350 void Generate(MacroAssembler* masm); |
2350 | 2351 |
2351 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); | 2352 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
2352 }; | 2353 }; |
2353 | 2354 |
2354 } } // namespace v8::internal | 2355 } } // namespace v8::internal |
2355 | 2356 |
2356 #endif // V8_CODE_STUBS_H_ | 2357 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |