Chromium Code Reviews| Index: src/ia32/code-stubs-ia32.h |
| diff --git a/src/ia32/code-stubs-ia32.h b/src/ia32/code-stubs-ia32.h |
| index 816f9b8a976359059cb3a0b828771473f60105f2..1c7c47a1ac8900bf5755043fb56981e3fd9eaf4f 100644 |
| --- a/src/ia32/code-stubs-ia32.h |
| +++ b/src/ia32/code-stubs-ia32.h |
| @@ -377,6 +377,13 @@ class StringCompareStub: public CodeStub { |
| Register scratch1, |
| Register scratch2); |
| + static void GenerateFlatAsciiStringEquals(MacroAssembler* masm, |
| + Register left, |
| + Register right, |
| + Register scratch1, |
| + Register scratch2, |
| + Label* strings_not_equal); |
| + |
| private: |
| virtual Major MajorKey() { return StringCompare; } |
| virtual int MinorKey() { return 0; } |
| @@ -446,6 +453,16 @@ class StringDictionaryLookupStub: public CodeStub { |
| Register r0, |
| Register r1); |
| + static void GenerateLookupWithComparisons(MacroAssembler* masm, |
| + Register dictionary, |
| + Register name, |
| + Register scratch1, |
| + Register scratch2, |
| + Register scratch3, |
| + Label* found_in_dictionary, |
| + Label* not_found_in_dictionary, |
| + Label* call_runtime); |
| + |
| private: |
| static const int kInlinedProbes = 4; |
| static const int kTotalProbes = 20; |
| @@ -458,6 +475,11 @@ class StringDictionaryLookupStub: public CodeStub { |
| StringDictionary::kHeaderSize + |
| StringDictionary::kElementsStartIndex * kPointerSize; |
| + enum NameType { |
| + NAME_IS_ASCII_STRING_WITH_HASH, |
| + NAME_IS_ASCII_SYMBOL |
| + }; |
| + |
| Major MajorKey() { return StringDictionaryNegativeLookup; } |
| int MinorKey() { |
| @@ -467,6 +489,17 @@ class StringDictionaryLookupStub: public CodeStub { |
| LookupModeBits::encode(mode_); |
| } |
| + static void GenerateUnrolledComparisons(MacroAssembler* masm, |
| + NameType name_type, |
| + Register dictionary, |
| + Register name, |
| + Register scratch1, |
| + Register scratch2, |
| + Register scratch3, |
| + Label* found_in_dictionary, |
| + Label* not_found_in_dictionary, |
| + Label* call_runtime); |
| + |
| class DictionaryBits: public BitField<int, 0, 3> {}; |
| class ResultBits: public BitField<int, 3, 3> {}; |
| class IndexBits: public BitField<int, 6, 3> {}; |
| @@ -479,6 +512,52 @@ class StringDictionaryLookupStub: public CodeStub { |
| }; |
| +class HasOwnPropertyStub: public CodeStub { |
| + public: |
| + HasOwnPropertyStub() {} |
| + |
| + virtual void Generate(MacroAssembler* masm); |
| + virtual Major MajorKey() { return HasOwnProperty; } |
| + virtual int MinorKey() { return 0; } |
| + |
| + private: |
| + enum NameType { |
| + NAME_IS_SYMBOL, |
| + NAME_IS_SEQUENTIAL_ASCII |
| + }; |
| + |
| + void GenerateFastPropertiesCase(MacroAssembler* masm, |
| + Register map, |
| + Register name, |
| + Register scratch1, |
| + Register scratch2, |
| + Register scratch3, |
| + Label* call_runtime); |
| + |
| + void GenerateSlowPropertiesCase(MacroAssembler* masm, |
| + Register object, |
| + Register name, |
| + Register scratch1, |
| + Register scratch2, |
| + Register scratch3, |
| + Label* call_runtime); |
| + |
| + // Generates a lookup in the descriptor array. Generated code |
| + // returns true if the property is found, jumps to the given label |
|
Mads Ager (chromium)
2011/07/15 09:04:45
the given label -> the not_found_in_descriptors la
|
| + // otherwise. |
| + void GenerateDescriptorArrayLookup(MacroAssembler* masm, |
| + NameType name_type, |
| + Register descriptor_array, |
| + Register name, |
| + Register scratch1, |
| + Register scratch2, |
| + Register scratch3, |
| + Label* not_found_in_descriptors, |
| + Label* call_runtime); |
| + |
| + DISALLOW_COPY_AND_ASSIGN(HasOwnPropertyStub); |
| +}; |
| + |
| } } // namespace v8::internal |
| #endif // V8_IA32_CODE_STUBS_IA32_H_ |