Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index b0a6b5e81427e1588a89f1c269a2b1e90c78f98b..dda592dd7545db47153b106e870e1e83a112f0a1 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -783,6 +783,15 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_SetDelete) { |
} |
+RUNTIME_FUNCTION(MaybeObject*, Runtime_SetGetSize) { |
+ HandleScope scope(isolate); |
+ ASSERT(args.length() == 1); |
+ CONVERT_ARG_HANDLE_CHECKED(JSSet, holder, 0); |
+ Handle<ObjectHashSet> table(ObjectHashSet::cast(holder->table())); |
+ return Smi::FromInt(table->NumberOfElements()); |
+} |
+ |
+ |
RUNTIME_FUNCTION(MaybeObject*, Runtime_MapInitialize) { |
HandleScope scope(isolate); |
ASSERT(args.length() == 1); |
@@ -842,6 +851,15 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_MapSet) { |
} |
+RUNTIME_FUNCTION(MaybeObject*, Runtime_MapGetSize) { |
+ HandleScope scope(isolate); |
+ ASSERT(args.length() == 1); |
+ CONVERT_ARG_HANDLE_CHECKED(JSMap, holder, 0); |
+ Handle<ObjectHashTable> table(ObjectHashTable::cast(holder->table())); |
+ return Smi::FromInt(table->NumberOfElements()); |
+} |
+ |
+ |
RUNTIME_FUNCTION(MaybeObject*, Runtime_WeakMapInitialize) { |
HandleScope scope(isolate); |
ASSERT(args.length() == 1); |