352 {
354 Zone* zone = thread->zone();
357 bool is_nullable = true;
358
363 is_nullable = false;
365 is_nullable = false;
366 }
367 }
368
370 if (field_type.IsStrictlyNonNullable()) {
371 is_nullable = false;
372 }
373
374 FieldGuardState field_guard_state(
field);
375
376 bool used_guarded_state = false;
379
382 used_guarded_state = true;
383 }
384
385 if (is_nullable && !field_guard_state.
is_nullable()) {
386 is_nullable = false;
387 used_guarded_state = true;
388 }
389 }
390
393 ASSERT(!(needs_load_guard && is_unboxed));
394
395 if (needs_load_guard) {
396
399 is_nullable = true;
400 used_guarded_state = false;
401 }
402
403 if (is_unboxed) {
404
405
406
407 used_guarded_state = false;
408 is_nullable = false;
410 switch (nullable_cid) {
411 case kDoubleCid:
412 rep = kUnboxedDouble;
413 break;
414 case kFloat32x4Cid:
415 rep = kUnboxedFloat32x4;
416 break;
417 case kFloat64x2Cid:
418 rep = kUnboxedFloat64x2;
419 break;
420 default:
421 rep = kUnboxedInt64;
422 break;
423 }
424 }
425
426 const bool is_sentinel_visible =
428
429 CompileType
type = (rep != kTagged)
431 : CompileType(is_nullable, is_sentinel_visible,
432 nullable_cid, &field_type);
433
435 const Slot& slot = GetCanonicalSlot(
441 compiler::target::Class::HasCompressedPointers(owner)) |
444 field_guard_state);
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459 if (slot.is_guarded_field()) {
460 if (thread->isolate_group()->use_field_guards()) {
461 ASSERT(parsed_function !=
nullptr);
462 parsed_function->AddToGuardedFields(&slot.field());
463 } else {
464
465
467 }
468 }
469
470 return slot;
471}
static constexpr S encode(T value)
static CompileType FromUnboxedRepresentation(Representation rep)
static CompilerState & Current()
intptr_t guarded_cid() const
bool has_initializer() const
bool needs_load_guard() const
AbstractTypePtr type() const
static intptr_t ResultCidFromPragma(const Object &function_or_field)
static bool HasNonNullableResultTypeFromPragma(const Object &function_or_field)
static Object & ZoneHandle()
const Field & field() const
static Thread * Current()
static TypePtr DynamicType()