File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -550,7 +550,24 @@ void Frame::Load() {
550550
551551
552552void Symbol::Load () {
553- kNameOffset = LoadConstant ({" class_Symbol__name__Object" });
553+ // map is the last field of HeapObject
554+ Constant<int64_t > maybe_name_offset =
555+ LoadConstant ({" class_HeapObject__map__Map" });
556+ common_->Load ();
557+ if (maybe_name_offset.Check ()) {
558+ int name_offset = *maybe_name_offset;
559+
560+ name_offset += common_->kPointerSize ;
561+ // class Name extends HeapObject and has only one uint32 field
562+ name_offset += sizeof (uint32_t );
563+ // class Symbol extends Name and has one int32 field before name
564+ name_offset += sizeof (int32_t );
565+
566+ kNameOffset =
567+ LoadOptionalConstant ({" class_Symbol__name__Object" }, name_offset);
568+ } else {
569+ kNameOffset = LoadConstant ({" class_Symbol__name__Object" });
570+ }
554571}
555572
556573
You can’t perform that action at this time.
0 commit comments