[VM runtime] Introduce a new VM class Bytecode.
Allow pc_marker slot to hold a Code object or a new Bytecode object. Change-Id: If11c1df6dafc5b1cfcce6f0322c36d1d68e86df9 Reviewed-on: https://dart-review.googlesource.com/c/82526 Commit-Queue: Régis Crelier <regis@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
bea7be00e1
commit
f721d52163
@@ -145,15 +145,22 @@ static void AppendFrames(const GrowableObjectArray& code_list,
|
||||
StackFrame* frame = frames.NextFrame();
|
||||
ASSERT(frame != NULL); // We expect to find a dart invocation frame.
|
||||
Code& code = Code::Handle();
|
||||
Bytecode& bytecode = Bytecode::Handle();
|
||||
Smi& offset = Smi::Handle();
|
||||
while (frame != NULL) {
|
||||
if (frame->IsDartFrame()) {
|
||||
if (skip_frames > 0) {
|
||||
skip_frames--;
|
||||
} else {
|
||||
code = frame->LookupDartCode();
|
||||
offset = Smi::New(frame->pc() - code.PayloadStart());
|
||||
code_list.Add(code);
|
||||
if (frame->is_interpreted()) {
|
||||
bytecode = frame->LookupDartBytecode();
|
||||
offset = Smi::New(frame->pc() - bytecode.PayloadStart());
|
||||
code_list.Add(bytecode);
|
||||
} else {
|
||||
code = frame->LookupDartCode();
|
||||
offset = Smi::New(frame->pc() - code.PayloadStart());
|
||||
code_list.Add(code);
|
||||
}
|
||||
pc_offset_list.Add(offset);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user