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

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

Issue 230863005: Initial UserTag and dart:profiler library (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
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 #include "vm/object_store.h" 5 #include "vm/object_store.h"
6 6
7 #include "vm/exceptions.h" 7 #include "vm/exceptions.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 growable_object_array_class_(Class::null()), 46 growable_object_array_class_(Class::null()),
47 float32x4_class_(Class::null()), 47 float32x4_class_(Class::null()),
48 int32x4_class_(Class::null()), 48 int32x4_class_(Class::null()),
49 float64x2_class_(Class::null()), 49 float64x2_class_(Class::null()),
50 typed_data_classes_(Array::null()), 50 typed_data_classes_(Array::null()),
51 error_class_(Class::null()), 51 error_class_(Class::null()),
52 stacktrace_class_(Class::null()), 52 stacktrace_class_(Class::null()),
53 jsregexp_class_(Class::null()), 53 jsregexp_class_(Class::null()),
54 weak_property_class_(Class::null()), 54 weak_property_class_(Class::null()),
55 mirror_reference_class_(Class::null()), 55 mirror_reference_class_(Class::null()),
56 user_tag_class_(Class::null()),
57 tag_table_(GrowableObjectArray::null()),
56 symbol_table_(Array::null()), 58 symbol_table_(Array::null()),
57 canonical_type_arguments_(Array::null()), 59 canonical_type_arguments_(Array::null()),
58 async_library_(Library::null()), 60 async_library_(Library::null()),
59 builtin_library_(Library::null()), 61 builtin_library_(Library::null()),
60 core_library_(Library::null()), 62 core_library_(Library::null()),
61 isolate_library_(Library::null()), 63 isolate_library_(Library::null()),
62 math_library_(Library::null()), 64 math_library_(Library::null()),
63 mirrors_library_(Library::null()), 65 mirrors_library_(Library::null()),
64 native_wrappers_library_(Library::null()), 66 native_wrappers_library_(Library::null()),
65 root_library_(Library::null()), 67 root_library_(Library::null()),
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 118
117 result = DartLibraryCalls::InstanceCreate(library, 119 result = DartLibraryCalls::InstanceCreate(library,
118 Symbols::StackOverflowError(), 120 Symbols::StackOverflowError(),
119 Symbols::Dot(), 121 Symbols::Dot(),
120 Object::empty_array()); 122 Object::empty_array());
121 if (result.IsError()) { 123 if (result.IsError()) {
122 return false; 124 return false;
123 } 125 }
124 set_stack_overflow(Instance::Cast(result)); 126 set_stack_overflow(Instance::Cast(result));
125 127
128 ASSERT(this->tag_table() == GrowableObjectArray::null());
129 this->tag_table_ = GrowableObjectArray::New();
130
126 result = DartLibraryCalls::InstanceCreate(library, 131 result = DartLibraryCalls::InstanceCreate(library,
127 Symbols::OutOfMemoryError(), 132 Symbols::OutOfMemoryError(),
128 Symbols::Dot(), 133 Symbols::Dot(),
129 Object::empty_array()); 134 Object::empty_array());
130 if (result.IsError()) { 135 if (result.IsError()) {
131 return false; 136 return false;
132 } 137 }
133 set_out_of_memory(Instance::Cast(result)); 138 set_out_of_memory(Instance::Cast(result));
134 const Array& code_array = Array::Handle( 139 const Array& code_array = Array::Handle(
135 isolate, 140 isolate,
136 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); 141 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld));
137 const Array& pc_offset_array = Array::Handle( 142 const Array& pc_offset_array = Array::Handle(
138 isolate, 143 isolate,
139 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); 144 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld));
140 const Stacktrace& stack_trace = 145 const Stacktrace& stack_trace =
141 Stacktrace::Handle(Stacktrace::New(code_array, pc_offset_array)); 146 Stacktrace::Handle(Stacktrace::New(code_array, pc_offset_array));
142 // Expansion of inlined functions requires additional memory at run time, 147 // Expansion of inlined functions requires additional memory at run time,
143 // avoid it. 148 // avoid it.
144 stack_trace.set_expand_inlined(false); 149 stack_trace.set_expand_inlined(false);
145 set_preallocated_stack_trace(stack_trace); 150 set_preallocated_stack_trace(stack_trace);
146 151
147 return true; 152 return true;
148 } 153 }
149 154
150 } // namespace dart 155 } // namespace dart
OLDNEW
« runtime/vm/object.cc ('K') | « runtime/vm/object_store.h ('k') | runtime/vm/profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698