[vm/compiler] Keep one ReversePcLookupCache on the isolate group (instead of making one per-isolate)
There is no need to make each isolate have it's own PC -> RawCode lookup table, now that we share the program structure. Issue https://github.com/dart-lang/sdk/issues/36097 Change-Id: Iba2bbf7e735655b52c07a61c399c6d2409598145 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144297 Reviewed-by: Ryan Macnak <rmacnak@google.com> Reviewed-by: Alexander Aprelev <aam@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
e6baa97e9a
commit
25011b80b9
+15
-22
@@ -94,16 +94,14 @@ class StackFrame : public ValueObject {
|
||||
const char* ToCString() const;
|
||||
|
||||
// Check validity of a frame, used for assertion purposes.
|
||||
virtual bool IsValid(bool needed_for_gc = false) const;
|
||||
virtual bool IsValid() const;
|
||||
|
||||
// Returns the isolate containing the bare instructions of the current frame.
|
||||
// Returns the isolate group containing the bare instructions of the
|
||||
// current frame.
|
||||
//
|
||||
// If the frame does not belong to a bare instructions snapshot, it will
|
||||
// return nullptr.
|
||||
//
|
||||
// [needed_for_gc] has to be set to `true` if the caller needs only GC
|
||||
// relevant information.
|
||||
Isolate* IsolateOfBareInstructionsFrame(bool needed_for_gc) const;
|
||||
IsolateGroup* IsolateGroupOfBareInstructionsFrame() const;
|
||||
|
||||
// Returns true iff the current frame is a bare instructions dart frame.
|
||||
bool IsBareInstructionsDartFrame() const;
|
||||
@@ -112,12 +110,11 @@ class StackFrame : public ValueObject {
|
||||
bool IsBareInstructionsStubFrame() const;
|
||||
|
||||
// Frame type.
|
||||
virtual bool IsDartFrame(bool validate = true,
|
||||
bool needed_for_gc = false) const {
|
||||
ASSERT(!validate || IsValid(needed_for_gc));
|
||||
return !(IsEntryFrame() || IsExitFrame() || IsStubFrame(needed_for_gc));
|
||||
virtual bool IsDartFrame(bool validate = true) const {
|
||||
ASSERT(!validate || IsValid());
|
||||
return !(IsEntryFrame() || IsExitFrame() || IsStubFrame());
|
||||
}
|
||||
virtual bool IsStubFrame(bool neede_for_gc = false) const;
|
||||
virtual bool IsStubFrame() const;
|
||||
virtual bool IsEntryFrame() const { return false; }
|
||||
virtual bool IsExitFrame() const { return false; }
|
||||
|
||||
@@ -159,7 +156,7 @@ class StackFrame : public ValueObject {
|
||||
Thread* thread() const { return thread_; }
|
||||
|
||||
private:
|
||||
RawCode* GetCodeObject(bool needed_for_gc = false) const;
|
||||
RawCode* GetCodeObject() const;
|
||||
RawBytecode* GetBytecodeObject() const;
|
||||
|
||||
|
||||
@@ -200,11 +197,9 @@ class StackFrame : public ValueObject {
|
||||
// runtime code.
|
||||
class ExitFrame : public StackFrame {
|
||||
public:
|
||||
bool IsValid(bool needed_for_gc = false) const { return sp() == 0; }
|
||||
bool IsDartFrame(bool validate = true, bool needed_for_gc = false) const {
|
||||
return false;
|
||||
}
|
||||
bool IsStubFrame(bool needed_for_gc = false) const { return false; }
|
||||
bool IsValid() const { return sp() == 0; }
|
||||
bool IsDartFrame(bool validate = true) const { return false; }
|
||||
bool IsStubFrame() const { return false; }
|
||||
bool IsExitFrame() const { return true; }
|
||||
|
||||
// Visit objects in the frame.
|
||||
@@ -224,13 +219,11 @@ class ExitFrame : public StackFrame {
|
||||
// dart code.
|
||||
class EntryFrame : public StackFrame {
|
||||
public:
|
||||
bool IsValid(bool needed_for_gc = false) const {
|
||||
bool IsValid() const {
|
||||
return StubCode::InInvocationStub(pc(), is_interpreted());
|
||||
}
|
||||
bool IsDartFrame(bool validate = true, bool needed_for_gc = false) const {
|
||||
return false;
|
||||
}
|
||||
bool IsStubFrame(bool needed_for_gc = false) const { return false; }
|
||||
bool IsDartFrame(bool validate = true) const { return false; }
|
||||
bool IsStubFrame() const { return false; }
|
||||
bool IsEntryFrame() const { return true; }
|
||||
|
||||
// Visit objects in the frame.
|
||||
|
||||
Reference in New Issue
Block a user