| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 Register hash, | 309 Register hash, |
| 310 Register mask); | 310 Register mask); |
| 311 | 311 |
| 312 Major MajorKey() { return NumberToString; } | 312 Major MajorKey() { return NumberToString; } |
| 313 int MinorKey() { return 0; } | 313 int MinorKey() { return 0; } |
| 314 | 314 |
| 315 void Generate(MacroAssembler* masm); | 315 void Generate(MacroAssembler* masm); |
| 316 }; | 316 }; |
| 317 | 317 |
| 318 | 318 |
| 319 class StringDictionaryLookupStub: public PlatformCodeStub { | 319 class NameDictionaryLookupStub: public PlatformCodeStub { |
| 320 public: | 320 public: |
| 321 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; | 321 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; |
| 322 | 322 |
| 323 StringDictionaryLookupStub(Register dictionary, | 323 NameDictionaryLookupStub(Register dictionary, |
| 324 Register result, | 324 Register result, |
| 325 Register index, | 325 Register index, |
| 326 LookupMode mode) | 326 LookupMode mode) |
| 327 : dictionary_(dictionary), result_(result), index_(index), mode_(mode) { } | 327 : dictionary_(dictionary), result_(result), index_(index), mode_(mode) { } |
| 328 | 328 |
| 329 void Generate(MacroAssembler* masm); | 329 void Generate(MacroAssembler* masm); |
| 330 | 330 |
| 331 static void GenerateNegativeLookup(MacroAssembler* masm, | 331 static void GenerateNegativeLookup(MacroAssembler* masm, |
| 332 Label* miss, | 332 Label* miss, |
| 333 Label* done, | 333 Label* done, |
| 334 Register properties, | 334 Register properties, |
| 335 Handle<String> name, | 335 Handle<Name> name, |
| 336 Register r0); | 336 Register r0); |
| 337 | 337 |
| 338 static void GeneratePositiveLookup(MacroAssembler* masm, | 338 static void GeneratePositiveLookup(MacroAssembler* masm, |
| 339 Label* miss, | 339 Label* miss, |
| 340 Label* done, | 340 Label* done, |
| 341 Register elements, | 341 Register elements, |
| 342 Register name, | 342 Register name, |
| 343 Register r0, | 343 Register r0, |
| 344 Register r1); | 344 Register r1); |
| 345 | 345 |
| 346 virtual bool SometimesSetsUpAFrame() { return false; } | 346 virtual bool SometimesSetsUpAFrame() { return false; } |
| 347 | 347 |
| 348 private: | 348 private: |
| 349 static const int kInlinedProbes = 4; | 349 static const int kInlinedProbes = 4; |
| 350 static const int kTotalProbes = 20; | 350 static const int kTotalProbes = 20; |
| 351 | 351 |
| 352 static const int kCapacityOffset = | 352 static const int kCapacityOffset = |
| 353 StringDictionary::kHeaderSize + | 353 NameDictionary::kHeaderSize + |
| 354 StringDictionary::kCapacityIndex * kPointerSize; | 354 NameDictionary::kCapacityIndex * kPointerSize; |
| 355 | 355 |
| 356 static const int kElementsStartOffset = | 356 static const int kElementsStartOffset = |
| 357 StringDictionary::kHeaderSize + | 357 NameDictionary::kHeaderSize + |
| 358 StringDictionary::kElementsStartIndex * kPointerSize; | 358 NameDictionary::kElementsStartIndex * kPointerSize; |
| 359 | 359 |
| 360 Major MajorKey() { return StringDictionaryLookup; } | 360 Major MajorKey() { return NameDictionaryLookup; } |
| 361 | 361 |
| 362 int MinorKey() { | 362 int MinorKey() { |
| 363 return DictionaryBits::encode(dictionary_.code()) | | 363 return DictionaryBits::encode(dictionary_.code()) | |
| 364 ResultBits::encode(result_.code()) | | 364 ResultBits::encode(result_.code()) | |
| 365 IndexBits::encode(index_.code()) | | 365 IndexBits::encode(index_.code()) | |
| 366 LookupModeBits::encode(mode_); | 366 LookupModeBits::encode(mode_); |
| 367 } | 367 } |
| 368 | 368 |
| 369 class DictionaryBits: public BitField<int, 0, 4> {}; | 369 class DictionaryBits: public BitField<int, 0, 4> {}; |
| 370 class ResultBits: public BitField<int, 4, 4> {}; | 370 class ResultBits: public BitField<int, 4, 4> {}; |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 RememberedSetAction remembered_set_action_; | 614 RememberedSetAction remembered_set_action_; |
| 615 SaveFPRegsMode save_fp_regs_mode_; | 615 SaveFPRegsMode save_fp_regs_mode_; |
| 616 Label slow_; | 616 Label slow_; |
| 617 RegisterAllocation regs_; | 617 RegisterAllocation regs_; |
| 618 }; | 618 }; |
| 619 | 619 |
| 620 | 620 |
| 621 } } // namespace v8::internal | 621 } } // namespace v8::internal |
| 622 | 622 |
| 623 #endif // V8_X64_CODE_STUBS_X64_H_ | 623 #endif // V8_X64_CODE_STUBS_X64_H_ |
| OLD | NEW |