Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(889)

Unified Diff: runtime/vm/debugger.h

Issue 1644793002: Replace intptr_t with TokenDescriptor (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.h
diff --git a/runtime/vm/debugger.h b/runtime/vm/debugger.h
index 5696e963a39b72aa3cca33a11317d2a6e287ce30..d6904d56a656b054e34cc3dffba293d283ce2f02 100644
--- a/runtime/vm/debugger.h
+++ b/runtime/vm/debugger.h
@@ -98,8 +98,8 @@ class BreakpointLocation {
public:
// Create a new unresolved breakpoint.
BreakpointLocation(const Script& script,
- intptr_t token_pos,
- intptr_t end_token_pos,
+ TokenPosition token_pos,
+ TokenPosition end_token_pos,
intptr_t requested_line_number,
intptr_t requested_column_number);
// Create a new latent breakpoint.
@@ -110,8 +110,8 @@ class BreakpointLocation {
~BreakpointLocation();
RawFunction* function() const { return function_; }
- intptr_t token_pos() const { return token_pos_; }
- intptr_t end_token_pos() const { return end_token_pos_; }
+ TokenPosition token_pos() const { return token_pos_; }
+ TokenPosition end_token_pos() const { return end_token_pos_; }
RawScript* script() const { return script_; }
RawString* url() const { return url_; }
@@ -124,7 +124,7 @@ class BreakpointLocation {
void GetCodeLocation(Library* lib,
Script* script,
- intptr_t* token_pos) const;
+ TokenPosition* token_pos) const;
Breakpoint* AddRepeated(Debugger* dbg);
Breakpoint* AddSingleShot(Debugger* dbg);
@@ -132,12 +132,12 @@ class BreakpointLocation {
bool AnyEnabled() const;
bool IsResolved() const { return is_resolved_; }
- bool IsLatent() const { return token_pos_ < 0; }
+ bool IsLatent() const { return !token_pos_.IsReal(); }
private:
void VisitObjectPointers(ObjectPointerVisitor* visitor);
- void SetResolved(const Function& func, intptr_t token_pos);
+ void SetResolved(const Function& func, TokenPosition token_pos);
BreakpointLocation* next() const { return this->next_; }
void set_next(BreakpointLocation* value) { next_ = value; }
@@ -149,8 +149,8 @@ class BreakpointLocation {
RawScript* script_;
RawString* url_;
- intptr_t token_pos_;
- intptr_t end_token_pos_;
+ TokenPosition token_pos_;
+ TokenPosition end_token_pos_;
bool is_resolved_;
BreakpointLocation* next_;
Breakpoint* conditions_;
@@ -173,14 +173,14 @@ class BreakpointLocation {
class CodeBreakpoint {
public:
CodeBreakpoint(const Code& code,
- intptr_t token_pos,
+ TokenPosition token_pos,
uword pc,
RawPcDescriptors::Kind kind);
~CodeBreakpoint();
RawFunction* function() const;
uword pc() const { return pc_; }
- intptr_t token_pos() const { return token_pos_; }
+ TokenPosition token_pos() const { return token_pos_; }
bool IsInternal() const { return bpt_location_ == NULL; }
RawScript* SourceCode();
@@ -206,7 +206,7 @@ class CodeBreakpoint {
void RestoreCode();
RawCode* code_;
- intptr_t token_pos_;
+ TokenPosition token_pos_;
uword pc_;
intptr_t line_number_;
bool is_enabled_;
@@ -245,7 +245,7 @@ class ActivationFrame : public ZoneAllocated {
RawString* SourceUrl();
RawScript* SourceScript();
RawLibrary* Library();
- intptr_t TokenPos();
+ TokenPosition TokenPos();
intptr_t LineNumber();
intptr_t ColumnNumber();
@@ -264,8 +264,8 @@ class ActivationFrame : public ZoneAllocated {
void VariableAt(intptr_t i,
String* name,
- intptr_t* token_pos,
- intptr_t* end_pos,
+ TokenPosition* token_pos,
+ TokenPosition* end_pos,
Object* value);
RawArray* GetLocalVariables();
@@ -305,7 +305,7 @@ class ActivationFrame : public ZoneAllocated {
const Code& code_;
const Function& function_;
bool token_pos_initialized_;
- intptr_t token_pos_;
+ TokenPosition token_pos_;
intptr_t try_index_;
intptr_t line_number_;
@@ -589,20 +589,20 @@ class Debugger {
void InvokeEventHandler(DebuggerEvent* event);
void FindCompiledFunctions(const Script& script,
- intptr_t start_pos,
- intptr_t end_pos,
+ TokenPosition start_pos,
+ TokenPosition end_pos,
GrowableObjectArray* function_list);
- RawFunction* FindBestFit(const Script& script, intptr_t token_pos);
+ RawFunction* FindBestFit(const Script& script, TokenPosition token_pos);
RawFunction* FindInnermostClosure(const Function& function,
- intptr_t token_pos);
- intptr_t ResolveBreakpointPos(const Function& func,
- intptr_t requested_token_pos,
- intptr_t last_token_pos,
- intptr_t requested_column);
+ TokenPosition token_pos);
+ TokenPosition ResolveBreakpointPos(const Function& func,
+ TokenPosition requested_token_pos,
+ TokenPosition last_token_pos,
+ intptr_t requested_column);
void DeoptimizeWorld();
BreakpointLocation* SetBreakpoint(const Script& script,
- intptr_t token_pos,
- intptr_t last_token_pos,
+ TokenPosition token_pos,
+ TokenPosition last_token_pos,
intptr_t requested_line,
intptr_t requested_column);
void RemoveInternalBreakpoints();
@@ -613,7 +613,7 @@ class Debugger {
void RegisterBreakpointLocation(BreakpointLocation* bpt);
void RegisterCodeBreakpoint(CodeBreakpoint* bpt);
BreakpointLocation* GetBreakpointLocation(const Script& script,
- intptr_t token_pos,
+ TokenPosition token_pos,
intptr_t requested_column);
void MakeCodeBreakpointAt(const Function& func,
BreakpointLocation* bpt);
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698