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

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

Issue 6932010: Unroll more StringDictionary lookup probes both for positive and negative dictionary lookups. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: revive inlined portions Created 9 years, 7 months 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
OLDNEW
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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 417
418 const char* GetName() { return "NumberToStringStub"; } 418 const char* GetName() { return "NumberToStringStub"; }
419 419
420 #ifdef DEBUG 420 #ifdef DEBUG
421 void Print() { 421 void Print() {
422 PrintF("NumberToStringStub\n"); 422 PrintF("NumberToStringStub\n");
423 } 423 }
424 #endif 424 #endif
425 }; 425 };
426 426
427
428
429 class StringDictionaryLookupStub: public CodeStub {
430 public:
431 enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP };
432
433 StringDictionaryLookupStub(Register dictionary,
434 Register result,
435 Register index,
436 LookupMode mode)
437 : dictionary_(dictionary), result_(result), index_(index), mode_(mode) { }
438
439 void Generate(MacroAssembler* masm);
440
441 private:
442
443 #ifdef DEBUG
444 void Print() {
445 PrintF("StringDictionaryLookupStub\n");
446 }
447 #endif
448
449 Major MajorKey() { return StringDictionaryNegativeLookup; }
450
451 int MinorKey() {
452 return DictionaryBits::encode(dictionary_.code()) |
453 ResultBits::encode(result_.code()) |
454 IndexBits::encode(index_.code()) |
455 LookupModeBits::encode(mode_);
456 }
457
458 class DictionaryBits: public BitField<int, 0, 3> {};
459 class ResultBits: public BitField<int, 3, 3> {};
460 class IndexBits: public BitField<int, 6, 3> {};
461 class LookupModeBits: public BitField<LookupMode, 9, 1> {};
462
463 Register dictionary_;
464 Register result_;
465 Register index_;
466 LookupMode mode_;
467 };
468
469
427 } } // namespace v8::internal 470 } } // namespace v8::internal
428 471
429 #endif // V8_IA32_CODE_STUBS_IA32_H_ 472 #endif // V8_IA32_CODE_STUBS_IA32_H_
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | src/ia32/stub-cache-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698