OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_CODE_STUBS_H_ | 5 #ifndef V8_CODE_STUBS_H_ |
6 #define V8_CODE_STUBS_H_ | 6 #define V8_CODE_STUBS_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 V(CreateAllocationSite) \ | 46 V(CreateAllocationSite) \ |
47 V(ToBoolean) \ | 47 V(ToBoolean) \ |
48 V(ToNumber) \ | 48 V(ToNumber) \ |
49 V(ArgumentsAccess) \ | 49 V(ArgumentsAccess) \ |
50 V(RegExpConstructResult) \ | 50 V(RegExpConstructResult) \ |
51 V(NumberToString) \ | 51 V(NumberToString) \ |
52 V(DoubleToI) \ | 52 V(DoubleToI) \ |
53 V(CEntry) \ | 53 V(CEntry) \ |
54 V(JSEntry) \ | 54 V(JSEntry) \ |
55 V(KeyedLoadElement) \ | 55 V(KeyedLoadElement) \ |
| 56 V(KeyedLoadGeneric) \ |
56 V(ArrayNoArgumentConstructor) \ | 57 V(ArrayNoArgumentConstructor) \ |
57 V(ArraySingleArgumentConstructor) \ | 58 V(ArraySingleArgumentConstructor) \ |
58 V(ArrayNArgumentsConstructor) \ | 59 V(ArrayNArgumentsConstructor) \ |
59 V(InternalArrayNoArgumentConstructor) \ | 60 V(InternalArrayNoArgumentConstructor) \ |
60 V(InternalArraySingleArgumentConstructor) \ | 61 V(InternalArraySingleArgumentConstructor) \ |
61 V(InternalArrayNArgumentsConstructor) \ | 62 V(InternalArrayNArgumentsConstructor) \ |
62 V(KeyedStoreElement) \ | 63 V(KeyedStoreElement) \ |
63 V(DebuggerStatement) \ | 64 V(DebuggerStatement) \ |
64 V(NameDictionaryLookup) \ | 65 V(NameDictionaryLookup) \ |
65 V(ElementsTransitionAndStore) \ | 66 V(ElementsTransitionAndStore) \ |
(...skipping 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1838 void Generate(MacroAssembler* masm); | 1839 void Generate(MacroAssembler* masm); |
1839 | 1840 |
1840 private: | 1841 private: |
1841 Major MajorKey() { return KeyedLoadElement; } | 1842 Major MajorKey() { return KeyedLoadElement; } |
1842 int MinorKey() { return DICTIONARY_ELEMENTS; } | 1843 int MinorKey() { return DICTIONARY_ELEMENTS; } |
1843 | 1844 |
1844 DISALLOW_COPY_AND_ASSIGN(KeyedLoadDictionaryElementPlatformStub); | 1845 DISALLOW_COPY_AND_ASSIGN(KeyedLoadDictionaryElementPlatformStub); |
1845 }; | 1846 }; |
1846 | 1847 |
1847 | 1848 |
| 1849 class KeyedLoadGenericElementStub : public HydrogenCodeStub { |
| 1850 public: |
| 1851 explicit KeyedLoadGenericElementStub(Isolate *isolate) |
| 1852 : HydrogenCodeStub(isolate) {} |
| 1853 |
| 1854 virtual Handle<Code> GenerateCode() V8_OVERRIDE; |
| 1855 |
| 1856 virtual void InitializeInterfaceDescriptor( |
| 1857 CodeStubInterfaceDescriptor* descriptor) V8_OVERRIDE; |
| 1858 |
| 1859 static void InstallDescriptors(Isolate* isolate); |
| 1860 |
| 1861 virtual Code::Kind GetCodeKind() const { return Code::KEYED_LOAD_IC; } |
| 1862 virtual InlineCacheState GetICState() { return GENERIC; } |
| 1863 |
| 1864 private: |
| 1865 Major MajorKey() { return KeyedLoadGeneric; } |
| 1866 int NotMissMinorKey() { return 0; } |
| 1867 |
| 1868 DISALLOW_COPY_AND_ASSIGN(KeyedLoadGenericElementStub); |
| 1869 }; |
| 1870 |
| 1871 |
1848 class DoubleToIStub : public PlatformCodeStub { | 1872 class DoubleToIStub : public PlatformCodeStub { |
1849 public: | 1873 public: |
1850 DoubleToIStub(Isolate* isolate, | 1874 DoubleToIStub(Isolate* isolate, |
1851 Register source, | 1875 Register source, |
1852 Register destination, | 1876 Register destination, |
1853 int offset, | 1877 int offset, |
1854 bool is_truncating, | 1878 bool is_truncating, |
1855 bool skip_fastpath = false) | 1879 bool skip_fastpath = false) |
1856 : PlatformCodeStub(isolate), bit_field_(0) { | 1880 : PlatformCodeStub(isolate), bit_field_(0) { |
1857 bit_field_ = SourceRegisterBits::encode(source.code()) | | 1881 bit_field_ = SourceRegisterBits::encode(source.code()) | |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2459 | 2483 |
2460 | 2484 |
2461 class CallDescriptors { | 2485 class CallDescriptors { |
2462 public: | 2486 public: |
2463 static void InitializeForIsolate(Isolate* isolate); | 2487 static void InitializeForIsolate(Isolate* isolate); |
2464 }; | 2488 }; |
2465 | 2489 |
2466 } } // namespace v8::internal | 2490 } } // namespace v8::internal |
2467 | 2491 |
2468 #endif // V8_CODE_STUBS_H_ | 2492 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |