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

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

Issue 266913010: Refactor 'dart:profiler' UserTag API (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/object_store.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_OBJECT_STORE_H_ 5 #ifndef VM_OBJECT_STORE_H_
6 #define VM_OBJECT_STORE_H_ 6 #define VM_OBJECT_STORE_H_
7 7
8 #include "vm/object.h" 8 #include "vm/object.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 lookup_port_handler_ = function.raw(); 390 lookup_port_handler_ = function.raw();
391 } 391 }
392 392
393 RawFunction* handle_message_function() const { 393 RawFunction* handle_message_function() const {
394 return handle_message_function_; 394 return handle_message_function_;
395 } 395 }
396 void set_handle_message_function(const Function& function) { 396 void set_handle_message_function(const Function& function) {
397 handle_message_function_ = function.raw(); 397 handle_message_function_ = function.raw();
398 } 398 }
399 399
400 RawUserTag* default_tag() const {
401 return default_tag_;
402 }
403 void set_default_tag(const UserTag& tag) {
404 // Only set once.
405 ASSERT(default_tag_ == UserTag::null());
406 ASSERT(!tag.IsNull());
407 default_tag_ = tag.raw();
408 }
409 static intptr_t default_tag_offset() {
410 return OFFSET_OF(ObjectStore, default_tag_);
411 }
412
400 // Visit all object pointers. 413 // Visit all object pointers.
401 void VisitObjectPointers(ObjectPointerVisitor* visitor); 414 void VisitObjectPointers(ObjectPointerVisitor* visitor);
402 415
403 // Called to initialize objects required by the vm but which invoke 416 // Called to initialize objects required by the vm but which invoke
404 // dart code. If an error occurs then false is returned and error 417 // dart code. If an error occurs then false is returned and error
405 // information is stored in sticky_error(). 418 // information is stored in sticky_error().
406 bool PreallocateObjects(); 419 bool PreallocateObjects();
407 420
408 static void Init(Isolate* isolate); 421 static void Init(Isolate* isolate);
409 422
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 RawGrowableObjectArray* pending_classes_; 486 RawGrowableObjectArray* pending_classes_;
474 RawGrowableObjectArray* pending_functions_; 487 RawGrowableObjectArray* pending_functions_;
475 RawError* sticky_error_; 488 RawError* sticky_error_;
476 RawString* unhandled_exception_handler_; 489 RawString* unhandled_exception_handler_;
477 RawContext* empty_context_; 490 RawContext* empty_context_;
478 RawInstance* stack_overflow_; 491 RawInstance* stack_overflow_;
479 RawInstance* out_of_memory_; 492 RawInstance* out_of_memory_;
480 RawStacktrace* preallocated_stack_trace_; 493 RawStacktrace* preallocated_stack_trace_;
481 RawFunction* lookup_port_handler_; 494 RawFunction* lookup_port_handler_;
482 RawFunction* handle_message_function_; 495 RawFunction* handle_message_function_;
496 RawUserTag* default_tag_;
483 RawObject** to() { 497 RawObject** to() {
484 return reinterpret_cast<RawObject**>(&handle_message_function_); 498 return reinterpret_cast<RawObject**>(&handle_message_function_);
485 } 499 }
486 500
487 friend class SnapshotReader; 501 friend class SnapshotReader;
488 502
489 DISALLOW_COPY_AND_ASSIGN(ObjectStore); 503 DISALLOW_COPY_AND_ASSIGN(ObjectStore);
490 }; 504 };
491 505
492 } // namespace dart 506 } // namespace dart
493 507
494 #endif // VM_OBJECT_STORE_H_ 508 #endif // VM_OBJECT_STORE_H_
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/object_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698