17#if defined(DART_PRECOMPILED_RUNTIME)
29 const Class& assert_error_class =
32 bool hit_assertion_error =
false;
33 for (; stack_frame !=
nullptr; stack_frame = iterator->
NextFrame()) {
35 if (
code.is_optimized()) {
37 while (!inlined_iterator.
Done()) {
39 if (hit_assertion_error) {
42 ASSERT(!hit_assertion_error);
43 hit_assertion_error = (func.
Owner() == assert_error_class.
ptr());
48 func =
code.function();
51 if (hit_assertion_error) {
54 ASSERT(!hit_assertion_error);
55 hit_assertion_error = (func.
Owner() == assert_error_class.
ptr());
71 Smi::CheckedHandle(zone, arguments->NativeArgAt(0)).Value());
73 Smi::CheckedHandle(zone, arguments->NativeArgAt(1)).Value());
76 Instance::CheckedHandle(zone, arguments->NativeArgAt(2));
87 intptr_t from_line = -1, from_column = -1;
90 if (
script.GetTokenLocation(assertion_start, &from_line, &from_column)) {
92 intptr_t to_line, to_column;
93 script.GetTokenLocation(assertion_end, &to_line, &to_column);
95 script.GetSnippet(from_line, from_column, to_line, to_column);
99 if (condition_text.IsNull()) {
100 condition_text = Symbols::OptimizedOut().ptr();
102 args.SetAt(0, condition_text);
125 const String& failed_assertion =
126 String::CheckedHandle(zone, arguments->NativeArgAt(0));
127 const String& script_url =
128 String::CheckedHandle(zone, arguments->NativeArgAt(1));
129 const intptr_t
line =
130 Smi::CheckedHandle(zone, arguments->NativeArgAt(2)).Value();
131 const intptr_t column =
132 Smi::CheckedHandle(zone, arguments->NativeArgAt(3)).Value();
134 Instance::CheckedHandle(zone, arguments->NativeArgAt(4));
138 args.SetAt(0, failed_assertion);
139 args.SetAt(1, script_url);
159 Smi::CheckedHandle(zone, arguments->NativeArgAt(0)).Value());
161 Instance::CheckedHandle(zone, arguments->NativeArgAt(1));
163 AbstractType::CheckedHandle(zone, arguments->NativeArgAt(2));
165 String::CheckedHandle(zone, arguments->NativeArgAt(3));
static ArrayPtr New(intptr_t len, Heap::Space space=Heap::kNew)
static DART_NORETURN void ThrowByType(ExceptionType type, const Array &arguments)
static ScriptPtr GetCallerScript(DartFrameIterator *iterator)
static void CreateAndThrowTypeError(TokenPosition location, const AbstractType &src_type, const AbstractType &dst_type, const String &dst_name)
static DART_NORETURN void ThrowWithStackTrace(Thread *thread, const Instance &exception, const Instance &stacktrace)
FunctionPtr function() const
AbstractTypePtr GetType(Heap::Space space) const
static ClassPtr LookupCoreClass(const String &class_name)
static SmiPtr New(intptr_t value)
@ kNoCrossThreadIteration
CodePtr LookupDartCode() const
static TokenPosition Deserialize(int32_t value)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
const uint8_t uint32_t uint32_t GError ** error
static ScriptPtr FindScript(DartFrameIterator *iterator)
DEFINE_NATIVE_ENTRY(List_allocate, 0, 2)
#define GET_NON_NULL_NATIVE_ARGUMENT(type, name, value)