builtins-internal.cc 908 Bytes
Newer Older
1 2 3 4 5
// 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.h"
6
#include "src/builtins/builtins.h"
7
#include "src/codegen/interface-descriptors.h"
8
#include "src/logging/counters.h"
9
#include "src/objects/objects-inl.h"
10

11 12 13 14 15 16 17
namespace v8 {
namespace internal {

BUILTIN(Illegal) {
  UNREACHABLE();
}

18
BUILTIN(EmptyFunction) { return ReadOnlyRoots(isolate).undefined_value(); }
19

20 21 22 23 24 25
BUILTIN(UnsupportedThrower) {
  HandleScope scope(isolate);
  THROW_NEW_ERROR_RETURN_FAILURE(isolate,
                                 NewError(MessageTemplate::kUnsupported));
}

26
BUILTIN(StrictPoisonPillThrower) {
27 28 29 30 31 32 33
  HandleScope scope(isolate);
  THROW_NEW_ERROR_RETURN_FAILURE(
      isolate, NewTypeError(MessageTemplate::kStrictPoisonPill));
}

}  // namespace internal
}  // namespace v8