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

Unified Diff: src/code-stubs.h

Issue 12220074: Compile FastCloneShallowObjectStub using Crankshaft. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Created 7 years, 10 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/lithium-codegen-arm.cc ('k') | src/code-stubs-hydrogen.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 c06502aa2294ba9e8549d50905e501ce4625373a..e681a70a365250904ae3b6260613313298dfc167 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -264,8 +264,6 @@ struct CodeStubInterfaceDescriptor {
};
-class HGraph;
-struct Register;
class HydrogenCodeStub : public CodeStub {
public:
// Retrieve the code for the stub. Generate the code if needed.
@@ -475,7 +473,7 @@ class FastCloneShallowArrayStub : public PlatformCodeStub {
};
-class FastCloneShallowObjectStub : public PlatformCodeStub {
+class FastCloneShallowObjectStub : public HydrogenCodeStub {
public:
// Maximum number of properties in copied object.
static const int kMaximumClonedProperties = 6;
@@ -485,13 +483,21 @@ class FastCloneShallowObjectStub : public PlatformCodeStub {
ASSERT_LE(length_, kMaximumClonedProperties);
}
- void Generate(MacroAssembler* masm);
+ int length() const { return length_; }
+
+ virtual Handle<Code> GenerateCode();
+
+ virtual void InitializeInterfaceDescriptor(
+ Isolate* isolate,
+ CodeStubInterfaceDescriptor* descriptor);
private:
int length_;
Major MajorKey() { return FastCloneShallowObject; }
int MinorKey() { return length_; }
+
+ DISALLOW_COPY_AND_ASSIGN(FastCloneShallowObjectStub);
};
@@ -1222,9 +1228,6 @@ class KeyedLoadFastElementStub : public HydrogenCodeStub {
IsJSArrayBits::encode(is_js_array);
}
- Major MajorKey() { return KeyedLoadElement; }
- int MinorKey() { return bit_field_; }
-
bool is_js_array() const {
return IsJSArrayBits::decode(bit_field_);
}
@@ -1244,6 +1247,9 @@ class KeyedLoadFastElementStub : public HydrogenCodeStub {
class ElementsKindBits: public BitField<ElementsKind, 0, 8> {};
uint32_t bit_field_;
+ Major MajorKey() { return KeyedLoadElement; }
+ int MinorKey() { return bit_field_; }
+
DISALLOW_COPY_AND_ASSIGN(KeyedLoadFastElementStub);
};
@@ -1256,9 +1262,6 @@ class TransitionElementsKindStub : public HydrogenCodeStub {
ToKindBits::encode(to_kind);
}
- Major MajorKey() { return TransitionElementsKind; }
- int MinorKey() { return bit_field_; }
-
ElementsKind from_kind() const {
return FromKindBits::decode(bit_field_);
}
@@ -1278,6 +1281,9 @@ class TransitionElementsKindStub : public HydrogenCodeStub {
class ToKindBits: public BitField<ElementsKind, 0, 8> {};
uint32_t bit_field_;
+ Major MajorKey() { return TransitionElementsKind; }
+ int MinorKey() { return bit_field_; }
+
DISALLOW_COPY_AND_ASSIGN(TransitionElementsKindStub);
};
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698