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

Unified Diff: src/code-stubs.h

Issue 11659022: Generate the TransitionElementsStub using Crankshaft (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review feedback 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/macro-assembler-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 bd572c2f26b93e6ab5cb2d9e247529c32ff2b18f..1b160c40fa0495af5119e7b7eeaa77379d4cb213 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -77,6 +77,7 @@ namespace internal {
V(DebuggerStatement) \
V(StringDictionaryLookup) \
V(ElementsTransitionAndStore) \
+ V(TransitionElementsKind) \
V(StoreArrayLiteralElement) \
V(StubFailureTrampoline) \
V(ProfileEntryHook)
@@ -1218,6 +1219,40 @@ class KeyedLoadFastElementStub : public HydrogenCodeStub {
};
+class TransitionElementsKindStub : public HydrogenCodeStub {
+ public:
+ TransitionElementsKindStub(ElementsKind from_kind,
+ ElementsKind to_kind) {
+ bit_field_ = FromKindBits::encode(from_kind) |
+ ToKindBits::encode(to_kind);
+ }
+
+ Major MajorKey() { return TransitionElementsKind; }
+ int MinorKey() { return bit_field_; }
+
+ ElementsKind from_kind() const {
+ return FromKindBits::decode(bit_field_);
+ }
+
+ ElementsKind to_kind() const {
+ return ToKindBits::decode(bit_field_);
+ }
+
+ virtual Handle<Code> GenerateCode();
+
+ virtual void InitializeInterfaceDescriptor(
+ Isolate* isolate,
+ CodeStubInterfaceDescriptor* descriptor);
+
+ private:
+ class FromKindBits: public BitField<ElementsKind, 8, 8> {};
+ class ToKindBits: public BitField<ElementsKind, 0, 8> {};
+ uint32_t bit_field_;
+
+ DISALLOW_COPY_AND_ASSIGN(TransitionElementsKindStub);
+};
+
+
class KeyedStoreElementStub : public PlatformCodeStub {
public:
KeyedStoreElementStub(bool is_js_array,
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698