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

Unified Diff: src/code-stubs.h

Issue 1109333003: Use a stub in crankshaft for grow store arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix ARM failure. Created 5 years, 8 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/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 6bfe8b5c21501800fcdcf92255d1d3a74b8bf4c7..c6767e9b8b73f60c318e6a18952b0367aae8026e 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -69,6 +69,7 @@ namespace internal {
V(FastCloneShallowObject) \
V(FastNewClosure) \
V(FastNewContext) \
+ V(GrowArrayElements) \
V(InternalArrayNArgumentsConstructor) \
V(InternalArrayNoArgumentConstructor) \
V(InternalArraySingleArgumentConstructor) \
@@ -709,6 +710,28 @@ class CreateWeakCellStub : 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