| 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_API_H_ | 5 #ifndef V8_API_H_ |
| 6 #define V8_API_H_ | 6 #define V8_API_H_ |
| 7 | 7 |
| 8 #include "include/v8-testing.h" | 8 #include "include/v8-testing.h" |
| 9 #include "src/contexts.h" | 9 #include "src/contexts.h" |
| 10 #include "src/debug/debug-interface.h" | 10 #include "src/debug/debug-interface.h" |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 | 358 |
| 359 private: | 359 private: |
| 360 DeferredHandles(Object** first_block_limit, Isolate* isolate) | 360 DeferredHandles(Object** first_block_limit, Isolate* isolate) |
| 361 : next_(NULL), | 361 : next_(NULL), |
| 362 previous_(NULL), | 362 previous_(NULL), |
| 363 first_block_limit_(first_block_limit), | 363 first_block_limit_(first_block_limit), |
| 364 isolate_(isolate) { | 364 isolate_(isolate) { |
| 365 isolate->LinkDeferredHandles(this); | 365 isolate->LinkDeferredHandles(this); |
| 366 } | 366 } |
| 367 | 367 |
| 368 void Iterate(ObjectVisitor* v); | 368 void Iterate(RootVisitor* v); |
| 369 | 369 |
| 370 List<Object**> blocks_; | 370 List<Object**> blocks_; |
| 371 DeferredHandles* next_; | 371 DeferredHandles* next_; |
| 372 DeferredHandles* previous_; | 372 DeferredHandles* previous_; |
| 373 Object** first_block_limit_; | 373 Object** first_block_limit_; |
| 374 Isolate* isolate_; | 374 Isolate* isolate_; |
| 375 | 375 |
| 376 friend class HandleScopeImplementer; | 376 friend class HandleScopeImplementer; |
| 377 friend class Isolate; | 377 friend class Isolate; |
| 378 }; | 378 }; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 DeleteArray(spare_); | 410 DeleteArray(spare_); |
| 411 } | 411 } |
| 412 | 412 |
| 413 // Threading support for handle data. | 413 // Threading support for handle data. |
| 414 static int ArchiveSpacePerThread(); | 414 static int ArchiveSpacePerThread(); |
| 415 char* RestoreThread(char* from); | 415 char* RestoreThread(char* from); |
| 416 char* ArchiveThread(char* to); | 416 char* ArchiveThread(char* to); |
| 417 void FreeThreadResources(); | 417 void FreeThreadResources(); |
| 418 | 418 |
| 419 // Garbage collection support. | 419 // Garbage collection support. |
| 420 void Iterate(v8::internal::ObjectVisitor* v); | 420 void Iterate(v8::internal::RootVisitor* v); |
| 421 static char* Iterate(v8::internal::ObjectVisitor* v, char* data); | 421 static char* Iterate(v8::internal::RootVisitor* v, char* data); |
| 422 | |
| 423 | 422 |
| 424 inline internal::Object** GetSpareOrNewBlock(); | 423 inline internal::Object** GetSpareOrNewBlock(); |
| 425 inline void DeleteExtensions(internal::Object** prev_limit); | 424 inline void DeleteExtensions(internal::Object** prev_limit); |
| 426 | 425 |
| 427 // Call depth represents nested v8 api calls. | 426 // Call depth represents nested v8 api calls. |
| 428 inline void IncrementCallDepth() {call_depth_++;} | 427 inline void IncrementCallDepth() {call_depth_++;} |
| 429 inline void DecrementCallDepth() {call_depth_--;} | 428 inline void DecrementCallDepth() {call_depth_--;} |
| 430 inline bool CallDepthIsZero() { return call_depth_ == 0; } | 429 inline bool CallDepthIsZero() { return call_depth_ == 0; } |
| 431 | 430 |
| 432 // Microtasks scope depth represents nested scopes controlling microtasks | 431 // Microtasks scope depth represents nested scopes controlling microtasks |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 int microtasks_suppressions_; | 526 int microtasks_suppressions_; |
| 528 int entered_context_count_during_microtasks_; | 527 int entered_context_count_during_microtasks_; |
| 529 #ifdef DEBUG | 528 #ifdef DEBUG |
| 530 int debug_microtasks_depth_; | 529 int debug_microtasks_depth_; |
| 531 #endif | 530 #endif |
| 532 v8::MicrotasksPolicy microtasks_policy_; | 531 v8::MicrotasksPolicy microtasks_policy_; |
| 533 Object** last_handle_before_deferred_block_; | 532 Object** last_handle_before_deferred_block_; |
| 534 // This is only used for threading support. | 533 // This is only used for threading support. |
| 535 HandleScopeData handle_scope_data_; | 534 HandleScopeData handle_scope_data_; |
| 536 | 535 |
| 537 void IterateThis(ObjectVisitor* v); | 536 void IterateThis(RootVisitor* v); |
| 538 char* RestoreThreadHelper(char* from); | 537 char* RestoreThreadHelper(char* from); |
| 539 char* ArchiveThreadHelper(char* to); | 538 char* ArchiveThreadHelper(char* to); |
| 540 | 539 |
| 541 friend class DeferredHandles; | 540 friend class DeferredHandles; |
| 542 friend class DeferredHandleScope; | 541 friend class DeferredHandleScope; |
| 543 | 542 |
| 544 DISALLOW_COPY_AND_ASSIGN(HandleScopeImplementer); | 543 DISALLOW_COPY_AND_ASSIGN(HandleScopeImplementer); |
| 545 }; | 544 }; |
| 546 | 545 |
| 547 | 546 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 } | 664 } |
| 666 | 665 |
| 667 private: | 666 private: |
| 668 static v8::Testing::StressType stress_type_; | 667 static v8::Testing::StressType stress_type_; |
| 669 }; | 668 }; |
| 670 | 669 |
| 671 } // namespace internal | 670 } // namespace internal |
| 672 } // namespace v8 | 671 } // namespace v8 |
| 673 | 672 |
| 674 #endif // V8_API_H_ | 673 #endif // V8_API_H_ |
| OLD | NEW |