Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 // lookups. | 46 // lookups. |
| 47 Context* context_; | 47 Context* context_; |
| 48 Object* pending_exception_; | 48 Object* pending_exception_; |
| 49 // Use a separate value for scheduled exceptions to preserve the | 49 // Use a separate value for scheduled exceptions to preserve the |
| 50 // invariants that hold about pending_exception. We may want to | 50 // invariants that hold about pending_exception. We may want to |
| 51 // unify them later. | 51 // unify them later. |
| 52 Object* scheduled_exception_; | 52 Object* scheduled_exception_; |
| 53 bool external_caught_exception_; | 53 bool external_caught_exception_; |
| 54 v8::TryCatch* try_catch_handler_; | 54 v8::TryCatch* try_catch_handler_; |
| 55 SaveContext* save_context_; | 55 SaveContext* save_context_; |
| 56 v8::TryCatch* catcher_; | |
|
Kasper Lund
2008/10/23 12:52:43
Maybe you should explain what the difference betwe
Christian Plesner Hansen
2008/10/23 13:09:38
What about a more descriptive name for this one?
| |
| 56 | 57 |
| 57 // Stack. | 58 // Stack. |
| 58 Address c_entry_fp_; // the frame pointer of the top c entry frame | 59 Address c_entry_fp_; // the frame pointer of the top c entry frame |
| 59 Address handler_; // try-blocks are chained through the stack | 60 Address handler_; // try-blocks are chained through the stack |
| 60 bool stack_is_cooked_; | 61 bool stack_is_cooked_; |
| 61 inline bool stack_is_cooked() { return stack_is_cooked_; } | 62 inline bool stack_is_cooked() { return stack_is_cooked_; } |
| 62 inline void set_stack_is_cooked(bool value) { stack_is_cooked_ = value; } | 63 inline void set_stack_is_cooked(bool value) { stack_is_cooked_ = value; } |
| 63 | 64 |
| 64 // Generated code scratch locations. | 65 // Generated code scratch locations. |
| 65 int32_t formal_count_; | 66 int32_t formal_count_; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 136 ASSERT(has_scheduled_exception()); | 137 ASSERT(has_scheduled_exception()); |
| 137 return thread_local_.scheduled_exception_; | 138 return thread_local_.scheduled_exception_; |
| 138 } | 139 } |
| 139 static bool has_scheduled_exception() { | 140 static bool has_scheduled_exception() { |
| 140 return !thread_local_.scheduled_exception_->IsTheHole(); | 141 return !thread_local_.scheduled_exception_->IsTheHole(); |
| 141 } | 142 } |
| 142 static void clear_scheduled_exception() { | 143 static void clear_scheduled_exception() { |
| 143 thread_local_.scheduled_exception_ = Heap::the_hole_value(); | 144 thread_local_.scheduled_exception_ = Heap::the_hole_value(); |
| 144 } | 145 } |
| 145 | 146 |
| 147 static void setup_external_caught() { | |
| 148 thread_local_.external_caught_exception_ = | |
| 149 (thread_local_.catcher_ != NULL) && | |
| 150 (Top::thread_local_.try_catch_handler_ == Top::thread_local_.catcher_); | |
|
Kasper Lund
2008/10/23 12:52:43
Why do you use Top:: here? You're inside Top, righ
Christian Plesner Hansen
2008/10/23 13:09:38
If the catcher is set won't it always be the top e
| |
| 151 } | |
| 152 | |
| 146 // Tells whether the current context has experienced an out of memory | 153 // Tells whether the current context has experienced an out of memory |
| 147 // exception. | 154 // exception. |
| 148 static bool is_out_of_memory(); | 155 static bool is_out_of_memory(); |
| 149 | 156 |
| 150 // JS execution stack (see frames.h). | 157 // JS execution stack (see frames.h). |
| 151 static Address c_entry_fp(ThreadLocalTop* thread) { | 158 static Address c_entry_fp(ThreadLocalTop* thread) { |
| 152 return thread->c_entry_fp_; | 159 return thread->c_entry_fp_; |
| 153 } | 160 } |
| 154 static Address handler(ThreadLocalTop* thread) { return thread->handler_; } | 161 static Address handler(ThreadLocalTop* thread) { return thread->handler_; } |
| 155 | 162 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 347 | 354 |
| 348 class ExecutionAccess BASE_EMBEDDED { | 355 class ExecutionAccess BASE_EMBEDDED { |
| 349 public: | 356 public: |
| 350 ExecutionAccess(); | 357 ExecutionAccess(); |
| 351 ~ExecutionAccess(); | 358 ~ExecutionAccess(); |
| 352 }; | 359 }; |
| 353 | 360 |
| 354 } } // namespace v8::internal | 361 } } // namespace v8::internal |
| 355 | 362 |
| 356 #endif // V8_TOP_H_ | 363 #endif // V8_TOP_H_ |
| OLD | NEW |