OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1442 | 1442 |
1443 // Support for checking for stack-overflows in C++ code. | 1443 // Support for checking for stack-overflows in C++ code. |
1444 class StackLimitCheck BASE_EMBEDDED { | 1444 class StackLimitCheck BASE_EMBEDDED { |
1445 public: | 1445 public: |
1446 explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { } | 1446 explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { } |
1447 | 1447 |
1448 bool HasOverflowed() const { | 1448 bool HasOverflowed() const { |
1449 StackGuard* stack_guard = isolate_->stack_guard(); | 1449 StackGuard* stack_guard = isolate_->stack_guard(); |
1450 return (reinterpret_cast<uintptr_t>(this) < stack_guard->real_climit()); | 1450 return (reinterpret_cast<uintptr_t>(this) < stack_guard->real_climit()); |
1451 } | 1451 } |
| 1452 bool WillOverflow(uint32_t additionalUsage) const { |
| 1453 StackGuard* stack_guard = isolate_->stack_guard(); |
| 1454 return (reinterpret_cast<uintptr_t>(this) < stack_guard->real_climit() + |
| 1455 additionalUsage); |
| 1456 } |
1452 private: | 1457 private: |
1453 Isolate* isolate_; | 1458 Isolate* isolate_; |
1454 }; | 1459 }; |
1455 | 1460 |
1456 | 1461 |
1457 // Support for temporarily postponing interrupts. When the outermost | 1462 // Support for temporarily postponing interrupts. When the outermost |
1458 // postpone scope is left the interrupts will be re-enabled and any | 1463 // postpone scope is left the interrupts will be re-enabled and any |
1459 // interrupts that occurred while in the scope will be taken into | 1464 // interrupts that occurred while in the scope will be taken into |
1460 // account. | 1465 // account. |
1461 class PostponeInterruptsScope BASE_EMBEDDED { | 1466 class PostponeInterruptsScope BASE_EMBEDDED { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1554 } | 1559 } |
1555 | 1560 |
1556 EmbeddedVector<char, 128> filename_; | 1561 EmbeddedVector<char, 128> filename_; |
1557 FILE* file_; | 1562 FILE* file_; |
1558 int scope_depth_; | 1563 int scope_depth_; |
1559 }; | 1564 }; |
1560 | 1565 |
1561 } } // namespace v8::internal | 1566 } } // namespace v8::internal |
1562 | 1567 |
1563 #endif // V8_ISOLATE_H_ | 1568 #endif // V8_ISOLATE_H_ |
OLD | NEW |