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

Unified Diff: runtime/vm/simulator_dbc.cc

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 years, 5 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/simulator_dbc.h ('k') | runtime/vm/snapshot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_dbc.cc
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
index 053c81a3185410aaa930ab54eaecdcab8269ed30..92b158e62c79f692caab36408755bbc71b3352ce 100644
--- a/runtime/vm/simulator_dbc.cc
+++ b/runtime/vm/simulator_dbc.cc
@@ -86,21 +86,17 @@ class SimulatorSetjmpBuffer {
DISALLOW_COPY_AND_ASSIGN(SimulatorSetjmpBuffer);
};
-
DART_FORCE_INLINE static RawObject** SavedCallerFP(RawObject** FP) {
return reinterpret_cast<RawObject**>(FP[kSavedCallerFpSlotFromFp]);
}
-
DART_FORCE_INLINE static RawObject** FrameArguments(RawObject** FP,
intptr_t argc) {
return FP - (kDartFrameFixedSize + argc);
}
-
#define RAW_CAST(Type, val) (SimulatorHelpers::CastTo##Type(val))
-
class SimulatorHelpers {
public:
#define DEFINE_CASTS(Type) \
@@ -458,7 +454,6 @@ class SimulatorHelpers {
return static_cast<RawCode*>(FP[kPcMarkerSlotFromFp]);
}
-
DART_FORCE_INLINE static void SetFrameCode(RawObject** FP, RawCode* code) {
ASSERT(GetClassId(code) == kCodeCid);
FP[kPcMarkerSlotFromFp] = code;
@@ -474,22 +469,18 @@ class SimulatorHelpers {
}
};
-
DART_FORCE_INLINE static uint32_t* SavedCallerPC(RawObject** FP) {
return reinterpret_cast<uint32_t*>(FP[kSavedCallerPcSlotFromFp]);
}
-
DART_FORCE_INLINE static RawFunction* FrameFunction(RawObject** FP) {
RawFunction* function = static_cast<RawFunction*>(FP[kFunctionSlotFromFp]);
ASSERT(SimulatorHelpers::GetClassId(function) == kFunctionCid);
return function;
}
-
IntrinsicHandler Simulator::intrinsics_[Simulator::kIntrinsicCount];
-
// Synchronization primitives support.
void Simulator::InitOnce() {
for (intptr_t i = 0; i < kIntrinsicCount; i++) {
@@ -529,7 +520,6 @@ void Simulator::InitOnce() {
SimulatorHelpers::SetAsyncThreadStackTrace;
}
-
Simulator::Simulator() : stack_(NULL), fp_(NULL) {
// Setup simulator support first. Some of this information is needed to
// setup the architecture state.
@@ -547,7 +537,6 @@ Simulator::Simulator() : stack_(NULL), fp_(NULL) {
NOT_IN_PRODUCT(icount_ = 0;)
}
-
Simulator::~Simulator() {
delete[] stack_;
Isolate* isolate = Isolate::Current();
@@ -556,7 +545,6 @@ Simulator::~Simulator() {
}
}
-
// Get the active Simulator for the current isolate.
Simulator* Simulator::Current() {
Simulator* simulator = Isolate::Current()->simulator();
@@ -567,7 +555,6 @@ Simulator* Simulator::Current() {
return simulator;
}
-
// Returns the top of the stack area to enable checking for stack pointer
// validity.
uword Simulator::StackTop() const {
@@ -577,14 +564,12 @@ uword Simulator::StackTop() const {
(OSThread::GetSpecifiedStackSize() + OSThread::kStackSizeBuffer);
}
-
#if !defined(PRODUCT)
// Returns true if tracing of executed instructions is enabled.
DART_FORCE_INLINE bool Simulator::IsTracingExecution() const {
return icount_ > FLAG_trace_sim_after;
}
-
// Prints bytecode instruction at given pc for instruction tracing.
DART_NOINLINE void Simulator::TraceInstruction(uint32_t* pc) const {
THR_Print("%" Pu64 " ", icount_);
@@ -597,7 +582,6 @@ DART_NOINLINE void Simulator::TraceInstruction(uint32_t* pc) const {
}
#endif // !defined(PRODUCT)
-
// Calls into the Dart runtime are based on this interface.
typedef void (*SimulatorRuntimeCall)(NativeArguments arguments);
@@ -614,7 +598,6 @@ typedef double (*SimulatorLeafFloatRuntimeCall)(double d0, double d1);
typedef void (*SimulatorBootstrapNativeCall)(NativeArguments* arguments);
typedef void (*SimulatorNativeCall)(NativeArguments* arguments, uword target);
-
void Simulator::Exit(Thread* thread,
RawObject** base,
RawObject** frame,
@@ -661,7 +644,6 @@ DART_FORCE_INLINE static bool SignedAddWithOverflow(intptr_t lhs,
return (res != 0);
}
-
DART_FORCE_INLINE static bool SignedSubWithOverflow(intptr_t lhs,
intptr_t rhs,
intptr_t* out) {
@@ -692,7 +674,6 @@ DART_FORCE_INLINE static bool SignedSubWithOverflow(intptr_t lhs,
return (res != 0);
}
-
DART_FORCE_INLINE static bool SignedMulWithOverflow(intptr_t lhs,
intptr_t rhs,
intptr_t* out) {
@@ -737,12 +718,10 @@ DART_FORCE_INLINE static bool SignedMulWithOverflow(intptr_t lhs,
return (res != 0);
}
-
DART_FORCE_INLINE static bool AreBothSmis(intptr_t a, intptr_t b) {
return ((a | b) & kHeapObjectTag) == 0;
}
-
#define SMI_MUL(lhs, rhs, pres) SignedMulWithOverflow((lhs), (rhs) >> 1, pres)
#define SMI_COND(cond, lhs, rhs, pres) \
((*(pres) = ((lhs cond rhs) ? true_value : false_value)), false)
@@ -753,7 +732,6 @@ DART_FORCE_INLINE static bool AreBothSmis(intptr_t a, intptr_t b) {
#define SMI_BITAND(lhs, rhs, pres) ((*(pres) = ((lhs) & (rhs))), false)
#define SMI_BITXOR(lhs, rhs, pres) ((*(pres) = ((lhs) ^ (rhs))), false)
-
void Simulator::CallRuntime(Thread* thread,
RawObject** base,
RawObject** exit_frame,
@@ -767,7 +745,6 @@ void Simulator::CallRuntime(Thread* thread,
reinterpret_cast<RuntimeFunction>(target)(native_args);
}
-
DART_FORCE_INLINE static void EnterSyntheticFrame(RawObject*** FP,
RawObject*** SP,
uint32_t* pc) {
@@ -779,7 +756,6 @@ DART_FORCE_INLINE static void EnterSyntheticFrame(RawObject*** FP,
*SP = fp - 1;
}
-
DART_FORCE_INLINE static void LeaveSyntheticFrame(RawObject*** FP,
RawObject*** SP) {
RawObject** fp = *FP;
@@ -787,7 +763,6 @@ DART_FORCE_INLINE static void LeaveSyntheticFrame(RawObject*** FP,
*SP = fp - kDartFrameFixedSize;
}
-
DART_FORCE_INLINE void Simulator::Invoke(Thread* thread,
RawObject** call_base,
RawObject** call_top,
@@ -809,7 +784,6 @@ DART_FORCE_INLINE void Simulator::Invoke(Thread* thread,
*SP = *FP - 1;
}
-
void Simulator::InlineCacheMiss(int checked_args,
Thread* thread,
RawICData* icdata,
@@ -844,7 +818,6 @@ void Simulator::InlineCacheMiss(int checked_args,
result, reinterpret_cast<uword>(handler));
}
-
DART_FORCE_INLINE void Simulator::InstanceCall1(Thread* thread,
RawICData* icdata,
RawObject** call_base,
@@ -887,7 +860,6 @@ DART_FORCE_INLINE void Simulator::InstanceCall1(Thread* thread,
Invoke(thread, call_base, top, pp, pc, FP, SP);
}
-
DART_FORCE_INLINE void Simulator::InstanceCall2(Thread* thread,
RawICData* icdata,
RawObject** call_base,
@@ -932,7 +904,6 @@ DART_FORCE_INLINE void Simulator::InstanceCall2(Thread* thread,
Invoke(thread, call_base, top, pp, pc, FP, SP);
}
-
// Note: functions below are marked DART_NOINLINE to recover performance on
// ARM where inlining these functions into the interpreter loop seemed to cause
// some code quality issues.
@@ -952,7 +923,6 @@ static DART_NOINLINE bool InvokeRuntime(Thread* thread,
}
}
-
static DART_NOINLINE bool InvokeBootstrapNative(Thread* thread,
Simulator* sim,
SimulatorBootstrapNativeCall f,
@@ -969,7 +939,6 @@ static DART_NOINLINE bool InvokeBootstrapNative(Thread* thread,
}
}
-
static DART_NOINLINE bool InvokeNativeNoScopeWrapper(Thread* thread,
Simulator* sim,
Dart_NativeFunction f,
@@ -987,7 +956,6 @@ static DART_NOINLINE bool InvokeNativeNoScopeWrapper(Thread* thread,
}
}
-
static DART_NOINLINE bool InvokeNativeAutoScopeWrapper(Thread* thread,
Simulator* sim,
Dart_NativeFunction f,
@@ -1068,7 +1036,6 @@ static DART_NOINLINE bool InvokeNativeAutoScopeWrapper(Thread* thread,
USE(rD)
#define DECODE_A_X rD = (static_cast<int32_t>(op) >> Bytecode::kDShift);
-
#define SMI_FASTPATH_ICDATA_INC \
do { \
ASSERT(Bytecode::IsCallOpcode(*pc)); \
@@ -1118,7 +1085,6 @@ static DART_NOINLINE bool InvokeNativeAutoScopeWrapper(Thread* thread,
Func(lhs, rhs, slot); \
}
-
// Exception handling helper. Gets handler FP and PC from the Simulator where
// they were stored by Simulator::Longjmp and proceeds to execute the handler.
// Corner case: handler PC can be a fake marker that marks entry frame, which
@@ -1162,7 +1128,6 @@ static DART_NOINLINE bool InvokeNativeAutoScopeWrapper(Thread* thread,
#define LOAD_CONSTANT(index) (pp->data()[(index)].raw_obj_)
-
// Returns true if deoptimization succeeds.
DART_FORCE_INLINE bool Simulator::Deoptimize(Thread* thread,
RawObjectPool** pp,
@@ -1219,7 +1184,6 @@ DART_FORCE_INLINE bool Simulator::Deoptimize(Thread* thread,
return true;
}
-
RawObject* Simulator::Call(const Code& code,
const Array& arguments_descriptor,
const Array& arguments,
@@ -3904,7 +3868,6 @@ RawObject* Simulator::Call(const Code& code,
return 0;
}
-
void Simulator::JumpToFrame(uword pc, uword sp, uword fp, Thread* thread) {
// Walk over all setjmp buffers (simulated --> C++ transitions)
// and try to find the setjmp associated with the simulated frame pointer.
« no previous file with comments | « runtime/vm/simulator_dbc.h ('k') | runtime/vm/snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698