| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 ASSERT(sizeof(uintptr_t) < 2 * kXRegSize); | 352 ASSERT(sizeof(uintptr_t) < 2 * kXRegSize); |
| 353 set_sp(current_sp + 2 * kXRegSize); | 353 set_sp(current_sp + 2 * kXRegSize); |
| 354 return address; | 354 return address; |
| 355 } | 355 } |
| 356 | 356 |
| 357 | 357 |
| 358 // Returns the limit of the stack area to enable checking for stack overflows. | 358 // Returns the limit of the stack area to enable checking for stack overflows. |
| 359 uintptr_t Simulator::StackLimit() const { | 359 uintptr_t Simulator::StackLimit() const { |
| 360 // Leave a safety margin of 1024 bytes to prevent overrunning the stack when | 360 // Leave a safety margin of 1024 bytes to prevent overrunning the stack when |
| 361 // pushing values. | 361 // pushing values. |
| 362 // TODO(all): Increase the stack limit protection. | 362 return reinterpret_cast<uintptr_t>(stack_limit_) + 1024; |
| 363 | |
| 364 // The margin was decreased to 256 bytes, because we are intensively using | |
| 365 // the stack. The stack usage should decrease when our code improves. Then | |
| 366 // we can set it to 1024 again. | |
| 367 return reinterpret_cast<uintptr_t>(stack_limit_) + 256; | |
| 368 } | 363 } |
| 369 | 364 |
| 370 | 365 |
| 371 Simulator::Simulator(Decoder<DispatchingDecoderVisitor>* decoder, | 366 Simulator::Simulator(Decoder<DispatchingDecoderVisitor>* decoder, |
| 372 Isolate* isolate, FILE* stream) | 367 Isolate* isolate, FILE* stream) |
| 373 : decoder_(decoder), | 368 : decoder_(decoder), |
| 374 last_debugger_input_(NULL), | 369 last_debugger_input_(NULL), |
| 375 log_parameters_(NO_PARAM), | 370 log_parameters_(NO_PARAM), |
| 376 isolate_(isolate) { | 371 isolate_(isolate) { |
| 377 // Setup the decoder. | 372 // Setup the decoder. |
| (...skipping 3272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3650 default: | 3645 default: |
| 3651 UNIMPLEMENTED(); | 3646 UNIMPLEMENTED(); |
| 3652 } | 3647 } |
| 3653 } | 3648 } |
| 3654 | 3649 |
| 3655 #endif // USE_SIMULATOR | 3650 #endif // USE_SIMULATOR |
| 3656 | 3651 |
| 3657 } } // namespace v8::internal | 3652 } } // namespace v8::internal |
| 3658 | 3653 |
| 3659 #endif // V8_TARGET_ARCH_A64 | 3654 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |