Lines Matching defs:isolate

10 #include "src/execution/isolate-inl.h"
25 Handle<Object> NormalizeReceiver(Isolate* isolate, Handle<Object> receiver) {
31 isolate);
37 static InvokeParams SetUpForNew(Isolate* isolate, Handle<Object> constructor,
41 static InvokeParams SetUpForCall(Isolate* isolate, Handle<Object> callable,
46 Isolate* isolate, Handle<Object> callable, Handle<Object> receiver,
51 static InvokeParams SetUpForRunMicrotasks(Isolate* isolate,
87 InvokeParams InvokeParams::SetUpForNew(Isolate* isolate,
93 params.receiver = isolate->factory()->undefined_value();
108 InvokeParams InvokeParams::SetUpForCall(Isolate* isolate,
114 params.receiver = NormalizeReceiver(isolate, receiver);
120 params.new_target = isolate->factory()->undefined_value();
132 Isolate* isolate, Handle<Object> callable, Handle<Object> receiver,
137 params.receiver = NormalizeReceiver(isolate, receiver);
143 params.new_target = isolate->factory()->undefined_value();
155 Isolate* isolate, MicrotaskQueue* microtask_queue,
157 auto undefined = isolate->factory()->undefined_value();
173 Handle<CodeT> JSEntry(Isolate* isolate, Execution::Target execution_target,
177 return BUILTIN_CODE(isolate, JSConstructEntry);
180 return BUILTIN_CODE(isolate, JSEntry);
183 return BUILTIN_CODE(isolate, JSRunMicrotasksEntry);
188 MaybeHandle<Context> NewScriptContext(Isolate* isolate,
194 if (isolate->debug_execution_mode() == DebugInfo::kSideEffects) {
195 isolate->Throw(*isolate->factory()->NewEvalError(
199 SaveAndSwitchContext save(isolate, function->context());
201 Handle<Script> script(Script::cast(sfi.script()), isolate);
202 Handle<ScopeInfo> scope_info(sfi.scope_info(), isolate);
204 isolate);
206 isolate);
208 native_context->script_context_table(), isolate);
212 Handle<String> name(it->name(), isolate);
218 isolate, script_context, lookup.context_index);
231 return isolate->ThrowAt<Context>(
232 isolate->factory()->NewSyntaxError(
240 LookupIterator it(isolate, global_object, name, global_object,
253 return isolate->ThrowAt<Context>(
254 isolate->factory()->NewSyntaxError(
264 isolate->factory()->NewScriptContext(native_context, scope_info);
266 result->Initialize(isolate);
271 ScriptContextTable::Extend(isolate, script_context, result,
278 V8_WARN_UNUSED_RESULT MaybeHandle<Object> Invoke(Isolate* isolate,
280 RCS_SCOPE(isolate, RuntimeCallCounterId::kInvoke);
298 StackLimitCheck check(isolate);
300 isolate->StackOverflow();
302 isolate->ReportPendingMessages();
315 SaveAndSwitchContext save(isolate, function->context());
319 ? isolate->factory()->the_hole_value()
322 isolate, params.is_construct, function, receiver, params.argc,
325 DCHECK(has_exception == isolate->has_pending_exception());
328 isolate->ReportPendingMessages();
332 isolate->clear_pending_message();
351 if (!NewScriptContext(isolate, function, host_defined_options)
354 isolate->ReportPendingMessages();
367 VMState<JS> state(isolate);
368 CHECK(AllowJavascriptExecution::IsAllowed(isolate));
369 if (!ThrowOnJavascriptExecution::IsAllowed(isolate)) {
370 isolate->ThrowIllegalOperation();
372 isolate->ReportPendingMessages();
376 if (!DumpOnJavascriptExecution::IsAllowed(isolate)) {
378 return isolate->factory()->undefined_value();
382 Handle<Context> context = isolate->native_context();
383 if (!context->script_execution_callback().IsUndefined(isolate)) {
387 v8::Isolate* api_isolate = reinterpret_cast<v8::Isolate*>(isolate);
390 DCHECK(!isolate->has_scheduled_exception());
392 isolate->ThrowIllegalOperation();
400 JSEntry(isolate, params.execution_target, params.is_construct);
404 SaveContext save(isolate);
405 SealHandleScope shs(isolate);
407 if (FLAG_clear_exceptions_on_js_entry) isolate->clear_pending_exception();
418 JSEntryFunction::FromAddress(isolate, code->InstructionStart());
424 RCS_SCOPE(isolate, RuntimeCallCounterId::kJS_Execution);
425 value = Object(stub_entry.Call(isolate->isolate_data()->isolate_root(),
438 JSEntryFunction::FromAddress(isolate, code->InstructionStart());
440 RCS_SCOPE(isolate, RuntimeCallCounterId::kJS_Execution);
441 value = Object(stub_entry.Call(isolate->isolate_data()->isolate_root(),
448 value.ObjectVerify(isolate);
453 bool has_exception = value.IsException(isolate);
454 DCHECK(has_exception == isolate->has_pending_exception());
457 isolate->ReportPendingMessages();
461 isolate->clear_pending_message();
464 return Handle<Object>(value, isolate);
467 MaybeHandle<Object> InvokeWithTryCatch(Isolate* isolate,
482 v8::TryCatch catcher(reinterpret_cast<v8::Isolate*>(isolate));
486 maybe_result = Invoke(isolate, params);
489 DCHECK(isolate->has_pending_exception());
490 if (isolate->pending_exception() ==
491 ReadOnlyRoots(isolate).termination_exception()) {
496 DCHECK(isolate->external_caught_exception());
500 isolate->OptionalRescheduleException(true);
508 isolate->OptionalRescheduleException(false);
517 MaybeHandle<Object> Execution::Call(Isolate* isolate, Handle<Object> callable,
523 return Invoke(isolate, InvokeParams::SetUpForCall(isolate, callable, receiver,
528 MaybeHandle<Object> Execution::CallScript(Isolate* isolate,
535 isolate, InvokeParams::SetUpForCall(isolate, script_function, receiver, 1,
539 MaybeHandle<Object> Execution::CallBuiltin(Isolate* isolate,
544 DisableBreak no_break(isolate->debug());
545 return Invoke(isolate, InvokeParams::SetUpForCall(isolate, builtin, receiver,
550 MaybeHandle<Object> Execution::New(Isolate* isolate, Handle<Object> constructor,
552 return New(isolate, constructor, constructor, argc, argv);
556 MaybeHandle<Object> Execution::New(Isolate* isolate, Handle<Object> constructor,
559 return Invoke(isolate, InvokeParams::SetUpForNew(isolate, constructor,
565 Isolate* isolate, Handle<JSFunction> script_function,
573 isolate, InvokeParams::SetUpForTryCall(
574 isolate, script_function, receiver, 1, &argument,
580 Isolate* isolate, Handle<Object> callable, Handle<Object> receiver,
587 isolate, InvokeParams::SetUpForTryCall(
588 isolate, callable, receiver, argc, argv, message_handling,
594 Isolate* isolate, MicrotaskQueue* microtask_queue,
597 isolate, InvokeParams::SetUpForRunMicrotasks(isolate, microtask_queue,
612 void Execution::CallWasm(Isolate* isolate, Handle<CodeT> wrapper_code,
618 WasmEntryStub::FromAddress(isolate, wrapper_code->InstructionStart());
622 SaveContext save(isolate);
623 SealHandleScope shs(isolate);
625 Address saved_c_entry_fp = *isolate->c_entry_fp_address();
626 Address saved_js_entry_sp = *isolate->js_entry_sp_address();
628 *isolate->js_entry_sp_address() = GetCurrentStackPosition();
631 stack_handler.next = isolate->thread_local_top()->handler_;
637 isolate->thread_local_top()->handler_ =
642 RCS_SCOPE(isolate, RuntimeCallCounterId::kJS_Execution);
650 isolate->set_pending_exception(Object(result));
659 isolate->thread_local_top()->handler_ = stack_handler.next;
661 *isolate->js_entry_sp_address() = saved_js_entry_sp;
663 *isolate->c_entry_fp_address() = saved_c_entry_fp;