| Index: runtime/vm/simulator_mips.cc
|
| ===================================================================
|
| --- runtime/vm/simulator_mips.cc (revision 19074)
|
| +++ runtime/vm/simulator_mips.cc (working copy)
|
| @@ -17,7 +17,15 @@
|
| namespace dart {
|
|
|
| Simulator::Simulator() {
|
| - UNIMPLEMENTED();
|
| + // Setup simulator support first. Some of this information is needed to
|
| + // setup the architecture state.
|
| + // We allocate the stack here, the size is computed as the sum of
|
| + // the size specified by the user and the buffer space needed for
|
| + // handling stack overflow exceptions. To be safe in potential
|
| + // stack underflows we also add some underflow buffer space.
|
| + stack_ = new char[(Isolate::GetSpecifiedStackSize() +
|
| + Isolate::kStackSizeBuffer +
|
| + kSimulatorStackUnderflowSize)];
|
| }
|
|
|
|
|
| @@ -40,6 +48,16 @@
|
| }
|
|
|
|
|
| +// Returns the top of the stack area to enable checking for stack pointer
|
| +// validity.
|
| +uword Simulator::StackTop() const {
|
| + // To be safe in potential stack underflows we leave some buffer above and
|
| + // set the stack top.
|
| + return reinterpret_cast<uword>(stack_) +
|
| + (Isolate::GetSpecifiedStackSize() + Isolate::kStackSizeBuffer);
|
| +}
|
| +
|
| +
|
| void Simulator::InitOnce() {
|
| }
|
|
|
|
|