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

Unified Diff: src/code-stubs.h

Issue 726693004: Re-land r25392 Use a stub in crankshaft for grow store arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix. Created 6 years, 1 month 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/arm64/interface-descriptors-arm64.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 7a6ad6ad6e83c27b225ce90ba2a5a5f1bfebf7db..bf87a0d157449b26e12b373d0d7aaf15763021be 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -65,6 +65,7 @@ namespace internal {
V(FastCloneShallowObject) \
V(FastNewClosure) \
V(FastNewContext) \
+ V(GrowArrayElements) \
V(InternalArrayNArgumentsConstructor) \
V(InternalArrayNoArgumentConstructor) \
V(InternalArraySingleArgumentConstructor) \
@@ -662,6 +663,29 @@ class CreateAllocationSiteStub : public HydrogenCodeStub {
};
+class GrowArrayElementsStub : public HydrogenCodeStub {
+ public:
+ GrowArrayElementsStub(Isolate* isolate, bool is_js_array, ElementsKind kind)
+ : HydrogenCodeStub(isolate) {
+ set_sub_minor_key(ElementsKindBits::encode(kind) |
+ IsJsArrayBits::encode(is_js_array));
+ }
+
+ ElementsKind elements_kind() const {
+ return ElementsKindBits::decode(sub_minor_key());
+ }
+
+ bool is_js_array() const { return IsJsArrayBits::decode(sub_minor_key()); }
+
+ private:
+ class ElementsKindBits : public BitField<ElementsKind, 0, 8> {};
+ class IsJsArrayBits : public BitField<bool, ElementsKindBits::kNext, 1> {};
+
+ DEFINE_CALL_INTERFACE_DESCRIPTOR(GrowArrayElements);
+ DEFINE_HYDROGEN_CODE_STUB(GrowArrayElements, HydrogenCodeStub);
+};
+
+
class InstanceofStub: public PlatformCodeStub {
public:
enum Flags {
« no previous file with comments | « src/arm64/interface-descriptors-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698