bd0a7fd64c
This reduces the build steps after touching counters.h from 710 to 191, thus detaching counters.h from the giant include cluster. BUG=v8:7490,v8:8238 Change-Id: I0c7e707fb945e293f8a5604cc8da438cd35b3210 Reviewed-on: https://chromium-review.googlesource.com/c/1329695 Commit-Queue: Marja Hölttä <marja@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#57468}
32 lines
914 B
C++
32 lines
914 B
C++
// Copyright 2016 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "src/builtins/builtins-utils-inl.h"
|
|
#include "src/builtins/builtins.h"
|
|
#include "src/counters.h"
|
|
#include "src/objects-inl.h"
|
|
#include "src/objects/js-collection-inl.h"
|
|
|
|
namespace v8 {
|
|
namespace internal {
|
|
|
|
BUILTIN(MapPrototypeClear) {
|
|
HandleScope scope(isolate);
|
|
const char* const kMethodName = "Map.prototype.clear";
|
|
CHECK_RECEIVER(JSMap, map, kMethodName);
|
|
JSMap::Clear(isolate, map);
|
|
return ReadOnlyRoots(isolate).undefined_value();
|
|
}
|
|
|
|
BUILTIN(SetPrototypeClear) {
|
|
HandleScope scope(isolate);
|
|
const char* const kMethodName = "Set.prototype.clear";
|
|
CHECK_RECEIVER(JSSet, set, kMethodName);
|
|
JSSet::Clear(isolate, set);
|
|
return ReadOnlyRoots(isolate).undefined_value();
|
|
}
|
|
|
|
} // namespace internal
|
|
} // namespace v8
|