Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
constant_reader.cc
Go to the documentation of this file.
1// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
6
7#include "vm/object_store.h"
8
9namespace dart {
10namespace kernel {
11
12#define Z (zone_)
13#define H (translation_helper_)
14
15// Note: If changing how the constants are saved in the binary (and thus how
16// they are read here) be aware that there's also some reading going on in
17// KernelLoader::ReadVMAnnotations which then also has to be updated!
18
20 ActiveClass* active_class)
21 : helper_(helper),
22 zone_(helper->zone_),
23 translation_helper_(helper->translation_helper_),
24 active_class_(active_class),
25 result_(Object::Handle(zone_)) {}
26
28 intptr_t constant_index,
29 intptr_t* pragma_name_constant_index,
30 intptr_t* pragma_options_constant_index) {
31 KernelReaderHelper reader(Z, &H, H.constants_table(), 0);
32 NavigateToIndex(&reader, constant_index);
33
34 if (reader.ReadByte() == kInstanceConstant) {
36 if (H.IsRoot(index) ||
37 !H.StringEquals(H.CanonicalNameString(index), "pragma")) {
38 return false;
39 }
40 index = H.CanonicalNameParent(index);
41 if (H.IsRoot(index) ||
42 !H.StringEquals(H.CanonicalNameString(index), "dart:core")) {
43 return false;
44 }
45 const intptr_t num_type_args = reader.ReadUInt();
46 if (num_type_args != 0) return false;
47
48 const intptr_t num_fields = reader.ReadUInt();
49 if (num_fields != 2) return false;
50
51 const NameIndex field0_name = reader.ReadCanonicalNameReference();
52 if (H.IsRoot(field0_name) ||
53 !H.StringEquals(H.CanonicalNameString(field0_name), "name")) {
54 return false;
55 }
56 const intptr_t name_index = reader.ReadUInt();
57 if (pragma_name_constant_index != nullptr) {
58 *pragma_name_constant_index = name_index;
59 }
60
61 const NameIndex field1_name = reader.ReadCanonicalNameReference();
62 if (H.IsRoot(field1_name) ||
63 !H.StringEquals(H.CanonicalNameString(field1_name), "options")) {
64 return false;
65 }
66 const intptr_t options_index = reader.ReadUInt();
67 if (pragma_options_constant_index != nullptr) {
68 *pragma_options_constant_index = options_index;
69 }
70 return true;
71 }
72 return false;
73}
74
75bool ConstantReader::IsStringConstant(intptr_t constant_index,
76 const char* name) {
77 KernelReaderHelper reader(Z, &H, H.constants_table(), 0);
78 NavigateToIndex(&reader, constant_index);
79
80 if (reader.ReadByte() == kStringConstant) {
81 const StringIndex index = reader.ReadStringReference();
82 return H.StringEquals(index, name);
83 }
84 return false;
85}
86
87bool ConstantReader::GetStringConstant(intptr_t constant_index,
88 String* out_value) {
89 KernelReaderHelper reader(Z, &H, H.constants_table(), 0);
90 NavigateToIndex(&reader, constant_index);
91
92 if (reader.ReadByte() == kStringConstant) {
93 const StringIndex index = reader.ReadStringReference();
94 *out_value = H.DartSymbolPlain(index).ptr();
95 return true;
96 }
97 return false;
98}
99
101 Tag tag = helper_->ReadTag(); // read tag.
102 switch (tag) {
103 case kSomething:
104 return ReadConstantExpression();
105 default:
106 const auto& script = Script::Handle(Z, Script());
107 H.ReportError(script, TokenPosition::kNoSource,
108 "Not a constant expression: unexpected kernel tag %s (%d)",
109 Reader::TagName(tag), tag);
110 }
111 return Instance::RawCast(result_.ptr());
112}
113
115 Tag tag = helper_->ReadTag(); // read tag.
116 switch (tag) {
117 case kConstantExpression:
118 helper_->ReadPosition();
119 helper_->SkipDartType();
120 result_ = ReadConstant(helper_->ReadUInt());
121 break;
122 case kFileUriConstantExpression:
123 helper_->ReadPosition();
124 helper_->ReadUInt();
125 helper_->SkipDartType();
126 result_ = ReadConstant(helper_->ReadUInt());
127 break;
128 case kInvalidExpression: {
129 helper_->ReadPosition(); // Skip position.
130 const String& message = H.DartString(helper_->ReadStringReference());
131 const auto& script = Script::Handle(Z, Script());
132 // Invalid expression message has pointer to the source code, no need to
133 // report it twice.
134 H.ReportError(script, TokenPosition::kNoSource, "%s",
135 message.ToCString());
136 break;
137 }
138 default:
139 const auto& script = Script::Handle(Z, Script());
140 H.ReportError(script, TokenPosition::kNoSource,
141 "Not a constant expression: unexpected kernel tag %s (%d)",
142 Reader::TagName(tag), tag);
143 }
144 return Instance::RawCast(result_.ptr());
145}
146
148 intptr_t list_length = helper_->ReadListLength(); // read list length.
149 const auto& metadata_values =
150 Array::Handle(Z, ImmutableArray::New(list_length, H.allocation_space()));
152 for (intptr_t i = 0; i < list_length; ++i) {
153 // This will read the expression.
155 metadata_values.SetAt(i, value);
156 }
157 return H.Canonicalize(metadata_values);
158}
159
160InstancePtr ConstantReader::ReadConstant(intptr_t constant_index) {
161 ASSERT(!H.constants().IsNull());
162 ASSERT(!H.constants_table().IsNull()); // raw bytes
163
164 // For kernel-level cache (in contrast with script-level caching),
165 // we need to access the raw constants array inside the shared
166 // KernelProgramInfo directly, so that all scripts will see the
167 // results after new insertions. These accesses at kernel-level
168 // must be locked since mutator and background compiler can
169 // access the array at the same time.
170 {
172 H.thread()->isolate_group()->kernel_constants_mutex());
173 const auto& constants_array =
174 Array::Handle(Z, H.GetKernelProgramInfo().constants());
175 ASSERT(constant_index < constants_array.Length());
176 result_ = constants_array.At(constant_index);
177 }
178
179 // On miss, evaluate, and insert value.
180 if (result_.ptr() == Object::sentinel().ptr()) {
181 LeaveCompilerScope cs(H.thread());
182 result_ = ReadConstantInternal(constant_index);
184 H.thread()->isolate_group()->kernel_constants_mutex());
185 const auto& constants_array =
186 Array::Handle(Z, H.GetKernelProgramInfo().constants());
187 ASSERT(constant_index < constants_array.Length());
188 constants_array.SetAt(constant_index, result_);
189 }
190 return Instance::RawCast(result_.ptr());
191}
192
193bool ConstantReader::IsInstanceConstant(intptr_t constant_index,
194 const Class& clazz) {
195 // Get reader directly into raw bytes of constant table/constant mapping.
196 KernelReaderHelper reader(Z, &H, H.constants_table(), 0);
197 NavigateToIndex(&reader, constant_index);
198
199 // Peek for an instance of the given clazz.
200 if (reader.ReadByte() == kInstanceConstant) {
201 const NameIndex index = reader.ReadCanonicalNameReference();
202 return H.LookupClassByKernelClass(index) == clazz.ptr();
203 }
204 return false;
205}
206
208 ASSERT(!H.constants_table().IsNull());
209 KernelReaderHelper reader(Z, &H, H.constants_table(), 0);
210 return NumConstants(&reader);
211}
212
214 // Get reader directly into raw bytes of constant table/constant mapping.
215 // Get the length of the constants (at the end of the mapping).
216 reader->SetOffset(reader->ReaderSize() - 4);
217 return reader->ReadUInt32();
218}
219
220intptr_t ConstantReader::NavigateToIndex(KernelReaderHelper* reader,
221 intptr_t constant_index) {
222 const intptr_t num_constants = NumConstants(reader);
223
224 // Get the binary offset of the constant at the wanted index.
225 reader->SetOffset(reader->ReaderSize() - 4 - (num_constants * 4) +
226 (constant_index * 4));
227 const intptr_t constant_offset = reader->ReadUInt32();
228
229 reader->SetOffset(constant_offset);
230
231 return constant_offset;
232}
233
234InstancePtr ConstantReader::ReadConstantInternal(intptr_t constant_index) {
235 // Get reader directly into raw bytes of constant table/constant mapping.
236 KernelReaderHelper reader(Z, &H, H.constants_table(), 0);
237 const intptr_t constant_offset = NavigateToIndex(&reader, constant_index);
238
239 // No function types returned as part of any types built should reference
240 // free parent type args, ensured by clearing the enclosing function type.
241 ActiveEnclosingFunctionScope scope(active_class_, nullptr);
242 // Construct constant from raw bytes.
243 Instance& instance = Instance::Handle(Z);
244 const intptr_t constant_tag = reader.ReadByte();
245 switch (constant_tag) {
246 case kNullConstant:
248 break;
249 case kBoolConstant:
250 instance = reader.ReadByte() == 1 ? Object::bool_true().ptr()
251 : Object::bool_false().ptr();
252 break;
253 case kIntConstant: {
254 uint8_t payload = 0;
255 Tag integer_tag = reader.ReadTag(&payload); // read tag.
256 switch (integer_tag) {
257 case kBigIntLiteral: {
258 reader.ReadPosition();
259 const String& value = H.DartString(reader.ReadStringReference());
261 break;
262 }
263 case kSpecializedIntLiteral: {
264 reader.ReadPosition();
265 const int64_t value =
266 static_cast<int32_t>(payload) - SpecializedIntLiteralBias;
268 break;
269 }
270 case kNegativeIntLiteral: {
271 reader.ReadPosition();
272 const int64_t value = -static_cast<int64_t>(reader.ReadUInt());
274 break;
275 }
276 case kPositiveIntLiteral: {
277 reader.ReadPosition();
278 const int64_t value = reader.ReadUInt();
280 break;
281 }
282 default:
283 const auto& script = Script::Handle(Z, Script());
284 H.ReportError(
285 script, TokenPosition::kNoSource,
286 "Cannot lazily read integer: unexpected kernel tag %s (%d)",
287 Reader::TagName(integer_tag), integer_tag);
288 }
289 break;
290 }
291 case kDoubleConstant:
292 instance = Double::New(reader.ReadDouble(), Heap::kOld);
293 break;
294 case kStringConstant:
295 instance = H.DartSymbolPlain(reader.ReadStringReference()).ptr();
296 break;
297 case kSymbolConstant: {
298 Library& library = Library::Handle(Z);
299 library = Library::InternalLibrary();
300 const auto& symbol_class =
301 Class::Handle(Z, library.LookupClass(Symbols::Symbol()));
302 const auto& symbol_name_field = Field::Handle(
303 Z, symbol_class.LookupInstanceFieldAllowPrivate(Symbols::_name()));
304 ASSERT(!symbol_name_field.IsNull());
305 const NameIndex index = reader.ReadCanonicalNameReference();
306 if (index == -1) {
307 library = Library::null();
308 } else {
309 library = H.LookupLibraryByKernelLibrary(index);
310 }
311 const String& symbol =
312 H.DartIdentifier(library, reader.ReadStringReference());
313 instance = Instance::New(symbol_class, Heap::kOld);
314 instance.SetField(symbol_name_field, symbol);
315 break;
316 }
317 case kListConstant: {
318 const auto& list_class = Class::Handle(
319 Z, H.isolate_group()->object_store()->immutable_array_class());
320 ASSERT(!list_class.IsNull());
321 ASSERT(list_class.is_finalized());
322 // Build type from the raw bytes (needs temporary translator).
323 TypeTranslator type_translator(&reader, this, active_class_,
324 /* finalize = */ true,
325 /* in_constant_context = */ true);
326 auto& type_arguments =
328 AbstractType& type = type_translator.BuildType();
329 type_arguments.SetTypeAt(0, type);
330 // Instantiate class.
331 type_arguments =
332 list_class.GetInstanceTypeArguments(H.thread(), type_arguments);
333 // Fill array with constant elements.
334 const intptr_t length = reader.ReadUInt();
335 const Array& array =
337 array.SetTypeArguments(type_arguments);
338 Instance& constant = Instance::Handle(Z);
339 for (intptr_t j = 0; j < length; ++j) {
340 // Recurse into lazily evaluating all "sub" constants
341 // needed to evaluate the current constant.
342 const intptr_t entry_index = reader.ReadUInt();
343 ASSERT(entry_index < constant_offset); // DAG!
344 constant = ReadConstant(entry_index);
345 array.SetAt(j, constant);
346 }
347 instance = array.ptr();
348 break;
349 }
350 case kMapConstant: {
351 const auto& map_class = Class::Handle(
352 Z, H.isolate_group()->object_store()->const_map_impl_class());
353 ASSERT(!map_class.IsNull());
354 ASSERT(map_class.is_finalized());
355
356 // Build types from the raw bytes (needs temporary translator).
357 TypeTranslator type_translator(&reader, this, active_class_,
358 /* finalize = */ true,
359 /* in_constant_context = */ true);
360 auto& type_arguments =
362 AbstractType& type = type_translator.BuildType();
363 type_arguments.SetTypeAt(0, type);
364 type = type_translator.BuildType().ptr();
365 type_arguments.SetTypeAt(1, type);
366
367 // Instantiate class.
368 type_arguments =
369 map_class.GetInstanceTypeArguments(H.thread(), type_arguments);
370
371 // Fill map with constant elements.
373 ASSERT_EQUAL(map.GetClassId(), kConstMapCid);
374 map.SetTypeArguments(type_arguments);
375 const intptr_t length = reader.ReadUInt();
376 const intptr_t used_data = (length << 1);
377 map.set_used_data(used_data);
378
379 const auto& data = Array::Handle(Z, Array::New(used_data));
380 map.set_data(data);
381
382 map.set_deleted_keys(0);
383 map.ComputeAndSetHashMask();
384
385 Instance& constant = Instance::Handle(Z);
386 for (intptr_t j = 0; j < used_data; ++j) {
387 // Recurse into lazily evaluating all "sub" constants
388 // needed to evaluate the current constant.
389 const intptr_t entry_index = reader.ReadUInt();
390 ASSERT(entry_index < constant_offset); // DAG!
391 constant = ReadConstant(entry_index);
392 data.SetAt(j, constant);
393 }
394
395 instance = map.ptr();
396 break;
397 }
398 case kRecordConstant: {
399 const intptr_t num_positional = reader.ReadListLength();
400 intptr_t num_named = 0;
401 const Array* field_names = &Array::empty_array();
402 {
403 AlternativeReadingScope alt(&reader.reader_);
404 for (intptr_t j = 0; j < num_positional; ++j) {
405 reader.ReadUInt();
406 }
407 num_named = reader.ReadListLength();
408 if (num_named > 0) {
409 auto& names = Array::Handle(Z, Array::New(num_named));
410 for (intptr_t j = 0; j < num_named; ++j) {
411 String& name = H.DartSymbolObfuscate(reader.ReadStringReference());
412 names.SetAt(j, name);
413 reader.ReadUInt();
414 }
415 names.MakeImmutable();
416 field_names = &names;
417 }
418 }
419 const intptr_t num_fields = num_positional + num_named;
420 const RecordShape shape =
421 RecordShape::Register(H.thread(), num_fields, *field_names);
422 const auto& record = Record::Handle(Z, Record::New(shape));
423 intptr_t pos = 0;
424 for (intptr_t j = 0; j < num_positional; ++j) {
425 const intptr_t entry_index = reader.ReadUInt();
426 ASSERT(entry_index < constant_offset); // DAG!
427 instance = ReadConstant(entry_index);
428 record.SetFieldAt(pos++, instance);
429 }
430 reader.ReadListLength();
431 for (intptr_t j = 0; j < num_named; ++j) {
432 reader.ReadStringReference();
433 const intptr_t entry_index = reader.ReadUInt();
434 ASSERT(entry_index < constant_offset); // DAG!
435 instance = ReadConstant(entry_index);
436 record.SetFieldAt(pos++, instance);
437 }
438 instance = record.ptr();
439 break;
440 }
441 case kSetConstant: {
442 const auto& set_class = Class::Handle(
443 Z, H.isolate_group()->object_store()->const_set_impl_class());
444 ASSERT(!set_class.IsNull());
445 ASSERT(set_class.is_finalized());
446
447 // Build types from the raw bytes (needs temporary translator).
448 TypeTranslator type_translator(&reader, this, active_class_,
449 /* finalize = */ true,
450 /* in_constant_context = */ true);
451 auto& type_arguments =
453 AbstractType& type = type_translator.BuildType();
454 type_arguments.SetTypeAt(0, type);
455
456 // Instantiate class.
457 type_arguments =
458 set_class.GetInstanceTypeArguments(H.thread(), type_arguments);
459
460 // Fill set with constant elements.
462 ASSERT_EQUAL(set.GetClassId(), kConstSetCid);
463 set.SetTypeArguments(type_arguments);
464 const intptr_t length = reader.ReadUInt();
465 const intptr_t used_data = length;
466 set.set_used_data(used_data);
467
468 const auto& data = Array::Handle(Z, Array::New(used_data));
469 set.set_data(data);
470
471 set.set_deleted_keys(0);
472 set.ComputeAndSetHashMask();
473
474 Instance& constant = Instance::Handle(Z);
475 for (intptr_t j = 0; j < used_data; ++j) {
476 // Recurse into lazily evaluating all "sub" constants
477 // needed to evaluate the current constant.
478 const intptr_t entry_index = reader.ReadUInt();
479 ASSERT(entry_index < constant_offset); // DAG!
480 constant = ReadConstant(entry_index);
481 data.SetAt(j, constant);
482 }
483
484 instance = set.ptr();
485 break;
486 }
487 case kInstanceConstant: {
488 const NameIndex index = reader.ReadCanonicalNameReference();
489 const auto& klass = Class::Handle(Z, H.LookupClassByKernelClass(index));
490 if (!klass.is_declaration_loaded()) {
491 FATAL(
492 "Trying to evaluate an instance constant whose references class "
493 "%s is not loaded yet.",
494 klass.ToCString());
495 }
496 const auto& obj =
497 Object::Handle(Z, klass.EnsureIsAllocateFinalized(H.thread()));
498 ASSERT(obj.IsNull());
499 ASSERT(klass.is_enum_class() || klass.is_const());
501 // Build type from the raw bytes (needs temporary translator).
502 TypeTranslator type_translator(&reader, this, active_class_,
503 /* finalize = */ true,
504 /* in_constant_context = */ true);
505 const intptr_t number_of_type_arguments = reader.ReadUInt();
506 if (klass.NumTypeArguments() > 0) {
507 auto& type_arguments = TypeArguments::Handle(
508 Z, TypeArguments::New(number_of_type_arguments, Heap::kOld));
509 for (intptr_t j = 0; j < number_of_type_arguments; ++j) {
510 type_arguments.SetTypeAt(j, type_translator.BuildType());
511 }
512 // Instantiate class.
513 type_arguments =
514 klass.GetInstanceTypeArguments(H.thread(), type_arguments);
515 instance.SetTypeArguments(type_arguments);
516 } else {
517 ASSERT(number_of_type_arguments == 0);
518 }
519 // Set the fields.
520 const intptr_t number_of_fields = reader.ReadUInt();
521 Field& field = Field::Handle(Z);
522 Instance& constant = Instance::Handle(Z);
523 for (intptr_t j = 0; j < number_of_fields; ++j) {
524 field = H.LookupFieldByKernelField(reader.ReadCanonicalNameReference());
525 // Recurse into lazily evaluating all "sub" constants
526 // needed to evaluate the current constant.
527 const intptr_t entry_index = reader.ReadUInt();
528 ASSERT(entry_index < constant_offset); // DAG!
529 constant = ReadConstant(entry_index);
530 instance.SetField(field, constant);
531 }
532 break;
533 }
535 // Recurse into lazily evaluating the "sub" constant
536 // needed to evaluate the current constant.
537 const intptr_t entry_index = reader.ReadUInt();
538 ASSERT(entry_index < constant_offset); // DAG!
539 const auto& constant = Instance::Handle(Z, ReadConstant(entry_index));
540 ASSERT(!constant.IsNull());
541
542 // Build type from the raw bytes (needs temporary translator).
543 TypeTranslator type_translator(&reader, this, active_class_,
544 /* finalize = */ true,
545 /* in_constant_context = */ true);
546 const intptr_t number_of_type_arguments = reader.ReadUInt();
547 ASSERT(number_of_type_arguments > 0);
548 auto& type_arguments = TypeArguments::Handle(
549 Z, TypeArguments::New(number_of_type_arguments, Heap::kOld));
550 for (intptr_t j = 0; j < number_of_type_arguments; ++j) {
551 type_arguments.SetTypeAt(j, type_translator.BuildType());
552 }
553 type_arguments = type_arguments.Canonicalize(Thread::Current());
554 // Make a copy of the old closure, and set delayed type arguments.
555 Closure& closure = Closure::Handle(Z, Closure::RawCast(constant.ptr()));
556 Function& function = Function::Handle(Z, closure.function());
557 const auto& type_arguments2 =
558 TypeArguments::Handle(Z, closure.instantiator_type_arguments());
559 // The function type arguments are used for type parameters from enclosing
560 // closures. Though inner closures cannot be constants. We should
561 // therefore see `null here.
562 ASSERT(closure.function_type_arguments() == TypeArguments::null());
563 Object& context = Object::Handle(Z, closure.RawContext());
564 instance = Closure::New(type_arguments2, Object::null_type_arguments(),
565 type_arguments, function, context, Heap::kOld);
566 break;
567 }
571 const NameIndex index = reader.ReadCanonicalNameReference();
572 Function& function = Function::Handle(Z);
573 if (H.IsConstructor(index)) {
574 function = H.LookupConstructorByKernelConstructor(index);
575 } else {
576 function = H.LookupStaticMethodByKernelProcedure(index);
577 }
578 function = function.ImplicitClosureFunction();
579 instance = function.ImplicitStaticClosure();
580 break;
581 }
583 // Build type from the raw bytes (needs temporary translator).
584 // Const canonical type erasure is not applied to constant type literals.
585 // However, CFE must ensure that constant type literals can be
586 // canonicalized to an identical representant independently of the null
587 // safety mode currently in use (sound or unsound) or migration state of
588 // the declaring library (legacy or opted-in).
589 TypeTranslator type_translator(&reader, this, active_class_,
590 /* finalize = */ true,
591 /* in_constant_context = */ true);
592 instance = type_translator.BuildType().ptr();
593 break;
594 }
595 default:
596 // We should never see unevaluated constants (kUnevaluatedConstant) in
597 // the constant table, they should have been fully evaluated before we
598 // get them.
599 const auto& script = Script::Handle(Z, Script());
600 H.ReportError(script, TokenPosition::kNoSource,
601 "Cannot lazily read constant: unexpected kernel tag (%" Pd
602 ")",
603 constant_tag);
604 }
605 return H.Canonicalize(instance);
606}
607
608} // namespace kernel
609} // namespace dart
SkPoint pos
#define ASSERT_EQUAL(expected, actual)
Definition assert.h:309
#define Z
static ArrayPtr New(intptr_t len, Heap::Space space=Heap::kNew)
Definition object.h:10933
static ClosurePtr New(const TypeArguments &instantiator_type_arguments, const TypeArguments &function_type_arguments, const Function &function, const Object &context, Heap::Space space=Heap::kNew)
Definition object.cc:26021
static ConstMapPtr NewUninitialized(Heap::Space space=Heap::kNew)
Definition object.cc:25320
static ConstSetPtr NewUninitialized(Heap::Space space=Heap::kNew)
Definition object.cc:25368
static DoublePtr New(double d, Heap::Space space=Heap::kNew)
Definition object.cc:23481
@ kOld
Definition heap.h:39
static ImmutableArrayPtr New(intptr_t len, Heap::Space space=Heap::kNew)
Definition object.cc:25064
static InstancePtr New(const Class &cls, Heap::Space space=Heap::kNew)
Definition object.cc:20976
static IntegerPtr New(const String &str, Heap::Space space=Heap::kNew)
Definition object.cc:23063
static LibraryPtr InternalLibrary()
Definition object.cc:14850
static ObjectPtr null()
Definition object.h:433
ObjectPtr ptr() const
Definition object.h:332
static Object & Handle()
Definition object.h:407
static ObjectPtr RawCast(ObjectPtr obj)
Definition object.h:325
static RecordShape Register(Thread *thread, intptr_t num_fields, const Array &field_names)
Definition object.cc:27980
static RecordPtr New(RecordShape shape, Heap::Space space=Heap::kNew)
Definition object.cc:27823
static const String & Symbol(intptr_t index)
Definition symbols.h:606
static Thread * Current()
Definition thread.h:361
static TypeArgumentsPtr New(intptr_t len, Heap::Space space=Heap::kOld)
Definition object.cc:7733
bool IsStringConstant(intptr_t constant_index, const char *name)
ConstantReader(KernelReaderHelper *helper, ActiveClass *active_class)
bool IsInstanceConstant(intptr_t constant_index, const Class &clazz)
InstancePtr ReadConstant(intptr_t constant_index)
bool GetStringConstant(intptr_t constant_index, String *out_value)
bool IsPragmaInstanceConstant(intptr_t constant_index, intptr_t *pragma_name_constant_index, intptr_t *pragma_options_constant_index)
Tag ReadTag(uint8_t *payload=nullptr)
static const char * TagName(Tag tag)
#define ASSERT(E)
VkInstance instance
Definition main.cc:48
#define FATAL(error)
uint8_t value
Dart_NativeFunction function
Definition fuchsia.cc:51
size_t length
Win32Message message
@ kConstructorTearOffConstant
@ kRedirectingFactoryTearOffConstant
static constexpr int SpecializedIntLiteralBias
static const char *const names[]
Definition symbols.cc:24
const char *const name
static int8_t data[kExtLength]
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not set
Definition switches.h:76
std::function< void()> closure
Definition closure.h:14
SI auto map(std::index_sequence< I... >, Fn &&fn, const Args &... args) -> skvx::Vec< sizeof...(I), decltype(fn(args[0]...))>
Definition SkVx.h:680
#define Pd
Definition globals.h:408
Definition SkMD5.cpp:130