Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: src/api.h

Issue 2801073006: Decouple root visitors from object visitors. (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « BUILD.gn ('k') | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 362
363 private: 363 private:
364 DeferredHandles(Object** first_block_limit, Isolate* isolate) 364 DeferredHandles(Object** first_block_limit, Isolate* isolate)
365 : next_(NULL), 365 : next_(NULL),
366 previous_(NULL), 366 previous_(NULL),
367 first_block_limit_(first_block_limit), 367 first_block_limit_(first_block_limit),
368 isolate_(isolate) { 368 isolate_(isolate) {
369 isolate->LinkDeferredHandles(this); 369 isolate->LinkDeferredHandles(this);
370 } 370 }
371 371
372 void Iterate(ObjectVisitor* v); 372 void Iterate(RootVisitor* v);
373 373
374 List<Object**> blocks_; 374 List<Object**> blocks_;
375 DeferredHandles* next_; 375 DeferredHandles* next_;
376 DeferredHandles* previous_; 376 DeferredHandles* previous_;
377 Object** first_block_limit_; 377 Object** first_block_limit_;
378 Isolate* isolate_; 378 Isolate* isolate_;
379 379
380 friend class HandleScopeImplementer; 380 friend class HandleScopeImplementer;
381 friend class Isolate; 381 friend class Isolate;
382 }; 382 };
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 DeleteArray(spare_); 414 DeleteArray(spare_);
415 } 415 }
416 416
417 // Threading support for handle data. 417 // Threading support for handle data.
418 static int ArchiveSpacePerThread(); 418 static int ArchiveSpacePerThread();
419 char* RestoreThread(char* from); 419 char* RestoreThread(char* from);
420 char* ArchiveThread(char* to); 420 char* ArchiveThread(char* to);
421 void FreeThreadResources(); 421 void FreeThreadResources();
422 422
423 // Garbage collection support. 423 // Garbage collection support.
424 void Iterate(v8::internal::ObjectVisitor* v); 424 void Iterate(v8::internal::RootVisitor* v);
425 static char* Iterate(v8::internal::ObjectVisitor* v, char* data); 425 static char* Iterate(v8::internal::RootVisitor* v, char* data);
426
427 426
428 inline internal::Object** GetSpareOrNewBlock(); 427 inline internal::Object** GetSpareOrNewBlock();
429 inline void DeleteExtensions(internal::Object** prev_limit); 428 inline void DeleteExtensions(internal::Object** prev_limit);
430 429
431 // Call depth represents nested v8 api calls. 430 // Call depth represents nested v8 api calls.
432 inline void IncrementCallDepth() {call_depth_++;} 431 inline void IncrementCallDepth() {call_depth_++;}
433 inline void DecrementCallDepth() {call_depth_--;} 432 inline void DecrementCallDepth() {call_depth_--;}
434 inline bool CallDepthIsZero() { return call_depth_ == 0; } 433 inline bool CallDepthIsZero() { return call_depth_ == 0; }
435 434
436 // Microtasks scope depth represents nested scopes controlling microtasks 435 // Microtasks scope depth represents nested scopes controlling microtasks
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 int microtasks_suppressions_; 530 int microtasks_suppressions_;
532 int entered_context_count_during_microtasks_; 531 int entered_context_count_during_microtasks_;
533 #ifdef DEBUG 532 #ifdef DEBUG
534 int debug_microtasks_depth_; 533 int debug_microtasks_depth_;
535 #endif 534 #endif
536 v8::MicrotasksPolicy microtasks_policy_; 535 v8::MicrotasksPolicy microtasks_policy_;
537 Object** last_handle_before_deferred_block_; 536 Object** last_handle_before_deferred_block_;
538 // This is only used for threading support. 537 // This is only used for threading support.
539 HandleScopeData handle_scope_data_; 538 HandleScopeData handle_scope_data_;
540 539
541 void IterateThis(ObjectVisitor* v); 540 void IterateThis(RootVisitor* v);
542 char* RestoreThreadHelper(char* from); 541 char* RestoreThreadHelper(char* from);
543 char* ArchiveThreadHelper(char* to); 542 char* ArchiveThreadHelper(char* to);
544 543
545 friend class DeferredHandles; 544 friend class DeferredHandles;
546 friend class DeferredHandleScope; 545 friend class DeferredHandleScope;
547 546
548 DISALLOW_COPY_AND_ASSIGN(HandleScopeImplementer); 547 DISALLOW_COPY_AND_ASSIGN(HandleScopeImplementer);
549 }; 548 };
550 549
551 550
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 } 668 }
670 669
671 private: 670 private:
672 static v8::Testing::StressType stress_type_; 671 static v8::Testing::StressType stress_type_;
673 }; 672 };
674 673
675 } // namespace internal 674 } // namespace internal
676 } // namespace v8 675 } // namespace v8
677 676
678 #endif // V8_API_H_ 677 #endif // V8_API_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698