Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index f466a36eec7938e9c0d4d9a46184e68de712e75a..482b1b2a4dd218217ddc5d04f0ff80298b1e7ccb 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -12484,6 +12484,28 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_IS_VAR) { |
} |
+#define ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(Name) \ |
+ RUNTIME_FUNCTION(MaybeObject*, Runtime_Has##Name) { \ |
+ CONVERT_CHECKED(JSObject, obj, args[0]); \ |
+ return isolate->heap()->ToBoolean(obj->Has##Name()); \ |
+ } |
+ |
+ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(FastElements) |
+ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(FastDoubleElements) |
+ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(DictionaryElements) |
+ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalPixelElements) |
+ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalArrayElements) |
+ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalByteElements) |
+ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalUnsignedByteElements) |
+ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalShortElements) |
+ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalUnsignedShortElements) |
+ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalIntElements) |
+ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalUnsignedIntElements) |
+ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalFloatElements) |
+ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(ExternalDoubleElements) |
+ |
+#undef ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION |
+ |
// ---------------------------------------------------------------------------- |
// Implementation of Runtime |