Line data Source code
1 : // Copyright 2016 the V8 project authors. All rights reserved.
2 : // Use of this source code is governed by a BSD-style license that can be
3 : // found in the LICENSE file.
4 :
5 : #include "src/builtins/builtins-utils.h"
6 : #include "src/builtins/builtins.h"
7 : #include "src/objects-inl.h"
8 :
9 : namespace v8 {
10 : namespace internal {
11 :
12 594 : BUILTIN(MapPrototypeClear) {
13 : HandleScope scope(isolate);
14 : const char* const kMethodName = "Map.prototype.clear";
15 198 : CHECK_RECEIVER(JSMap, map, kMethodName);
16 198 : JSMap::Clear(map);
17 198 : return isolate->heap()->undefined_value();
18 : }
19 :
20 84 : BUILTIN(SetPrototypeClear) {
21 : HandleScope scope(isolate);
22 : const char* const kMethodName = "Set.prototype.clear";
23 28 : CHECK_RECEIVER(JSSet, set, kMethodName);
24 28 : JSSet::Clear(set);
25 28 : return isolate->heap()->undefined_value();
26 : }
27 :
28 : } // namespace internal
29 : } // namespace v8
|