Chromium Code Reviews| Index: src/code-stubs.h |
| diff --git a/src/code-stubs.h b/src/code-stubs.h |
| index 05750f535f6677ba97788f4040a1510316a014f5..78d24c25abb1db291640e3ca60e299cf9b30ef01 100644 |
| --- a/src/code-stubs.h |
| +++ b/src/code-stubs.h |
| @@ -66,6 +66,10 @@ namespace internal { |
| V(NumberToString) \ |
| V(CEntry) \ |
| V(JSEntry) \ |
| + V(KeyedLoadFastElement) \ |
| + V(KeyedStoreFastElement) \ |
| + V(KeyedLoadExternalArray) \ |
| + V(KeyedStoreExternalArray) \ |
| V(DebuggerStatement) \ |
| V(StringDictionaryNegativeLookup) |
| @@ -921,6 +925,89 @@ class AllowStubCallsScope { |
| DISALLOW_COPY_AND_ASSIGN(AllowStubCallsScope); |
| }; |
| +#ifdef DEBUG |
| +#define DECLARE_ARRAY_STUB_PRINT(name) void Print() { PrintF(#name); } |
| +#else |
| +#define DECLARE_ARRAY_STUB_PRINT(name) |
| +#endif |
| + |
| + |
| +class KeyedLoadFastElementStub : public CodeStub { |
| + public: |
| + explicit KeyedLoadFastElementStub() { |
| + } |
| + |
| + Major MajorKey() { return KeyedLoadFastElement; } |
| + int MinorKey() { return 0; } |
| + |
| + void Generate(MacroAssembler* masm); |
| + |
| + const char* GetName() { return "KeyedLoadFastElementStub"; } |
| + |
| + DECLARE_ARRAY_STUB_PRINT(KeyedLoadFastElementStub) |
| + |
| + private: |
| + bool is_js_array_; |
|
Mads Ager (chromium)
2011/05/12 09:42:47
Remove, this is unused?
danno
2011/06/01 13:16:08
Done.
|
| +}; |
| + |
| + |
| +class KeyedStoreFastElementStub : public CodeStub { |
| + public: |
| + explicit KeyedStoreFastElementStub(bool is_js_array) |
| + : is_js_array_(is_js_array) { } |
| + |
| + Major MajorKey() { return KeyedStoreFastElement; } |
| + int MinorKey() { return is_js_array_; } |
|
Mads Ager (chromium)
2011/05/12 09:42:47
Let's do an explicit type conversion here:
return
danno
2011/06/01 13:16:08
Done.
|
| + |
| + void Generate(MacroAssembler* masm); |
| + |
| + const char* GetName() { return "KeyedStoreFastElementStub"; } |
| + |
| + DECLARE_ARRAY_STUB_PRINT(KeyedStoreFastElementStub) |
| + |
| + private: |
| + bool is_js_array_; |
| +}; |
| + |
| + |
| +class KeyedLoadExternalArrayStub : public CodeStub { |
| + public: |
| + explicit KeyedLoadExternalArrayStub(ExternalArrayType array_type) |
| + : array_type_(array_type) { } |
| + |
| + Major MajorKey() { return KeyedLoadExternalArray; } |
| + int MinorKey() { return array_type_; } |
| + |
| + void Generate(MacroAssembler* masm); |
| + |
| + const char* GetName() { return "KeyedLoadExternalArrayStub"; } |
| + |
| + DECLARE_ARRAY_STUB_PRINT(KeyedLoadExternalArrayStub) |
| + |
| + protected: |
| + ExternalArrayType array_type_; |
| +}; |
| + |
| + |
| +class KeyedStoreExternalArrayStub : public CodeStub { |
| + public: |
| + explicit KeyedStoreExternalArrayStub(ExternalArrayType array_type) |
| + : array_type_(array_type) { } |
| + |
| + Major MajorKey() { return KeyedStoreExternalArray; } |
| + int MinorKey() { return array_type_; } |
| + |
| + void Generate(MacroAssembler* masm); |
| + |
| + const char* GetName() { return "KeyedStoreExternalArrayStub"; } |
| + |
| + DECLARE_ARRAY_STUB_PRINT(KeyedStoreExternalArrayStub) |
| + |
| + protected: |
| + ExternalArrayType array_type_; |
| +}; |
| + |
| + |
| } } // namespace v8::internal |
| #endif // V8_CODE_STUBS_H_ |