• Home
  • Raw
  • Download

Lines Matching refs:isolate

40   explicit FrameFinder(Isolate* isolate)  in FrameFinder()  argument
41 : frame_iterator_(isolate, isolate->thread_local_top()) { in FrameFinder()
57 WasmInstanceObject GetWasmInstanceOnStackTop(Isolate* isolate) { in GetWasmInstanceOnStackTop() argument
58 return FrameFinder<WasmFrame, StackFrame::EXIT>(isolate) in GetWasmInstanceOnStackTop()
63 Context GetNativeContextFromWasmInstanceOnStackTop(Isolate* isolate) { in GetNativeContextFromWasmInstanceOnStackTop() argument
64 return GetWasmInstanceOnStackTop(isolate).native_context(); in GetNativeContextFromWasmInstanceOnStackTop()
81 Object ThrowWasmError(Isolate* isolate, MessageTemplate message) { in ThrowWasmError() argument
82 HandleScope scope(isolate); in ThrowWasmError()
83 Handle<JSObject> error_obj = isolate->factory()->NewWasmRuntimeError(message); in ThrowWasmError()
84 JSObject::AddProperty(isolate, error_obj, in ThrowWasmError()
85 isolate->factory()->wasm_uncatchable_symbol(), in ThrowWasmError()
86 isolate->factory()->true_value(), NONE); in ThrowWasmError()
87 return isolate->Throw(*error_obj); in ThrowWasmError()
94 HandleScope scope(isolate); in RUNTIME_FUNCTION()
105 bool result = internal::wasm::TypecheckJSObject(isolate, instance->module(), in RUNTIME_FUNCTION()
112 HandleScope scope(isolate); in RUNTIME_FUNCTION()
120 isolate, handle(instance->memory_object(), isolate), delta_pages); in RUNTIME_FUNCTION()
130 return ThrowWasmError(isolate, MessageTemplateFromInt(message_id)); in RUNTIME_FUNCTION()
135 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
137 return isolate->StackOverflow(); in RUNTIME_FUNCTION()
145 HandleScope scope(isolate); in RUNTIME_FUNCTION()
148 isolate, NewTypeError(MessageTemplate::kWasmTrapJSTypeError)); in RUNTIME_FUNCTION()
154 HandleScope scope(isolate); in RUNTIME_FUNCTION()
156 DCHECK(isolate->context().is_null()); in RUNTIME_FUNCTION()
157 isolate->set_context(GetNativeContextFromWasmInstanceOnStackTop(isolate)); in RUNTIME_FUNCTION()
161 Handle<Object> tag(tag_raw, isolate); in RUNTIME_FUNCTION()
162 Handle<Object> exception = isolate->factory()->NewWasmRuntimeError( in RUNTIME_FUNCTION()
164 CHECK(!Object::SetProperty(isolate, exception, in RUNTIME_FUNCTION()
165 isolate->factory()->wasm_exception_tag_symbol(), in RUNTIME_FUNCTION()
169 Handle<FixedArray> values = isolate->factory()->NewFixedArray(size); in RUNTIME_FUNCTION()
170 CHECK(!Object::SetProperty(isolate, exception, in RUNTIME_FUNCTION()
171 isolate->factory()->wasm_exception_values_symbol(), in RUNTIME_FUNCTION()
180 SealHandleScope shs(isolate); in RUNTIME_FUNCTION()
184 StackLimitCheck check(isolate); in RUNTIME_FUNCTION()
185 if (check.JsHasOverflowed()) return isolate->StackOverflow(); in RUNTIME_FUNCTION()
187 return isolate->stack_guard()->HandleInterrupts(); in RUNTIME_FUNCTION()
192 HandleScope scope(isolate); in RUNTIME_FUNCTION()
198 FrameFinder<WasmCompileLazyFrame, StackFrame::EXIT> frame_finder(isolate); in RUNTIME_FUNCTION()
202 DCHECK(isolate->context().is_null()); in RUNTIME_FUNCTION()
203 isolate->set_context(instance->native_context()); in RUNTIME_FUNCTION()
205 bool success = wasm::CompileLazy(isolate, native_module, func_index); in RUNTIME_FUNCTION()
207 DCHECK(isolate->has_pending_exception()); in RUNTIME_FUNCTION()
208 return ReadOnlyRoots(isolate).exception(); in RUNTIME_FUNCTION()
217 HandleScope scope(isolate); in RUNTIME_FUNCTION()
221 DCHECK(isolate->context().is_null()); in RUNTIME_FUNCTION()
222 isolate->set_context(instance->native_context()); in RUNTIME_FUNCTION()
230 WasmInstanceObject::GetWasmExternalFunction(isolate, instance, in RUNTIME_FUNCTION()
238 return ReadOnlyRoots(isolate).undefined_value(); in RUNTIME_FUNCTION()
243 isolate, sig, module); in RUNTIME_FUNCTION()
249 return ReadOnlyRoots(isolate).undefined_value(); in RUNTIME_FUNCTION()
253 HandleScope scope(isolate); in RUNTIME_FUNCTION()
257 FrameFinder<WasmFrame, StackFrame::EXIT> frame_finder(isolate); in RUNTIME_FUNCTION()
261 wasm::TriggerTierUp(isolate, native_module, func_index); in RUNTIME_FUNCTION()
263 return ReadOnlyRoots(isolate).undefined_value(); in RUNTIME_FUNCTION()
268 HandleScope scope(isolate); in RUNTIME_FUNCTION()
275 isolate}; in RUNTIME_FUNCTION()
284 HandleScope scope(isolate); in RUNTIME_FUNCTION()
293 isolate}; in RUNTIME_FUNCTION()
299 return ThrowWasmError(isolate, MessageTemplate::kAtomicsWaitNotAllowed); in RUNTIME_FUNCTION()
301 return FutexEmulation::WaitWasm32(isolate, array_buffer, offset, in RUNTIME_FUNCTION()
307 HandleScope scope(isolate); in RUNTIME_FUNCTION()
316 isolate}; in RUNTIME_FUNCTION()
322 return ThrowWasmError(isolate, MessageTemplate::kAtomicsWaitNotAllowed); in RUNTIME_FUNCTION()
324 return FutexEmulation::WaitWasm64(isolate, array_buffer, offset, in RUNTIME_FUNCTION()
330 Object ThrowTableOutOfBounds(Isolate* isolate, in ThrowTableOutOfBounds() argument
334 if (isolate->context().is_null()) { in ThrowTableOutOfBounds()
335 isolate->set_context(instance->native_context()); in ThrowTableOutOfBounds()
337 Handle<Object> error_obj = isolate->factory()->NewWasmRuntimeError( in ThrowTableOutOfBounds()
339 return isolate->Throw(*error_obj); in ThrowTableOutOfBounds()
345 HandleScope scope(isolate); in RUNTIME_FUNCTION()
351 WasmInstanceObject::GetOrCreateWasmExternalFunction(isolate, instance, in RUNTIME_FUNCTION()
359 HandleScope scope(isolate); in RUNTIME_FUNCTION()
366 WasmTableObject::cast(instance->tables().get(table_index)), isolate); in RUNTIME_FUNCTION()
374 if (!WasmTableObject::IsInBounds(isolate, table, entry_index)) { in RUNTIME_FUNCTION()
375 return ThrowWasmError(isolate, MessageTemplate::kWasmTrapTableOutOfBounds); in RUNTIME_FUNCTION()
378 return *WasmTableObject::Get(isolate, table, entry_index); in RUNTIME_FUNCTION()
383 HandleScope scope(isolate); in RUNTIME_FUNCTION()
390 Handle<Object> element(element_raw, isolate); in RUNTIME_FUNCTION()
393 WasmTableObject::cast(instance->tables().get(table_index)), isolate); in RUNTIME_FUNCTION()
401 if (!WasmTableObject::IsInBounds(isolate, table, entry_index)) { in RUNTIME_FUNCTION()
402 return ThrowWasmError(isolate, MessageTemplate::kWasmTrapTableOutOfBounds); in RUNTIME_FUNCTION()
404 WasmTableObject::Set(isolate, table, entry_index, element); in RUNTIME_FUNCTION()
405 return ReadOnlyRoots(isolate).undefined_value(); in RUNTIME_FUNCTION()
410 HandleScope scope(isolate); in RUNTIME_FUNCTION()
422 DCHECK(!isolate->context().is_null()); in RUNTIME_FUNCTION()
425 isolate, instance, table_index, elem_segment_index, dst, src, count); in RUNTIME_FUNCTION()
426 if (oob) return ThrowTableOutOfBounds(isolate, instance); in RUNTIME_FUNCTION()
427 return ReadOnlyRoots(isolate).undefined_value(); in RUNTIME_FUNCTION()
432 HandleScope scope(isolate); in RUNTIME_FUNCTION()
444 DCHECK(!isolate->context().is_null()); in RUNTIME_FUNCTION()
447 isolate, instance, table_dst_index, table_src_index, dst, src, count); in RUNTIME_FUNCTION()
448 if (oob) return ThrowTableOutOfBounds(isolate, instance); in RUNTIME_FUNCTION()
449 return ReadOnlyRoots(isolate).undefined_value(); in RUNTIME_FUNCTION()
454 HandleScope scope(isolate); in RUNTIME_FUNCTION()
457 Handle<WasmInstanceObject>(GetWasmInstanceOnStackTop(isolate), isolate); in RUNTIME_FUNCTION()
461 Handle<Object> value(value_raw, isolate); in RUNTIME_FUNCTION()
465 WasmTableObject::cast(instance->tables().get(table_index)), isolate); in RUNTIME_FUNCTION()
466 int result = WasmTableObject::Grow(isolate, table, delta, value); in RUNTIME_FUNCTION()
473 HandleScope scope(isolate); in RUNTIME_FUNCTION()
476 Handle<WasmInstanceObject>(GetWasmInstanceOnStackTop(isolate), isolate); in RUNTIME_FUNCTION()
481 Handle<Object> value(value_raw, isolate); in RUNTIME_FUNCTION()
485 WasmTableObject::cast(instance->tables().get(table_index)), isolate); in RUNTIME_FUNCTION()
490 return ThrowTableOutOfBounds(isolate, instance); in RUNTIME_FUNCTION()
497 return ThrowTableOutOfBounds(isolate, instance); in RUNTIME_FUNCTION()
499 WasmTableObject::Fill(isolate, table, start, value, fill_count); in RUNTIME_FUNCTION()
501 return ReadOnlyRoots(isolate).undefined_value(); in RUNTIME_FUNCTION()
506 HandleScope scope(isolate); in RUNTIME_FUNCTION()
509 frame_finder(isolate); in RUNTIME_FUNCTION()
510 auto instance = handle(frame_finder.frame()->wasm_instance(), isolate); in RUNTIME_FUNCTION()
512 isolate->set_context(instance->native_context()); in RUNTIME_FUNCTION()
515 DebugScope debug_scope(isolate->debug()); in RUNTIME_FUNCTION()
520 debug_info->ClearStepping(isolate); in RUNTIME_FUNCTION()
521 StepAction stepAction = isolate->debug()->last_step_action(); in RUNTIME_FUNCTION()
522 isolate->debug()->ClearStepping(); in RUNTIME_FUNCTION()
523 isolate->debug()->OnDebugBreak(isolate->factory()->empty_fixed_array(), in RUNTIME_FUNCTION()
525 return ReadOnlyRoots(isolate).undefined_value(); in RUNTIME_FUNCTION()
529 Handle<Script> script(instance->module_object().script(), isolate); in RUNTIME_FUNCTION()
531 if (WasmScript::CheckBreakPoints(isolate, script, position) in RUNTIME_FUNCTION()
533 debug_info->ClearStepping(isolate); in RUNTIME_FUNCTION()
534 StepAction stepAction = isolate->debug()->last_step_action(); in RUNTIME_FUNCTION()
535 isolate->debug()->ClearStepping(); in RUNTIME_FUNCTION()
536 if (isolate->debug()->break_points_active()) { in RUNTIME_FUNCTION()
538 isolate->debug()->OnDebugBreak(breakpoints, stepAction); in RUNTIME_FUNCTION()
542 return ReadOnlyRoots(isolate).undefined_value(); in RUNTIME_FUNCTION()
547 HandleScope scope(isolate); in RUNTIME_FUNCTION()
551 Handle<WasmInstanceObject> instance(GetWasmInstanceOnStackTop(isolate), in RUNTIME_FUNCTION()
552 isolate); in RUNTIME_FUNCTION()
553 return *wasm::AllocateSubRtt(isolate, instance, type_index, parent); in RUNTIME_FUNCTION()