| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index 86bd0b75b5a41a80af1696a8b22783424d70eb19..5b528ce22574bf81c1110d663a6259e50fa304ab 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -6072,11 +6072,65 @@ const char* ExceptionHandlers::ToCString() const {
|
| }
|
|
|
|
|
| +CodeComments CodeComments::New(int count) {
|
| + if (count == 0) return CodeComments();
|
| + return CodeComments(Array::New(count * kNumberOfEntries));
|
| +}
|
| +
|
| +
|
| +intptr_t CodeComments::Length() {
|
| + return comments_.IsNull() ? 0 : (comments_.Length() / kNumberOfEntries);
|
| +}
|
| +
|
| +
|
| +intptr_t CodeComments::PCAt(int idx) {
|
| + return Smi::CheckedHandle(
|
| + comments_.At(idx * kNumberOfEntries + kPCEntry)).Value();
|
| +}
|
| +
|
| +
|
| +void CodeComments::SetPCAt(int idx, intptr_t pc) {
|
| + comments_.SetAt(idx * kNumberOfEntries + kPCEntry,
|
| + Smi::Handle(Smi::New(pc)));
|
| +}
|
| +
|
| +
|
| +const String& CodeComments::CommentAt(int idx) {
|
| + return String::CheckedHandle(
|
| + comments_.At(idx * kNumberOfEntries + kCommentEntry));
|
| +}
|
| +
|
| +
|
| +void CodeComments::SetCommentAt(int idx, const String& comment) {
|
| + comments_.SetAt(idx * kNumberOfEntries + kCommentEntry, comment);
|
| +}
|
| +
|
| +
|
| +CodeComments::CodeComments(RawArray* comments)
|
| + : comments_(Array::Handle(comments)) {
|
| +}
|
| +
|
| +
|
| +CodeComments::CodeComments()
|
| + : comments_(Array::Handle()) {
|
| +}
|
| +
|
| +
|
| void Code::set_stackmaps(const Array& maps) const {
|
| StorePointer(&raw_ptr()->stackmaps_, maps.raw());
|
| }
|
|
|
|
|
| +CodeComments Code::comments() const {
|
| + return CodeComments(raw_ptr()->comments_);
|
| +}
|
| +
|
| +
|
| +void Code::set_comments(const CodeComments& comments) const {
|
| + StorePointer(&raw_ptr()->comments_, comments.comments_.raw());
|
| +}
|
| +
|
| +
|
| RawCode* Code::New(int pointer_offsets_length) {
|
| const Class& cls = Class::Handle(Object::code_class());
|
| Code& result = Code::Handle();
|
|
|