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

Unified Diff: src/code-stubs.h

Issue 7227010: Create and use shared stub for for DictionaryValue-based elements. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: more arm fixes Created 9 years, 5 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/arm/stub-cache-arm.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 3a756585e574ead45594e3c18e662ce1b8441694..486790e6b74d694cc9179758f32b87c2fe6a11ca 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -70,10 +70,8 @@ namespace internal {
V(NumberToString) \
V(CEntry) \
V(JSEntry) \
- V(KeyedLoadFastElement) \
- V(KeyedStoreFastElement) \
- V(KeyedLoadExternalArray) \
- V(KeyedStoreExternalArray) \
+ V(KeyedLoadElement) \
+ V(KeyedStoreElement) \
V(DebuggerStatement) \
V(StringDictionaryNegativeLookup)
@@ -928,76 +926,51 @@ class AllowStubCallsScope {
#endif
-class KeyedLoadFastElementStub : public CodeStub {
+class KeyedLoadElementStub : 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)
-};
-
+ explicit KeyedLoadElementStub(JSObject::ElementsKind elements_kind)
+ : elements_kind_(elements_kind)
+ { }
-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(JSObject::ElementsKind elements_kind)
- : elements_kind_(elements_kind) { }
-
- Major MajorKey() { return KeyedLoadExternalArray; }
+ Major MajorKey() { return KeyedLoadElement; }
int MinorKey() { return elements_kind_; }
void Generate(MacroAssembler* masm);
- const char* GetName() { return "KeyedLoadExternalArrayStub"; }
+ const char* GetName() { return "KeyedLoadElementStub"; }
- DECLARE_ARRAY_STUB_PRINT(KeyedLoadExternalArrayStub)
+ DECLARE_ARRAY_STUB_PRINT(KeyedLoadElementStub)
- protected:
+ private:
JSObject::ElementsKind elements_kind_;
+
+ DISALLOW_COPY_AND_ASSIGN(KeyedLoadElementStub);
};
-class KeyedStoreExternalArrayStub : public CodeStub {
+class KeyedStoreElementStub : public CodeStub {
public:
- explicit KeyedStoreExternalArrayStub(JSObject::ElementsKind elements_kind)
- : elements_kind_(elements_kind) { }
+ KeyedStoreElementStub(bool is_js_array,
+ JSObject::ElementsKind elements_kind)
+ : is_js_array_(is_js_array),
+ elements_kind_(elements_kind) { }
- Major MajorKey() { return KeyedStoreExternalArray; }
- int MinorKey() { return elements_kind_; }
+ Major MajorKey() { return KeyedStoreElement; }
+ int MinorKey() {
+ return (is_js_array_ ? 0 : JSObject::kElementsKindCount) + elements_kind_;
+ }
void Generate(MacroAssembler* masm);
- const char* GetName() { return "KeyedStoreExternalArrayStub"; }
+ const char* GetName() { return "KeyedStoreElementStub"; }
- DECLARE_ARRAY_STUB_PRINT(KeyedStoreExternalArrayStub)
+ DECLARE_ARRAY_STUB_PRINT(KeyedStoreElementStub)
- protected:
+ private:
+ bool is_js_array_;
JSObject::ElementsKind elements_kind_;
+
+ DISALLOW_COPY_AND_ASSIGN(KeyedStoreElementStub);
};
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698