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/counters.h" 8 #include "src/interface-descriptors.h" 9 #include "src/objects-inl.h" 10 11 namespace v8 { 12 namespace internal { 13 BUILTIN(Illegal)14BUILTIN(Illegal) { 15 UNREACHABLE(); 16 } 17 BUILTIN(EmptyFunction)18BUILTIN(EmptyFunction) { return ReadOnlyRoots(isolate).undefined_value(); } 19 BUILTIN(UnsupportedThrower)20BUILTIN(UnsupportedThrower) { 21 HandleScope scope(isolate); 22 THROW_NEW_ERROR_RETURN_FAILURE(isolate, 23 NewError(MessageTemplate::kUnsupported)); 24 } 25 BUILTIN(StrictPoisonPillThrower)26BUILTIN(StrictPoisonPillThrower) { 27 HandleScope scope(isolate); 28 THROW_NEW_ERROR_RETURN_FAILURE( 29 isolate, NewTypeError(MessageTemplate::kStrictPoisonPill)); 30 } 31 32 } // namespace internal 33 } // namespace v8 34