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

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

Issue 11299298: Cache lookups at megamorphic call sites in optimized code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: One change I forgot. Created 8 years 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 | Annotate | Revision Log
« 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/class_table.h"
11 #include "platform/thread.h" 10 #include "platform/thread.h"
12 #include "vm/base_isolate.h" 11 #include "vm/base_isolate.h"
12 #include "vm/class_table.h"
13 #include "vm/gc_callbacks.h" 13 #include "vm/gc_callbacks.h"
14 #include "vm/megamorphic_cache_table.h"
14 #include "vm/store_buffer.h" 15 #include "vm/store_buffer.h"
15 #include "vm/timer.h" 16 #include "vm/timer.h"
16 17
17 namespace dart { 18 namespace dart {
18 19
19 // Forward declarations. 20 // Forward declarations.
20 class ApiState; 21 class ApiState;
21 class CodeIndexTable; 22 class CodeIndexTable;
22 class Debugger; 23 class Debugger;
23 class HandleScope; 24 class HandleScope;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 return OFFSET_OF(Isolate, store_buffer_block_); 108 return OFFSET_OF(Isolate, store_buffer_block_);
108 } 109 }
109 110
110 StoreBuffer* store_buffer() { return &store_buffer_; } 111 StoreBuffer* store_buffer() { return &store_buffer_; }
111 112
112 ClassTable* class_table() { return &class_table_; } 113 ClassTable* class_table() { return &class_table_; }
113 static intptr_t class_table_offset() { 114 static intptr_t class_table_offset() {
114 return OFFSET_OF(Isolate, class_table_); 115 return OFFSET_OF(Isolate, class_table_);
115 } 116 }
116 117
118 MegamorphicCacheTable* megamorphic_cache_table() {
119 return &megamorphic_cache_table_;
120 }
121
117 Dart_MessageNotifyCallback message_notify_callback() const { 122 Dart_MessageNotifyCallback message_notify_callback() const {
118 return message_notify_callback_; 123 return message_notify_callback_;
119 } 124 }
120 void set_message_notify_callback(Dart_MessageNotifyCallback value) { 125 void set_message_notify_callback(Dart_MessageNotifyCallback value) {
121 message_notify_callback_ = value; 126 message_notify_callback_ = value;
122 } 127 }
123 128
124 const char* name() const { return name_; } 129 const char* name() const { return name_; }
125 130
126 Dart_Port main_port() { return main_port_; } 131 Dart_Port main_port() { return main_port_; }
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 void PrintInvokedFunctions(); 323 void PrintInvokedFunctions();
319 324
320 static uword GetSpecifiedStackSize(); 325 static uword GetSpecifiedStackSize();
321 326
322 static const intptr_t kStackSizeBuffer = (16 * KB); 327 static const intptr_t kStackSizeBuffer = (16 * KB);
323 328
324 static ThreadLocalKey isolate_key; 329 static ThreadLocalKey isolate_key;
325 StoreBufferBlock store_buffer_block_; 330 StoreBufferBlock store_buffer_block_;
326 StoreBuffer store_buffer_; 331 StoreBuffer store_buffer_;
327 ClassTable class_table_; 332 ClassTable class_table_;
333 MegamorphicCacheTable megamorphic_cache_table_;
328 Dart_MessageNotifyCallback message_notify_callback_; 334 Dart_MessageNotifyCallback message_notify_callback_;
329 char* name_; 335 char* name_;
330 Dart_Port main_port_; 336 Dart_Port main_port_;
331 Heap* heap_; 337 Heap* heap_;
332 ObjectStore* object_store_; 338 ObjectStore* object_store_;
333 RawContext* top_context_; 339 RawContext* top_context_;
334 uword top_exit_frame_info_; 340 uword top_exit_frame_info_;
335 void* init_callback_data_; 341 void* init_callback_data_;
336 Dart_LibraryTagHandler library_tag_handler_; 342 Dart_LibraryTagHandler library_tag_handler_;
337 ApiState* api_state_; 343 ApiState* api_state_;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 Isolate* new_isolate_; 430 Isolate* new_isolate_;
425 Isolate* saved_isolate_; 431 Isolate* saved_isolate_;
426 uword saved_stack_limit_; 432 uword saved_stack_limit_;
427 433
428 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope); 434 DISALLOW_COPY_AND_ASSIGN(SwitchIsolateScope);
429 }; 435 };
430 436
431 } // namespace dart 437 } // namespace dart
432 438
433 #endif // VM_ISOLATE_H_ 439 #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