v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
builtins-collections.cc
Go to the documentation of this file.
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-inl.h
"
6
#include "
src/builtins/builtins.h
"
7
#include "
src/logging/counters.h
"
8
#include "
src/objects/js-collection-inl.h
"
9
#include "
src/objects/objects-inl.h
"
10
11
namespace
v8
{
12
namespace
internal
{
13
14
BUILTIN
(MapPrototypeClear) {
15
HandleScope
scope(isolate);
16
const
char
*
const
kMethodName =
"Map.prototype.clear"
;
17
CHECK_RECEIVER
(
JSMap
, map, kMethodName);
18
JSMap::Clear
(isolate, map);
19
return
ReadOnlyRoots
(isolate).undefined_value();
20
}
21
22
BUILTIN
(SetPrototypeClear) {
23
HandleScope
scope(isolate);
24
const
char
*
const
kMethodName =
"Set.prototype.clear"
;
25
CHECK_RECEIVER
(
JSSet
, set, kMethodName);
26
JSSet::Clear
(isolate, set);
27
return
ReadOnlyRoots
(isolate).undefined_value();
28
}
29
30
}
// namespace internal
31
}
// namespace v8
builtins-utils-inl.h
CHECK_RECEIVER
#define CHECK_RECEIVER(Type, name, method)
Definition
builtins-utils.h:156
BUILTIN
#define BUILTIN(name)
Definition
builtins-utils.h:152
builtins.h
v8::internal::HandleScope
Definition
handles.h:262
v8::internal::JSMap
Definition
js-collection.h:56
v8::internal::JSMap::Clear
static void Clear(Isolate *isolate, DirectHandle< JSMap > map)
Definition
objects.cc:6294
v8::internal::JSSet
Definition
js-collection.h:31
v8::internal::JSSet::Clear
static void Clear(Isolate *isolate, DirectHandle< JSSet > set)
Definition
objects.cc:6276
v8::internal::ReadOnlyRoots
Definition
roots.h:709
counters.h
js-collection-inl.h
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
objects-inl.h
src
builtins
builtins-collections.cc
Generated on Sun Apr 6 2025 21:08:50 for v8 by
1.12.0