OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 Register r0); | 406 Register r0); |
407 | 407 |
408 static void GeneratePositiveLookup(MacroAssembler* masm, | 408 static void GeneratePositiveLookup(MacroAssembler* masm, |
409 Label* miss, | 409 Label* miss, |
410 Label* done, | 410 Label* done, |
411 Register elements, | 411 Register elements, |
412 Register name, | 412 Register name, |
413 Register r0, | 413 Register r0, |
414 Register r1); | 414 Register r1); |
415 | 415 |
| 416 virtual bool SometimesSetsUpAFrame() { return false; } |
| 417 |
416 private: | 418 private: |
417 static const int kInlinedProbes = 4; | 419 static const int kInlinedProbes = 4; |
418 static const int kTotalProbes = 20; | 420 static const int kTotalProbes = 20; |
419 | 421 |
420 static const int kCapacityOffset = | 422 static const int kCapacityOffset = |
421 StringDictionary::kHeaderSize + | 423 StringDictionary::kHeaderSize + |
422 StringDictionary::kCapacityIndex * kPointerSize; | 424 StringDictionary::kCapacityIndex * kPointerSize; |
423 | 425 |
424 static const int kElementsStartOffset = | 426 static const int kElementsStartOffset = |
425 StringDictionary::kHeaderSize + | 427 StringDictionary::kHeaderSize + |
426 StringDictionary::kElementsStartIndex * kPointerSize; | 428 StringDictionary::kElementsStartIndex * kPointerSize; |
427 | 429 |
428 Major MajorKey() { return StringDictionaryNegativeLookup; } | 430 Major MajorKey() { return StringDictionaryLookup; } |
429 | 431 |
430 int MinorKey() { | 432 int MinorKey() { |
431 return DictionaryBits::encode(dictionary_.code()) | | 433 return DictionaryBits::encode(dictionary_.code()) | |
432 ResultBits::encode(result_.code()) | | 434 ResultBits::encode(result_.code()) | |
433 IndexBits::encode(index_.code()) | | 435 IndexBits::encode(index_.code()) | |
434 LookupModeBits::encode(mode_); | 436 LookupModeBits::encode(mode_); |
435 } | 437 } |
436 | 438 |
437 class DictionaryBits: public BitField<int, 0, 4> {}; | 439 class DictionaryBits: public BitField<int, 0, 4> {}; |
438 class ResultBits: public BitField<int, 4, 4> {}; | 440 class ResultBits: public BitField<int, 4, 4> {}; |
439 class IndexBits: public BitField<int, 8, 4> {}; | 441 class IndexBits: public BitField<int, 8, 4> {}; |
440 class LookupModeBits: public BitField<LookupMode, 12, 1> {}; | 442 class LookupModeBits: public BitField<LookupMode, 12, 1> {}; |
441 | 443 |
442 Register dictionary_; | 444 Register dictionary_; |
443 Register result_; | 445 Register result_; |
444 Register index_; | 446 Register index_; |
445 LookupMode mode_; | 447 LookupMode mode_; |
446 }; | 448 }; |
447 | 449 |
448 | 450 |
449 } } // namespace v8::internal | 451 } } // namespace v8::internal |
450 | 452 |
451 #endif // V8_X64_CODE_STUBS_X64_H_ | 453 #endif // V8_X64_CODE_STUBS_X64_H_ |
OLD | NEW |