OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_ISOLATE_H_ | 5 #ifndef V8_ISOLATE_H_ |
6 #define V8_ISOLATE_H_ | 6 #define V8_ISOLATE_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include "include/v8-debug.h" | 9 #include "include/v8-debug.h" |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 | 304 |
305 #ifdef USE_SIMULATOR | 305 #ifdef USE_SIMULATOR |
306 Simulator* simulator_; | 306 Simulator* simulator_; |
307 #endif | 307 #endif |
308 | 308 |
309 Address js_entry_sp_; // the stack pointer of the bottom JS entry frame | 309 Address js_entry_sp_; // the stack pointer of the bottom JS entry frame |
310 // the external callback we're currently in | 310 // the external callback we're currently in |
311 ExternalCallbackScope* external_callback_scope_; | 311 ExternalCallbackScope* external_callback_scope_; |
312 StateTag current_vm_state_; | 312 StateTag current_vm_state_; |
313 | 313 |
314 // Generated code scratch locations. | |
315 int32_t formal_count_; | |
316 | |
317 // Call back function to report unsafe JS accesses. | 314 // Call back function to report unsafe JS accesses. |
318 v8::FailedAccessCheckCallback failed_access_check_callback_; | 315 v8::FailedAccessCheckCallback failed_access_check_callback_; |
319 | 316 |
320 private: | 317 private: |
321 void InitializeInternal(); | 318 void InitializeInternal(); |
322 | 319 |
323 v8::TryCatch* try_catch_handler_; | 320 v8::TryCatch* try_catch_handler_; |
324 }; | 321 }; |
325 | 322 |
326 | 323 |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 THREAD_LOCAL_TOP_ADDRESS(Address, pending_handler_sp) | 598 THREAD_LOCAL_TOP_ADDRESS(Address, pending_handler_sp) |
602 | 599 |
603 THREAD_LOCAL_TOP_ACCESSOR(bool, external_caught_exception) | 600 THREAD_LOCAL_TOP_ACCESSOR(bool, external_caught_exception) |
604 | 601 |
605 void clear_pending_message() { | 602 void clear_pending_message() { |
606 thread_local_top_.pending_message_obj_ = heap_.the_hole_value(); | 603 thread_local_top_.pending_message_obj_ = heap_.the_hole_value(); |
607 } | 604 } |
608 v8::TryCatch* try_catch_handler() { | 605 v8::TryCatch* try_catch_handler() { |
609 return thread_local_top_.try_catch_handler(); | 606 return thread_local_top_.try_catch_handler(); |
610 } | 607 } |
611 Address try_catch_handler_address() { | |
612 return thread_local_top_.try_catch_handler_address(); | |
613 } | |
614 bool* external_caught_exception_address() { | 608 bool* external_caught_exception_address() { |
615 return &thread_local_top_.external_caught_exception_; | 609 return &thread_local_top_.external_caught_exception_; |
616 } | 610 } |
617 | 611 |
618 THREAD_LOCAL_TOP_ADDRESS(Object*, scheduled_exception) | 612 THREAD_LOCAL_TOP_ADDRESS(Object*, scheduled_exception) |
619 | 613 |
620 Address pending_message_obj_address() { | 614 Address pending_message_obj_address() { |
621 return reinterpret_cast<Address>(&thread_local_top_.pending_message_obj_); | 615 return reinterpret_cast<Address>(&thread_local_top_.pending_message_obj_); |
622 } | 616 } |
623 | 617 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 } | 652 } |
659 | 653 |
660 // Bottom JS entry. | 654 // Bottom JS entry. |
661 Address js_entry_sp() { | 655 Address js_entry_sp() { |
662 return thread_local_top_.js_entry_sp_; | 656 return thread_local_top_.js_entry_sp_; |
663 } | 657 } |
664 inline Address* js_entry_sp_address() { | 658 inline Address* js_entry_sp_address() { |
665 return &thread_local_top_.js_entry_sp_; | 659 return &thread_local_top_.js_entry_sp_; |
666 } | 660 } |
667 | 661 |
668 // Generated code scratch locations. | |
669 void* formal_count_address() { return &thread_local_top_.formal_count_; } | |
670 | |
671 // Returns the global object of the current context. It could be | 662 // Returns the global object of the current context. It could be |
672 // a builtin object, or a JS global object. | 663 // a builtin object, or a JS global object. |
673 Handle<GlobalObject> global_object() { | 664 Handle<GlobalObject> global_object() { |
674 return Handle<GlobalObject>(context()->global_object()); | 665 return Handle<GlobalObject>(context()->global_object()); |
675 } | 666 } |
676 | 667 |
677 // Returns the global proxy object of the current context. | 668 // Returns the global proxy object of the current context. |
678 JSObject* global_proxy() { | 669 JSObject* global_proxy() { |
679 return context()->global_proxy(); | 670 return context()->global_proxy(); |
680 } | 671 } |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1570 } | 1561 } |
1571 | 1562 |
1572 EmbeddedVector<char, 128> filename_; | 1563 EmbeddedVector<char, 128> filename_; |
1573 FILE* file_; | 1564 FILE* file_; |
1574 int scope_depth_; | 1565 int scope_depth_; |
1575 }; | 1566 }; |
1576 | 1567 |
1577 } } // namespace v8::internal | 1568 } } // namespace v8::internal |
1578 | 1569 |
1579 #endif // V8_ISOLATE_H_ | 1570 #endif // V8_ISOLATE_H_ |
OLD | NEW |