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

Unified Diff: src/code-stubs.h

Issue 7036016: Reland 7917: (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixes to make re-land work 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index f16a8db82598446ad057d0825cd4850c65a7e3eb..9074793ffdd8786af73dac571afe0b25115e0ed5 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)
@@ -922,6 +926,86 @@ 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)
+};
+
+
+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_ ? 1 : 0; }
+
+ 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_
« no previous file with comments | « src/builtins.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698