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