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

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

Issue 110183003: Increase number of available major keys. (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 | « no previous file | src/objects.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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698