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

Side by Side Diff: runtime/vm/isolate.h

Issue 2382953004: Revert "Lazy deopt without code patching." (Closed)
Patch Set: Created 4 years, 2 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 | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/isolate.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_ISOLATE_H_ 5 #ifndef VM_ISOLATE_H_
6 #define VM_ISOLATE_H_ 6 #define VM_ISOLATE_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/atomic.h" 10 #include "vm/atomic.h"
11 #include "vm/base_isolate.h" 11 #include "vm/base_isolate.h"
12 #include "vm/class_table.h" 12 #include "vm/class_table.h"
13 #include "vm/handles.h" 13 #include "vm/handles.h"
14 #include "vm/megamorphic_cache_table.h" 14 #include "vm/megamorphic_cache_table.h"
15 #include "vm/metrics.h" 15 #include "vm/metrics.h"
16 #include "vm/random.h" 16 #include "vm/random.h"
17 #include "vm/tags.h" 17 #include "vm/tags.h"
18 #include "vm/thread.h" 18 #include "vm/thread.h"
19 #include "vm/os_thread.h" 19 #include "vm/os_thread.h"
20 #include "vm/timer.h" 20 #include "vm/timer.h"
21 #include "vm/token_position.h" 21 #include "vm/token_position.h"
22 #include "vm/growable_array.h"
23 22
24 namespace dart { 23 namespace dart {
25 24
26 // Forward declarations. 25 // Forward declarations.
27 class ApiState; 26 class ApiState;
28 class BackgroundCompiler; 27 class BackgroundCompiler;
29 class Capability; 28 class Capability;
30 class CodeIndexTable; 29 class CodeIndexTable;
31 class CompilerStats; 30 class CompilerStats;
32 class Debugger; 31 class Debugger;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 class ServiceIdZone; 63 class ServiceIdZone;
65 class Simulator; 64 class Simulator;
66 class StackResource; 65 class StackResource;
67 class StackZone; 66 class StackZone;
68 class StoreBuffer; 67 class StoreBuffer;
69 class StubCode; 68 class StubCode;
70 class ThreadRegistry; 69 class ThreadRegistry;
71 class UserTag; 70 class UserTag;
72 71
73 72
74 class PendingLazyDeopt {
75 public:
76 PendingLazyDeopt(uword fp, uword pc) : fp_(fp), pc_(pc) { }
77 uword fp() { return fp_; }
78 uword pc() { return pc_; }
79
80 private:
81 uword fp_;
82 uword pc_;
83 };
84
85
86 class IsolateVisitor { 73 class IsolateVisitor {
87 public: 74 public:
88 IsolateVisitor() {} 75 IsolateVisitor() {}
89 virtual ~IsolateVisitor() {} 76 virtual ~IsolateVisitor() {}
90 77
91 virtual void VisitIsolate(Isolate* isolate) = 0; 78 virtual void VisitIsolate(Isolate* isolate) = 0;
92 79
93 private: 80 private:
94 DISALLOW_COPY_AND_ASSIGN(IsolateVisitor); 81 DISALLOW_COPY_AND_ASSIGN(IsolateVisitor);
95 }; 82 };
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 return shutdown_callback_; 383 return shutdown_callback_;
397 } 384 }
398 385
399 void set_object_id_ring(ObjectIdRing* ring) { 386 void set_object_id_ring(ObjectIdRing* ring) {
400 object_id_ring_ = ring; 387 object_id_ring_ = ring;
401 } 388 }
402 ObjectIdRing* object_id_ring() { 389 ObjectIdRing* object_id_ring() {
403 return object_id_ring_; 390 return object_id_ring_;
404 } 391 }
405 392
406 MallocGrowableArray<PendingLazyDeopt>* pending_deopts() {
407 return pending_deopts_;
408 }
409 bool IsDeoptimizing() const { return deopt_context_ != NULL; } 393 bool IsDeoptimizing() const { return deopt_context_ != NULL; }
410 DeoptContext* deopt_context() const { return deopt_context_; } 394 DeoptContext* deopt_context() const { return deopt_context_; }
411 void set_deopt_context(DeoptContext* value) { 395 void set_deopt_context(DeoptContext* value) {
412 ASSERT(value == NULL || deopt_context_ == NULL); 396 ASSERT(value == NULL || deopt_context_ == NULL);
413 deopt_context_ = value; 397 deopt_context_ = value;
414 } 398 }
415 399
416 BackgroundCompiler* background_compiler() const { 400 BackgroundCompiler* background_compiler() const {
417 return background_compiler_; 401 return background_compiler_;
418 } 402 }
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 Mutex* symbols_mutex_; // Protects concurrent access to the symbol table. 733 Mutex* symbols_mutex_; // Protects concurrent access to the symbol table.
750 Mutex* type_canonicalization_mutex_; // Protects type canonicalization. 734 Mutex* type_canonicalization_mutex_; // Protects type canonicalization.
751 Mutex* constant_canonicalization_mutex_; // Protects const canonicalization. 735 Mutex* constant_canonicalization_mutex_; // Protects const canonicalization.
752 Mutex* megamorphic_lookup_mutex_; // Protects megamorphic table lookup. 736 Mutex* megamorphic_lookup_mutex_; // Protects megamorphic table lookup.
753 MessageHandler* message_handler_; 737 MessageHandler* message_handler_;
754 IsolateSpawnState* spawn_state_; 738 IsolateSpawnState* spawn_state_;
755 bool is_runnable_; 739 bool is_runnable_;
756 Dart_GcPrologueCallback gc_prologue_callback_; 740 Dart_GcPrologueCallback gc_prologue_callback_;
757 Dart_GcEpilogueCallback gc_epilogue_callback_; 741 Dart_GcEpilogueCallback gc_epilogue_callback_;
758 intptr_t defer_finalization_count_; 742 intptr_t defer_finalization_count_;
759 MallocGrowableArray<PendingLazyDeopt>* pending_deopts_;
760 DeoptContext* deopt_context_; 743 DeoptContext* deopt_context_;
761 744
762 bool is_service_isolate_; 745 bool is_service_isolate_;
763 746
764 // Isolate-specific flags. 747 // Isolate-specific flags.
765 NOT_IN_PRODUCT( 748 NOT_IN_PRODUCT(
766 bool type_checks_; 749 bool type_checks_;
767 bool asserts_; 750 bool asserts_;
768 bool error_on_bad_type_; 751 bool error_on_bad_type_;
769 bool error_on_bad_override_; 752 bool error_on_bad_override_;
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 intptr_t* spawn_count_; 990 intptr_t* spawn_count_;
1008 991
1009 Dart_IsolateFlags isolate_flags_; 992 Dart_IsolateFlags isolate_flags_;
1010 bool paused_; 993 bool paused_;
1011 bool errors_are_fatal_; 994 bool errors_are_fatal_;
1012 }; 995 };
1013 996
1014 } // namespace dart 997 } // namespace dart
1015 998
1016 #endif // VM_ISOLATE_H_ 999 #endif // VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698