35 start_pos_(start_pos),
37 bytecode_offset_(-1) {}
42 start_pos_(start_pos),
53 bytecode_offset_(bytecode_offset),
57 : start_pos_(-1), end_pos_(-1), bytecode_offset_(-1) {}
70 std::unique_ptr<char[]> data_str;
71 if (IsString(*data)) data_str =
Cast<String>(data)->ToCString();
72 PrintF(
"%s:%i: %s\n", data_str ? data_str.get() :
"<unknown>",
82 int bytecode_offset = -1;
85 if (location !=
nullptr && !
v8_flags.correctness_fuzzer_suppressions) {
88 script_handle = location->
script();
90 shared_info = location->
shared();
93 return isolate->factory()->NewJSMessageObject(message, argument,
start,
end,
94 shared_info, bytecode_offset,
95 script_handle, stack_trace);
113 if (isolate->has_exception()) {
118 isolate->clear_pending_message();
121 if (IsJSObject(message->argument())) {
128 if (IsJSError(*argument)) {
138 if (!maybe_stringified.
ToHandle(&stringified)) {
139 isolate->clear_pending_message();
140 stringified = isolate->factory()->exception_string();
142 message->set_argument(*stringified);
153 int error_level = api_message_obj->ErrorLevel();
156 isolate->factory()->message_listeners();
157 int global_length = global_listeners->length();
158 if (global_length == 0) {
161 for (
int i = 0;
i < global_length;
i++) {
163 if (IsUndefined(global_listeners->get(
i), isolate))
continue;
166 int32_t message_levels =
167 static_cast<int32_t
>(
Smi::ToInt(listener->get(2)));
168 if (!(message_levels & error_level)) {
175 RCS_SCOPE(isolate, RuntimeCallCounterId::kMessageListenerCallback);
178 callback(api_message_obj, IsUndefined(*callback_data, isolate)
180 : v8::Utils::ToLocal(callback_data));
197 return GetMessage(isolate, data)->ToCString();
206 int frame_count = frames->length();
209 isolate->factory()->NewFixedArray(frame_count);
210 for (
int i = 0;
i < frame_count; ++
i) {
219 site, isolate->factory()->call_site_info_symbol(), frame,
221 sites->set(
i, *site);
224 return isolate->factory()->NewJSArrayWithElements(sites);
227MaybeDirectHandle<Object> AppendErrorString(Isolate* isolate,
228 DirectHandle<Object> error,
229 IncrementalStringBuilder* builder) {
231 try_catch.SetVerbose(
false);
232 try_catch.SetCaptureMessage(
false);
236 if (err_str.is_null()) {
240 DCHECK(isolate->has_exception());
241 if (isolate->is_execution_terminating()) {
244 DirectHandle<Object> exception(isolate->exception(), isolate);
250 if (err_str.is_null()) {
252 DCHECK(isolate->has_exception());
253 if (isolate->is_execution_terminating())
return {};
254 builder->AppendCStringLiteral(
"<error>");
257 builder->AppendCStringLiteral(
"<error: ");
258 builder->AppendString(err_str.ToHandleChecked());
259 builder->AppendCharacter(
'>');
262 builder->AppendString(err_str.ToHandleChecked());
270 explicit PrepareStackTraceScope(Isolate* isolate) :
isolate_(isolate) {
272 isolate_->set_formatting_stack_trace(
true);
275 ~PrepareStackTraceScope() {
isolate_->set_formatting_stack_trace(
false); }
277 PrepareStackTraceScope(
const PrepareStackTraceScope&) =
delete;
278 PrepareStackTraceScope& operator=(
const PrepareStackTraceScope&) =
delete;
290 if (
v8_flags.correctness_fuzzer_suppressions) {
291 return isolate->factory()->empty_string();
293 DCHECK(IsFixedArray(*raw_stack));
296 const bool in_recursion = isolate->formatting_stack_trace();
299 if (!in_recursion && !has_overflowed &&
300 error->GetCreationContext(isolate).ToHandle(&error_context)) {
301 if (isolate->HasPrepareStackTraceCallback()) {
302 PrepareStackTraceScope scope(isolate);
306 GetStackFrames(isolate, elems));
311 isolate->RunPrepareStackTraceCallback(error_context, error, sites));
322 isolate, prepare_stack_trace,
323 JSFunction::GetProperty(isolate, global_error,
"prepareStackTrace"));
325 if (IsJSFunction(*prepare_stack_trace)) {
326 PrepareStackTraceScope scope(isolate);
332 GetStackFrames(isolate, elems));
334 constexpr int argc = 2;
335 std::array<DirectHandle<Object>, argc>
args;
361 for (
int i = 0;
i < elems->
length(); ++
i) {
370 if (isolate->has_exception()) {
380 if (exception_string.
is_null()) {
399 constexpr size_t kMaxArgs = 3;
412 if (!maybe_result_string.
ToHandle(&result_string)) {
413 DCHECK(isolate->has_exception());
414 return isolate->factory()->InternalizeString(
427#define CASE(NAME, STRING) \
428 case MessageTemplate::k##NAME: \
446 static constexpr MessageTemplate kTemplatesWithMismatchedArguments[] = {
447 MessageTemplate::kConstAssign,
448 MessageTemplate::kConstructorNotReceiver,
449 MessageTemplate::kDataCloneErrorDetachedArrayBuffer,
450 MessageTemplate::kDataCloneErrorOutOfMemory,
451 MessageTemplate::kIncompatibleMethodReceiver,
452 MessageTemplate::kInvalidArgument,
453 MessageTemplate::kInvalidArrayLength,
454 MessageTemplate::kInvalidAtomicAccessIndex,
455 MessageTemplate::kInvalidDataViewLength,
456 MessageTemplate::kInvalidIndex,
457 MessageTemplate::kInvalidLhsInAssignment,
458 MessageTemplate::kInvalidLhsInFor,
459 MessageTemplate::kInvalidLhsInPostfixOp,
460 MessageTemplate::kInvalidLhsInPrefixOp,
461 MessageTemplate::kInvalidPrivateBrandReinitialization,
462 MessageTemplate::kInvalidPrivateFieldReinitialization,
463 MessageTemplate::kInvalidPrivateMemberWrite,
464 MessageTemplate::kInvalidRegExpExecResult,
465 MessageTemplate::kInvalidTimeValue,
466 MessageTemplate::kInvalidWeakMapKey,
467 MessageTemplate::kInvalidWeakSetValue,
468 MessageTemplate::kIteratorReduceNoInitial,
469 MessageTemplate::kJsonParseShortString,
470 MessageTemplate::kJsonParseUnexpectedEOS,
471 MessageTemplate::kJsonParseUnexpectedTokenEndStringWithContext,
472 MessageTemplate::kJsonParseUnexpectedTokenShortString,
473 MessageTemplate::kJsonParseUnexpectedTokenStartStringWithContext,
474 MessageTemplate::kJsonParseUnexpectedTokenSurroundStringWithContext,
475 MessageTemplate::kMustBePositive,
476 MessageTemplate::kNotIterable,
477 MessageTemplate::kNotTypedArray,
478 MessageTemplate::kProxyNonObject,
479 MessageTemplate::kProxyPrivate,
480 MessageTemplate::kProxyRevoked,
481 MessageTemplate::kProxyTrapReturnedFalsishFor,
482 MessageTemplate::kReduceNoInitial,
483 MessageTemplate::kSpreadIteratorSymbolNonCallable,
484 MessageTemplate::kSymbolIteratorInvalid,
485 MessageTemplate::kTopLevelAwaitStalled,
486 MessageTemplate::kUndefinedOrNullToObject,
487 MessageTemplate::kUnexpectedStrictReserved,
488 MessageTemplate::kUnexpectedTokenIdentifier,
489 MessageTemplate::kWeakRefsCleanupMustBeCallable};
492 for (
const char* c = template_string; *c !=
'\0'; c++) {
495 if (*(c + 1) ==
'%') {
500 if (remaining_args.
empty()) {
501 if (std::count(std::begin(kTemplatesWithMismatchedArguments),
502 std::end(kTemplatesWithMismatchedArguments), index)) {
505 FATAL(
"Missing argument to template (got %zu): %s",
args.size(),
518 if (!remaining_args.
empty() &&
519 std::count(std::begin(kTemplatesWithMismatchedArguments),
520 std::end(kTemplatesWithMismatchedArguments), index) == 0) {
521 FATAL(
"Too many arguments to template (expected %zu, got %zu): %s",
522 args.size() - remaining_args.
size(),
args.size(), template_string);
553 if (
v8_flags.correctness_fuzzer_suppressions) {
556 if (target.is_identical_to(isolate->range_error_function())) {
557 FATAL(
"Aborting on range error");
561 message = isolate->factory()->InternalizeUtf8String(
562 "Message suppressed for fuzzers (--correctness-fuzzer-suppressions)");
583 if (!IsUndefined(*message, isolate)) {
588 err, isolate->factory()->message_string(),
591 if (
v8_flags.use_original_message_for_stack_trace) {
594 err, isolate->factory()->error_message_symbol(),
599 if (!IsUndefined(*options, isolate)) {
604 if (IsJSReceiver(*options)) {
607 JSObject::HasProperty(isolate, js_options, cause_string);
609 DCHECK((isolate)->has_exception());
616 JSObject::GetProperty(isolate, js_options, cause_string));
623 switch (stack_trace_collection) {
626 isolate->CaptureAndSetErrorStack(
643 JSObject::GetProperty(isolate, recv,
key));
646 if (IsUndefined(*obj, isolate)) {
666 NewTypeError(MessageTemplate::kIncompatibleMethodReceiver,
667 isolate->factory()->NewStringFromAsciiChecked(
668 "Error.prototype.toString"),
679 GetStringPropertyOrDefault(isolate, recv, name_key, name_default));
694 recv, isolate->factory()->error_message_symbol());
696 if (it.IsFound() && IsUndefined(*
result, isolate)) {
698 }
else if (it.IsFound()) {
708 GetStringPropertyOrDefault(isolate, recv, msg_key, msg_default));
713 if (name->length() == 0)
return msg;
714 if (msg->length() == 0)
return name;
734 if (
v8_flags.clear_exceptions_on_js_entry) {
738 isolate->clear_exception();
739 isolate->clear_pending_message();
748 DCHECK(constructor->shared()->HasBuiltinId());
758 if (
v8_flags.clear_exceptions_on_js_entry) {
762 isolate->clear_exception();
763 isolate->clear_pending_message();
771 if (IsJSObject(*original)) {
774 .ToHandle(&error_stack)) {
775 DCHECK(isolate->has_exception());
778 isolate->clear_exception();
782 return isolate->factory()->NewTypeError(
783 MessageTemplate::kShadowRealmErrorStackThrows,
string);
798 return isolate->factory()->NewTypeError(
799 MessageTemplate::kShadowRealmErrorStackNonString,
string);
816 isolate, new_error, isolate->factory()->error_stack_symbol(),
833 auto& summary = summaries.
frames.back().AsJavaScript();
838 summary.abstract_code()->
SourcePosition(isolate, summary.code_offset());
839 if (IsScript(*script) &&
849DirectHandle<String> BuildDefaultCallSite(Isolate* isolate,
850 DirectHandle<Object>
object) {
851 IncrementalStringBuilder builder(isolate);
854 if (IsString(*
object)) {
855 builder.AppendCStringLiteral(
" \"");
859 constexpr int kMaxPrintedStringLength = 100;
860 if (string->length() <= kMaxPrintedStringLength) {
861 builder.AppendString(
string);
863 string = isolate->factory()->NewProperSubString(
string, 0,
864 kMaxPrintedStringLength);
865 builder.AppendString(
string);
866 builder.AppendCStringLiteral(
"<...>");
868 builder.AppendCStringLiteral(
"\"");
869 }
else if (
IsNull(*
object, isolate)) {
870 builder.AppendCStringLiteral(
" null");
871 }
else if (IsTrue(*
object, isolate)) {
872 builder.AppendCStringLiteral(
" true");
873 }
else if (IsFalse(*
object, isolate)) {
874 builder.AppendCStringLiteral(
" false");
876 builder.AppendCharacter(
' ');
877 builder.AppendString(isolate->factory()->NumberToString(
object));
880 return builder.Finish().ToHandleChecked();
883DirectHandle<String> RenderCallSite(Isolate* isolate,
884 DirectHandle<Object>
object,
885 MessageLocation* location,
887 if (ComputeLocation(isolate, location)) {
889 isolate, *location->shared());
890 flags.set_is_reparse(
true);
891 UnoptimizedCompileState compile_state;
892 ReusableUnoptimizedCompileState reusable_state(isolate);
893 ParseInfo
info(isolate, flags, &compile_state, &reusable_state);
896 info.ast_value_factory()->Internalize(isolate);
897 CallPrinter printer(isolate, location->shared()->IsUserJavaScript());
898 DirectHandle<String> str =
899 printer.Print(info.literal(), location->start_pos());
900 *hint = printer.GetErrorHint();
901 if (str->length() > 0)
return str;
904 return BuildDefaultCallSite(isolate,
object);
911 return MessageTemplate::kNotIterable;
914 return MessageTemplate::kNotCallableOrIterable;
917 return MessageTemplate::kNotAsyncIterable;
920 return MessageTemplate::kNotCallableOrAsyncIterable;
934 RenderCallSite(isolate, source, &location, &hint);
939 isolate->factory()->iterator_symbol();
940 return isolate->factory()->NewTypeError(
id, callsite, iterator_symbol);
943 id = UpdateErrorTemplate(hint,
id);
944 return isolate->factory()->NewTypeError(
id, callsite);
952 if (ComputeLocation(isolate, &location)) {
954 isolate, *location.
shared());
955 flags.set_is_reparse(
true);
958 ParseInfo info(isolate, flags, &compile_state, &reusable_state);
961 info.ast_value_factory()->Internalize(isolate);
967 str->length() > 0 ? str : BuildDefaultCallSite(isolate,
object);
976 callsite = BuildDefaultCallSite(isolate,
object);
980 isolate->ThrowAt(isolate->factory()->NewTypeError(
id, callsite,
object),
990 RenderCallSite(isolate, source, &location, &hint);
992 id = UpdateErrorTemplate(hint,
id);
993 return isolate->factory()->NewTypeError(
id, callsite);
1001 RenderCallSite(isolate, source, &location, &hint);
1003 return isolate->factory()->NewTypeError(
id, callsite);
1015 if (
key.ToHandle(&key_handle)) {
1016 if (IsString(*key_handle)) {
1019 maybe_property_name =
1028 bool location_computed =
false;
1029 bool is_destructuring =
false;
1031 if (ComputeLocation(isolate, &location)) {
1032 location_computed =
true;
1035 isolate, *location.
shared());
1036 flags.set_is_reparse(
true);
1039 ParseInfo info(isolate, flags, &compile_state, &reusable_state);
1042 info.ast_value_factory()->Internalize(isolate);
1050 if (is_destructuring) {
1055 if (maybe_property_name.
is_null() && destructuring_prop !=
nullptr &&
1057 maybe_property_name = destructuring_prop->
key()
1059 ->AsRawPropertyName()
1064 if (maybe_property_name.
is_null()) {
1076 if (str->length() > 0) callsite = str;
1081 callsite = BuildDefaultCallSite(isolate,
object);
1086 if (is_destructuring) {
1087 if (maybe_property_name.
ToHandle(&property_name)) {
1088 error = isolate->factory()->NewTypeError(
1089 MessageTemplate::kNonCoercibleWithProperty, property_name, callsite,
1092 error = isolate->factory()->NewTypeError(MessageTemplate::kNonCoercible,
1096 if (!
key.ToHandle(&key_handle) ||
1097 !maybe_property_name.
ToHandle(&property_name)) {
1098 error = isolate->factory()->NewTypeError(
1099 MessageTemplate::kNonObjectPropertyLoad,
object);
1100 }
else if (*key_handle ==
ReadOnlyRoots(isolate).iterator_symbol()) {
1103 error = isolate->factory()->NewTypeError(
1104 MessageTemplate::kNonObjectPropertyLoadWithProperty,
object,
1109 if (location_computed) {
1110 isolate->ThrowAt(error, &location);
1112 isolate->Throw(*error);
1124 if (IsJSError(*
object)) {
1136 isolate->factory()->error_stack_symbol());
1139 if (!it.IsFound()) {
1141 isolate->factory()->undefined_value()};
1156 if (error_stack_data->HasFormattedStack()) {
1157 return direct_handle(error_stack_data->formatted_stack(), isolate);
1164 isolate, formatted_stack,
1166 isolate, error_object,
1167 direct_handle(error_stack_data->call_site_infos(), isolate)));
1168 error_stack_data->set_formatted_stack(*formatted_stack);
1169 return formatted_stack;
1177 isolate, formatted_stack,
1182 isolate->factory()->error_stack_symbol(),
1185 return formatted_stack;
1205 error_stack_data->set_formatted_stack(*formatted_stack);
1208 isolate->factory()->error_stack_symbol(),
1220 Factory* factory = isolate->factory();
1227 NewTypeError(MessageTemplate::kDefineDisallowed, name));
1233 desc.set_configurable(
true);
1234 desc.set_get(factory->error_stack_getter_fun_template());
1235 desc.set_set(factory->error_stack_setter_fun_template());
1244 isolate->CaptureAndSetErrorStack(
object, mode, caller));
1246 return isolate->factory()->undefined_value();
union v8::internal::@341::BuiltinMetadata::KindSpecificData data
#define SBXCHECK(condition)
@ kErrorPrepareStackTrace
V8_INLINE T ToChecked() const
V8_INLINE bool IsNothing() const
void SetVerbose(bool value)
void SetCaptureMessage(bool value)
constexpr bool empty() const
constexpr size_t size() const
Expression * value() const
Expression * spread_arg() const
Assignment * destructuring_assignment() const
DirectHandle< String > Print(FunctionLiteral *program, int position)
ObjectLiteralProperty * destructuring_prop() const
V8_INLINE bool is_null() const
static MaybeDirectHandle< Object > FormatStackTrace(Isolate *isolate, DirectHandle< JSObject > error, DirectHandle< Object > stack_trace)
static bool HasErrorStackSymbolOwnProperty(Isolate *isolate, DirectHandle< JSObject > object)
static MaybeDirectHandle< Object > GetFormattedStack(Isolate *isolate, DirectHandle< JSObject > maybe_error_object)
static Handle< JSObject > MakeGenericError(Isolate *isolate, DirectHandle< JSFunction > constructor, MessageTemplate index, base::Vector< const DirectHandle< Object > > args, FrameSkipMode mode)
static Tagged< Object > ThrowLoadFromNullOrUndefined(Isolate *isolate, DirectHandle< Object > object, MaybeDirectHandle< Object > key)
static DirectHandle< JSObject > NewCalledNonCallableError(Isolate *isolate, DirectHandle< Object > source)
static V8_EXPORT_PRIVATE MaybeHandle< String > ToString(Isolate *isolate, DirectHandle< Object > recv, ToStringMessageSource message_source=ToStringMessageSource::kCurrentMessageProperty)
static StackPropertyLookupResult GetErrorStackProperty(Isolate *isolate, DirectHandle< JSReceiver > maybe_error_object)
static void SetFormattedStack(Isolate *isolate, DirectHandle< JSObject > maybe_error_object, DirectHandle< Object > formatted_stack)
static DirectHandle< JSObject > NewIteratorError(Isolate *isolate, DirectHandle< Object > source)
static MaybeDirectHandle< JSObject > Construct(Isolate *isolate, DirectHandle< JSFunction > target, DirectHandle< Object > new_target, DirectHandle< Object > message, DirectHandle< Object > options)
static DirectHandle< JSObject > ShadowRealmConstructTypeErrorCopy(Isolate *isolate, DirectHandle< Object > original, MessageTemplate index, base::Vector< const DirectHandle< Object > > args)
static MaybeHandle< Object > CaptureStackTrace(Isolate *isolate, DirectHandle< JSObject > object, FrameSkipMode mode, Handle< Object > caller)
static Tagged< Object > ThrowSpreadArgError(Isolate *isolate, MessageTemplate id, DirectHandle< Object > object)
static DirectHandle< JSObject > NewConstructedNonConstructable(Isolate *isolate, DirectHandle< Object > source)
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT MaybeHandle< Object > Call(Isolate *isolate, DirectHandle< Object > callable, DirectHandle< Object > receiver, base::Vector< const DirectHandle< Object > > args)
bool IsPropertyName() const
V8_INLINE bool is_null() const
V8_INLINE void AppendCString(const SrcChar *s)
MaybeDirectHandle< String > Finish()
V8_INLINE void AppendCharacter(uint8_t c)
V8_INLINE void AppendString(std::string_view str)
V8_INLINE void AppendCStringLiteral(const char(&literal)[N])
static bool IsExtensible(Isolate *isolate, DirectHandle< JSObject > object)
static V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT MaybeHandle< JSObject > New(DirectHandle< JSFunction > constructor, DirectHandle< JSReceiver > new_target, DirectHandle< AllocationSite > site, NewJSObjectType=NewJSObjectType::kNoAPIWrapper)
static V8_WARN_UNUSED_RESULT MaybeDirectHandle< Object > V8_EXPORT_PRIVATE SetOwnPropertyIgnoreAttributes(DirectHandle< JSObject > object, DirectHandle< Name > name, DirectHandle< Object > value, PropertyAttributes attributes)
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT Maybe< bool > HasOwnProperty(Isolate *isolate, DirectHandle< JSReceiver > object, DirectHandle< Name > name)
static Handle< Object > GetDataProperty(Isolate *isolate, DirectHandle< JSReceiver > object, DirectHandle< Name > name)
static V8_WARN_UNUSED_RESULT Maybe< bool > DefineOwnProperty(Isolate *isolate, DirectHandle< JSReceiver > object, DirectHandle< Object > key, PropertyDescriptor *desc, Maybe< ShouldThrow > should_throw)
@ PROTOTYPE_CHAIN_SKIP_INTERCEPTOR
V8_INLINE DirectHandle< T > ToHandleChecked() const
V8_WARN_UNUSED_RESULT V8_INLINE bool ToHandle(DirectHandle< S > *out) const
V8_INLINE bool is_null() const
V8_WARN_UNUSED_RESULT V8_INLINE bool ToHandle(Handle< S > *out) const
static DirectHandle< String > GetMessage(Isolate *isolate, DirectHandle< Object > data)
static V8_EXPORT_PRIVATE void ReportMessage(Isolate *isolate, const MessageLocation *loc, DirectHandle< JSMessageObject > message)
static std::unique_ptr< char[]> GetLocalizedMessage(Isolate *isolate, DirectHandle< Object > data)
static void DefaultMessageReport(Isolate *isolate, const MessageLocation *loc, DirectHandle< Object > message_obj)
static void ReportMessageNoExceptions(Isolate *isolate, const MessageLocation *loc, DirectHandle< Object > message_obj, Local< Value > api_exception_obj)
static V8_EXPORT_PRIVATE Handle< JSMessageObject > MakeMessageObject(Isolate *isolate, MessageTemplate type, const MessageLocation *location, DirectHandle< Object > argument, DirectHandle< StackTraceInfo > stack_trace=DirectHandle< StackTraceInfo >::null())
int bytecode_offset() const
Handle< SharedFunctionInfo > shared() const
Handle< Script > script() const
static V8_EXPORT_PRIVATE DirectHandle< String > NoSideEffectsToString(Isolate *isolate, DirectHandle< Object > input)
static V8_WARN_UNUSED_RESULT HandleType< String >::MaybeType ToString(Isolate *isolate, HandleType< T > input)
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT Maybe< bool > SetProperty(LookupIterator *it, DirectHandle< Object > value, StoreOrigin store_origin, Maybe< ShouldThrow > should_throw=Nothing< ShouldThrow >())
static Handle< String > TypeOf(Isolate *isolate, DirectHandle< Object > object)
static V8_EXPORT_PRIVATE MaybeDirectHandle< String > NoSideEffectsToMaybeString(Isolate *isolate, DirectHandle< Object > input)
void set_enumerable(bool enumerable)
static void EnsureSourcePositionsAvailable(Isolate *isolate, DirectHandle< SharedFunctionInfo > shared_info)
static constexpr int ToInt(const Tagged< Object > object)
SourcePosition(int script_offset=kNoSourcePosition, int inlining_id=kNotInlined)
bool HasOverflowed() const
static V8_INLINE HandleType< String > Flatten(Isolate *isolate, HandleType< T > string, AllocationType allocation=AllocationType::kYoung)
static UnoptimizedCompileFlags ForFunctionCompile(Isolate *isolate, Tagged< SharedFunctionInfo > shared)
Handle< SharedFunctionInfo > info
Tagged< SharedFunctionInfo > shared_
#define RETURN_ON_EXCEPTION(isolate, call)
#define ASSIGN_RETURN_ON_EXCEPTION(isolate, dst, call)
#define THROW_NEW_ERROR(isolate, call)
#define MAYBE_RETURN(call, value)
base::Vector< const DirectHandle< Object > > args
DirectHandle< Object > new_target
SharedFunctionInfoRef shared
ZoneVector< RpoNumber > & result
#define MESSAGE_TEMPLATES(T)
InstructionOperand source
constexpr Vector< const char > StaticCharVector(const char(&array)[N])
constexpr Vector< T > VectorOf(T *start, size_t size)
bool ParseAny(ParseInfo *info, DirectHandle< SharedFunctionInfo > shared_info, Isolate *isolate, ReportStatisticsMode mode)
bool TryCast(Tagged< From > value, Tagged< To > *out)
bool IsNumber(Tagged< Object > obj)
void PrintF(const char *format,...)
V8_INLINE IndirectHandle< T > indirect_handle(DirectHandle< T > handle)
F FUNCTION_CAST(uint8_t *addr)
void SerializeCallSiteInfo(Isolate *isolate, DirectHandle< CallSiteInfo > frame, IncrementalStringBuilder *builder)
V8_INLINE DirectHandle< T > direct_handle(Tagged< T > object, Isolate *isolate)
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in name
bool IsNullOrUndefined(Tagged< Object > obj, Isolate *isolate)
bool IsPrimitive(Tagged< Object > obj)
V8_EXPORT_PRIVATE FlagValues v8_flags
kInstanceDescriptorsOffset kTransitionsOrPrototypeInfoOffset IsNull(value)||IsJSProxy(value)||IsWasmObject(value)||(IsJSObject(value) &&(HeapLayout
kInterpreterTrampolineOffset script
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
void(*)(Local< Message > message, Local< Value > data) MessageCallback
Maybe< T > Just(const T &t)
#define DCHECK_LE(v1, v2)
#define DCHECK(condition)
Handle< Object > error_stack
MaybeDirectHandle< JSObject > error_stack_symbol_holder
std::vector< FrameSummary > frames
#define TRACE_EVENT0(category_group, name)
#define TRACE_DISABLED_BY_DEFAULT(name)
#define V8_UNLIKELY(condition)