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