| 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 Context** context_address() { return &thread_local_top_.context_; } | 581 Context** context_address() { return &thread_local_top_.context_; } |
| 582 | 582 |
| 583 THREAD_LOCAL_TOP_ACCESSOR(SaveContext*, save_context) | 583 THREAD_LOCAL_TOP_ACCESSOR(SaveContext*, save_context) |
| 584 | 584 |
| 585 // Access to current thread id. | 585 // Access to current thread id. |
| 586 THREAD_LOCAL_TOP_ACCESSOR(ThreadId, thread_id) | 586 THREAD_LOCAL_TOP_ACCESSOR(ThreadId, thread_id) |
| 587 | 587 |
| 588 // Interface to pending exception. | 588 // Interface to pending exception. |
| 589 Object* pending_exception() { | 589 Object* pending_exception() { |
| 590 ASSERT(has_pending_exception()); | 590 ASSERT(has_pending_exception()); |
| 591 ASSERT(!thread_local_top_.pending_exception_->IsFailure()); | 591 ASSERT(!thread_local_top_.pending_exception_->IsException()); |
| 592 return thread_local_top_.pending_exception_; | 592 return thread_local_top_.pending_exception_; |
| 593 } | 593 } |
| 594 | 594 |
| 595 void set_pending_exception(Object* exception) { | 595 void set_pending_exception(Object* exception_obj) { |
| 596 ASSERT(!exception->IsFailure()); | 596 ASSERT(!exception_obj->IsException()); |
| 597 thread_local_top_.pending_exception_ = exception; | 597 thread_local_top_.pending_exception_ = exception_obj; |
| 598 } | 598 } |
| 599 | 599 |
| 600 void clear_pending_exception() { | 600 void clear_pending_exception() { |
| 601 ASSERT(!thread_local_top_.pending_exception_->IsFailure()); | 601 ASSERT(!thread_local_top_.pending_exception_->IsException()); |
| 602 thread_local_top_.pending_exception_ = heap_.the_hole_value(); | 602 thread_local_top_.pending_exception_ = heap_.the_hole_value(); |
| 603 } | 603 } |
| 604 | 604 |
| 605 Object** pending_exception_address() { | 605 Object** pending_exception_address() { |
| 606 return &thread_local_top_.pending_exception_; | 606 return &thread_local_top_.pending_exception_; |
| 607 } | 607 } |
| 608 | 608 |
| 609 bool has_pending_exception() { | 609 bool has_pending_exception() { |
| 610 ASSERT(!thread_local_top_.pending_exception_->IsFailure()); | 610 ASSERT(!thread_local_top_.pending_exception_->IsException()); |
| 611 return !thread_local_top_.pending_exception_->IsTheHole(); | 611 return !thread_local_top_.pending_exception_->IsTheHole(); |
| 612 } | 612 } |
| 613 | 613 |
| 614 THREAD_LOCAL_TOP_ACCESSOR(bool, external_caught_exception) | 614 THREAD_LOCAL_TOP_ACCESSOR(bool, external_caught_exception) |
| 615 | 615 |
| 616 void clear_pending_message() { | 616 void clear_pending_message() { |
| 617 thread_local_top_.has_pending_message_ = false; | 617 thread_local_top_.has_pending_message_ = false; |
| 618 thread_local_top_.pending_message_obj_ = heap_.the_hole_value(); | 618 thread_local_top_.pending_message_obj_ = heap_.the_hole_value(); |
| 619 thread_local_top_.pending_message_script_ = heap_.the_hole_value(); | 619 thread_local_top_.pending_message_script_ = heap_.the_hole_value(); |
| 620 } | 620 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 642 return reinterpret_cast<Address>(&thread_local_top_.has_pending_message_); | 642 return reinterpret_cast<Address>(&thread_local_top_.has_pending_message_); |
| 643 } | 643 } |
| 644 | 644 |
| 645 Address pending_message_script_address() { | 645 Address pending_message_script_address() { |
| 646 return reinterpret_cast<Address>( | 646 return reinterpret_cast<Address>( |
| 647 &thread_local_top_.pending_message_script_); | 647 &thread_local_top_.pending_message_script_); |
| 648 } | 648 } |
| 649 | 649 |
| 650 Object* scheduled_exception() { | 650 Object* scheduled_exception() { |
| 651 ASSERT(has_scheduled_exception()); | 651 ASSERT(has_scheduled_exception()); |
| 652 ASSERT(!thread_local_top_.scheduled_exception_->IsFailure()); | 652 ASSERT(!thread_local_top_.scheduled_exception_->IsException()); |
| 653 return thread_local_top_.scheduled_exception_; | 653 return thread_local_top_.scheduled_exception_; |
| 654 } | 654 } |
| 655 bool has_scheduled_exception() { | 655 bool has_scheduled_exception() { |
| 656 ASSERT(!thread_local_top_.scheduled_exception_->IsFailure()); | 656 ASSERT(!thread_local_top_.scheduled_exception_->IsException()); |
| 657 return thread_local_top_.scheduled_exception_ != heap_.the_hole_value(); | 657 return thread_local_top_.scheduled_exception_ != heap_.the_hole_value(); |
| 658 } | 658 } |
| 659 void clear_scheduled_exception() { | 659 void clear_scheduled_exception() { |
| 660 ASSERT(!thread_local_top_.scheduled_exception_->IsFailure()); | 660 ASSERT(!thread_local_top_.scheduled_exception_->IsException()); |
| 661 thread_local_top_.scheduled_exception_ = heap_.the_hole_value(); | 661 thread_local_top_.scheduled_exception_ = heap_.the_hole_value(); |
| 662 } | 662 } |
| 663 | 663 |
| 664 bool IsExternallyCaught(); | 664 bool IsExternallyCaught(); |
| 665 | 665 |
| 666 bool is_catchable_by_javascript(Object* exception) { | 666 bool is_catchable_by_javascript(Object* exception) { |
| 667 return exception != heap()->termination_exception(); | 667 return exception != heap()->termination_exception(); |
| 668 } | 668 } |
| 669 | 669 |
| 670 // Serializer. | 670 // Serializer. |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1544 } | 1544 } |
| 1545 | 1545 |
| 1546 EmbeddedVector<char, 128> filename_; | 1546 EmbeddedVector<char, 128> filename_; |
| 1547 FILE* file_; | 1547 FILE* file_; |
| 1548 int scope_depth_; | 1548 int scope_depth_; |
| 1549 }; | 1549 }; |
| 1550 | 1550 |
| 1551 } } // namespace v8::internal | 1551 } } // namespace v8::internal |
| 1552 | 1552 |
| 1553 #endif // V8_ISOLATE_H_ | 1553 #endif // V8_ISOLATE_H_ |
| OLD | NEW |