[cleanup] Fix DebugBreakType enum.
The order of the enum values is important for the BreakLocation predicates. This wasn't an issue so far, since the DEBUG_BREAK_AT_ENTRY case is anyways treated separately, but for the future I've added a comment and fixed the order. Drive-by-fix: Remove the useless `inline` markers on the predicates. Bug: chromium:1162229, chromium:700516 Change-Id: I05653ac9b5ea225e30c5c2beeff809b8848c2ec7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3026712 Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Yang Guo <yangguo@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#75736}
This commit is contained in:
parent
4fc3d0980b
commit
5a4f8a08e8
@ -42,14 +42,16 @@ enum StepAction : int8_t {
|
||||
// Type of exception break. NOTE: These values are in macros.py as well.
|
||||
enum ExceptionBreakType { BreakException = 0, BreakUncaughtException = 1 };
|
||||
|
||||
// Type of debug break. NOTE: The order matters for the predicates
|
||||
// below inside BreakLocation, so be careful when adding / removing.
|
||||
enum DebugBreakType {
|
||||
NOT_DEBUG_BREAK,
|
||||
DEBUGGER_STATEMENT,
|
||||
DEBUG_BREAK_AT_ENTRY,
|
||||
DEBUG_BREAK_SLOT,
|
||||
DEBUG_BREAK_SLOT_AT_CALL,
|
||||
DEBUG_BREAK_SLOT_AT_RETURN,
|
||||
DEBUG_BREAK_SLOT_AT_SUSPEND,
|
||||
DEBUG_BREAK_AT_ENTRY,
|
||||
};
|
||||
|
||||
enum IgnoreBreakMode {
|
||||
@ -67,25 +69,18 @@ class BreakLocation {
|
||||
JavaScriptFrame* frame,
|
||||
std::vector<BreakLocation>* result_out);
|
||||
|
||||
inline bool IsSuspend() const { return type_ == DEBUG_BREAK_SLOT_AT_SUSPEND; }
|
||||
inline bool IsReturn() const { return type_ == DEBUG_BREAK_SLOT_AT_RETURN; }
|
||||
inline bool IsReturnOrSuspend() const {
|
||||
return type_ >= DEBUG_BREAK_SLOT_AT_RETURN;
|
||||
}
|
||||
inline bool IsCall() const { return type_ == DEBUG_BREAK_SLOT_AT_CALL; }
|
||||
inline bool IsDebugBreakSlot() const { return type_ >= DEBUG_BREAK_SLOT; }
|
||||
inline bool IsDebuggerStatement() const {
|
||||
return type_ == DEBUGGER_STATEMENT;
|
||||
}
|
||||
inline bool IsDebugBreakAtEntry() const {
|
||||
bool result = type_ == DEBUG_BREAK_AT_ENTRY;
|
||||
return result;
|
||||
}
|
||||
bool IsSuspend() const { return type_ == DEBUG_BREAK_SLOT_AT_SUSPEND; }
|
||||
bool IsReturn() const { return type_ == DEBUG_BREAK_SLOT_AT_RETURN; }
|
||||
bool IsReturnOrSuspend() const { return type_ >= DEBUG_BREAK_SLOT_AT_RETURN; }
|
||||
bool IsCall() const { return type_ == DEBUG_BREAK_SLOT_AT_CALL; }
|
||||
bool IsDebugBreakSlot() const { return type_ >= DEBUG_BREAK_SLOT; }
|
||||
bool IsDebuggerStatement() const { return type_ == DEBUGGER_STATEMENT; }
|
||||
bool IsDebugBreakAtEntry() const { return type_ == DEBUG_BREAK_AT_ENTRY; }
|
||||
|
||||
bool HasBreakPoint(Isolate* isolate, Handle<DebugInfo> debug_info) const;
|
||||
|
||||
inline int generator_suspend_id() { return generator_suspend_id_; }
|
||||
inline int position() const { return position_; }
|
||||
int generator_suspend_id() { return generator_suspend_id_; }
|
||||
int position() const { return position_; }
|
||||
|
||||
debug::BreakLocationType type() const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user