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

Unified Diff: runtime/vm/stack_frame.h

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 years, 1 month 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/spaces.h ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stack_frame.h
diff --git a/runtime/vm/stack_frame.h b/runtime/vm/stack_frame.h
index 5076939f5028d7d295c42b78801279e48d920550..dcc6cee8d9b002beb411cb7378d3251478fc9841 100644
--- a/runtime/vm/stack_frame.h
+++ b/runtime/vm/stack_frame.h
@@ -35,7 +35,7 @@ class RawContext;
// Generic stack frame.
class StackFrame : public ValueObject {
public:
- virtual ~StackFrame() { }
+ virtual ~StackFrame() {}
// Accessors to get the pc, sp and fp of a frame.
uword sp() const { return sp_; }
@@ -52,8 +52,8 @@ class StackFrame : public ValueObject {
}
uword IsMarkedForLazyDeopt() const {
- uword raw_pc = *reinterpret_cast<uword*>(
- sp() + (kSavedPcSlotFromSp * kWordSize));
+ uword raw_pc =
+ *reinterpret_cast<uword*>(sp() + (kSavedPcSlotFromSp * kWordSize));
return raw_pc == StubCode::DeoptimizeLazyFromReturn_entry()->EntryPoint();
}
void MarkForLazyDeopt() {
@@ -107,10 +107,12 @@ class StackFrame : public ValueObject {
protected:
explicit StackFrame(Thread* thread)
- : fp_(0), sp_(0), pc_(0), thread_(thread) { }
+ : fp_(0), sp_(0), pc_(0), thread_(thread) {}
// Name of the frame, used for generic frame printing functionality.
- virtual const char* GetName() const { return IsStubFrame()? "stub" : "dart"; }
+ virtual const char* GetName() const {
+ return IsStubFrame() ? "stub" : "dart";
+ }
Isolate* isolate() const { return thread_->isolate(); }
@@ -119,13 +121,11 @@ class StackFrame : public ValueObject {
private:
RawCode* GetCodeObject() const;
- uword GetCallerSp() const {
- return fp() + (kCallerSpSlotFromFp * kWordSize);
- }
+ uword GetCallerSp() const { return fp() + (kCallerSpSlotFromFp * kWordSize); }
uword GetCallerFp() const {
- return *(reinterpret_cast<uword*>(
- fp() + (kSavedCallerFpSlotFromFp * kWordSize)));
+ return *(reinterpret_cast<uword*>(fp() +
+ (kSavedCallerFpSlotFromFp * kWordSize)));
}
uword GetCallerPc() const {
@@ -167,7 +167,7 @@ class ExitFrame : public StackFrame {
virtual const char* GetName() const { return "exit"; }
private:
- explicit ExitFrame(Thread* thread) : StackFrame(thread) { }
+ explicit ExitFrame(Thread* thread) : StackFrame(thread) {}
friend class StackFrameIterator;
DISALLOW_COPY_AND_ASSIGN(ExitFrame);
@@ -178,9 +178,7 @@ class ExitFrame : public StackFrame {
// dart code.
class EntryFrame : public StackFrame {
public:
- bool IsValid() const {
- return StubCode::InInvocationStub(pc());
- }
+ bool IsValid() const { return StubCode::InInvocationStub(pc()); }
bool IsDartFrame(bool validate = true) const { return false; }
bool IsStubFrame() const { return false; }
bool IsEntryFrame() const { return true; }
@@ -192,7 +190,7 @@ class EntryFrame : public StackFrame {
virtual const char* GetName() const { return "entry"; }
private:
- explicit EntryFrame(Thread* thread) : StackFrame(thread) { }
+ explicit EntryFrame(Thread* thread) : StackFrame(thread) {}
friend class StackFrameIterator;
DISALLOW_COPY_AND_ASSIGN(EntryFrame);
@@ -211,15 +209,19 @@ class StackFrameIterator : public ValueObject {
// Iterators for iterating over all frames from the last ExitFrame to the
// first EntryFrame.
- StackFrameIterator(bool validate,
- Thread* thread = Thread::Current());
- StackFrameIterator(uword last_fp, bool validate,
+ explicit StackFrameIterator(bool validate,
+ Thread* thread = Thread::Current());
+ StackFrameIterator(uword last_fp,
+ bool validate,
Thread* thread = Thread::Current());
#if !defined(TARGET_ARCH_DBC)
// Iterator for iterating over all frames from the current frame (given by its
// fp, sp, and pc) to the first EntryFrame.
- StackFrameIterator(uword fp, uword sp, uword pc, bool validate,
+ StackFrameIterator(uword fp,
+ uword sp,
+ uword pc,
+ bool validate,
Thread* thread = Thread::Current());
#endif
@@ -241,8 +243,8 @@ class StackFrameIterator : public ValueObject {
if (fp_ == 0) {
return false;
}
- const uword pc = *(reinterpret_cast<uword*>(
- sp_ + (kSavedPcSlotFromSp * kWordSize)));
+ const uword pc =
+ *(reinterpret_cast<uword*>(sp_ + (kSavedPcSlotFromSp * kWordSize)));
return !StubCode::InInvocationStub(pc);
}
@@ -251,7 +253,7 @@ class StackFrameIterator : public ValueObject {
private:
explicit FrameSetIterator(Thread* thread)
- : fp_(0), sp_(0), pc_(0), stack_frame_(thread), thread_(thread) { }
+ : fp_(0), sp_(0), pc_(0), stack_frame_(thread), thread_(thread) {}
uword fp_;
uword sp_;
uword pc_;
@@ -277,9 +279,9 @@ class StackFrameIterator : public ValueObject {
void SetupLastExitFrameData();
void SetupNextExitFrameData();
- bool validate_; // Validate each frame as we traverse the frames.
+ bool validate_; // Validate each frame as we traverse the frames.
EntryFrame entry_; // Singleton entry frame returned by NextEntryFrame().
- ExitFrame exit_; // Singleton exit frame returned by NextExitFrame().
+ ExitFrame exit_; // Singleton exit frame returned by NextExitFrame().
FrameSetIterator frames_;
StackFrame* current_frame_; // Points to the current frame in the iterator.
Thread* thread_;
@@ -298,19 +300,16 @@ class StackFrameIterator : public ValueObject {
class DartFrameIterator : public ValueObject {
public:
explicit DartFrameIterator(Thread* thread = Thread::Current())
- : frames_(StackFrameIterator::kDontValidateFrames, thread) { }
- DartFrameIterator(uword last_fp,
- Thread* thread = Thread::Current())
- : frames_(last_fp, StackFrameIterator::kDontValidateFrames, thread) { }
+ : frames_(StackFrameIterator::kDontValidateFrames, thread) {}
+ explicit DartFrameIterator(uword last_fp, Thread* thread = Thread::Current())
+ : frames_(last_fp, StackFrameIterator::kDontValidateFrames, thread) {}
#if !defined(TARGET_ARCH_DBC)
DartFrameIterator(uword fp,
uword sp,
uword pc,
Thread* thread = Thread::Current())
- : frames_(fp, sp, pc,
- StackFrameIterator::kDontValidateFrames, thread) {
- }
+ : frames_(fp, sp, pc, StackFrameIterator::kDontValidateFrames, thread) {}
#endif
// Get next dart frame.
« no previous file with comments | « runtime/vm/spaces.h ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698