Index: src/ia32/code-stubs-ia32.h |
diff --git a/src/ia32/code-stubs-ia32.h b/src/ia32/code-stubs-ia32.h |
index dcbcc61acb0e049b257ac90000b2b49d3b73a37a..f48bcddfb0ebb2c40b2374993012f72fc2330227 100644 |
--- a/src/ia32/code-stubs-ia32.h |
+++ b/src/ia32/code-stubs-ia32.h |
@@ -424,6 +424,49 @@ class NumberToStringStub: public CodeStub { |
#endif |
}; |
+ |
+ |
+class StringDictionaryLookupStub: public CodeStub { |
+ public: |
+ enum LookupMode { POSITIVE_LOOKUP, NEGATIVE_LOOKUP }; |
+ |
+ StringDictionaryLookupStub(Register dictionary, |
+ Register result, |
+ Register index, |
+ LookupMode mode) |
+ : dictionary_(dictionary), result_(result), index_(index), mode_(mode) { } |
+ |
+ void Generate(MacroAssembler* masm); |
+ |
+ private: |
+ |
+#ifdef DEBUG |
+ void Print() { |
+ PrintF("StringDictionaryLookupStub\n"); |
+ } |
+#endif |
+ |
+ Major MajorKey() { return StringDictionaryNegativeLookup; } |
+ |
+ int MinorKey() { |
+ return DictionaryBits::encode(dictionary_.code()) | |
+ ResultBits::encode(result_.code()) | |
+ IndexBits::encode(index_.code()) | |
+ LookupModeBits::encode(mode_); |
+ } |
+ |
+ class DictionaryBits: public BitField<int, 0, 3> {}; |
+ class ResultBits: public BitField<int, 3, 3> {}; |
+ class IndexBits: public BitField<int, 6, 3> {}; |
+ class LookupModeBits: public BitField<LookupMode, 9, 1> {}; |
+ |
+ Register dictionary_; |
+ Register result_; |
+ Register index_; |
+ LookupMode mode_; |
+}; |
+ |
+ |
} } // namespace v8::internal |
#endif // V8_IA32_CODE_STUBS_IA32_H_ |