| 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 22 matching lines...) Expand all Loading... |
| 33 namespace v8 { | 33 namespace v8 { |
| 34 namespace internal { | 34 namespace internal { |
| 35 | 35 |
| 36 | 36 |
| 37 #define RETURN_IF_SCHEDULED_EXCEPTION() \ | 37 #define RETURN_IF_SCHEDULED_EXCEPTION() \ |
| 38 if (Top::has_scheduled_exception()) return Top::PromoteScheduledException() | 38 if (Top::has_scheduled_exception()) return Top::PromoteScheduledException() |
| 39 | 39 |
| 40 // Top has static variables used for JavaScript execution. | 40 // Top has static variables used for JavaScript execution. |
| 41 | 41 |
| 42 class SaveContext; // Forward declaration. | 42 class SaveContext; // Forward declaration. |
| 43 class ThreadVisitor; // Defined in v8threads.h |
| 43 | 44 |
| 44 class ThreadLocalTop BASE_EMBEDDED { | 45 class ThreadLocalTop BASE_EMBEDDED { |
| 45 public: | 46 public: |
| 46 // Initialize the thread data. | 47 // Initialize the thread data. |
| 47 void Initialize(); | 48 void Initialize(); |
| 48 | 49 |
| 49 // Get the top C++ try catch handler or NULL if none are registered. | 50 // Get the top C++ try catch handler or NULL if none are registered. |
| 50 // | 51 // |
| 51 // This method is not guarenteed to return an address that can be | 52 // This method is not guarenteed to return an address that can be |
| 52 // used for comparison with addresses into the JS stack. If such an | 53 // used for comparison with addresses into the JS stack. If such an |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 // Out of resource exception helpers. | 313 // Out of resource exception helpers. |
| 313 static Failure* StackOverflow(); | 314 static Failure* StackOverflow(); |
| 314 static Failure* TerminateExecution(); | 315 static Failure* TerminateExecution(); |
| 315 | 316 |
| 316 // Administration | 317 // Administration |
| 317 static void Initialize(); | 318 static void Initialize(); |
| 318 static void TearDown(); | 319 static void TearDown(); |
| 319 static void Iterate(ObjectVisitor* v); | 320 static void Iterate(ObjectVisitor* v); |
| 320 static void Iterate(ObjectVisitor* v, ThreadLocalTop* t); | 321 static void Iterate(ObjectVisitor* v, ThreadLocalTop* t); |
| 321 static char* Iterate(ObjectVisitor* v, char* t); | 322 static char* Iterate(ObjectVisitor* v, char* t); |
| 323 static void IterateThread(ThreadVisitor* v); |
| 324 static void IterateThread(ThreadVisitor* v, char* t); |
| 322 | 325 |
| 323 // Returns the global object of the current context. It could be | 326 // Returns the global object of the current context. It could be |
| 324 // a builtin object, or a js global object. | 327 // a builtin object, or a js global object. |
| 325 static Handle<GlobalObject> global() { | 328 static Handle<GlobalObject> global() { |
| 326 return Handle<GlobalObject>(context()->global()); | 329 return Handle<GlobalObject>(context()->global()); |
| 327 } | 330 } |
| 328 | 331 |
| 329 // Returns the global proxy object of the current context. | 332 // Returns the global proxy object of the current context. |
| 330 static Object* global_proxy() { | 333 static Object* global_proxy() { |
| 331 return context()->global_proxy(); | 334 return context()->global_proxy(); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 | 449 |
| 447 class ExecutionAccess BASE_EMBEDDED { | 450 class ExecutionAccess BASE_EMBEDDED { |
| 448 public: | 451 public: |
| 449 ExecutionAccess(); | 452 ExecutionAccess(); |
| 450 ~ExecutionAccess(); | 453 ~ExecutionAccess(); |
| 451 }; | 454 }; |
| 452 | 455 |
| 453 } } // namespace v8::internal | 456 } } // namespace v8::internal |
| 454 | 457 |
| 455 #endif // V8_TOP_H_ | 458 #endif // V8_TOP_H_ |
| OLD | NEW |