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

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

Issue 23964003: Traverse inlined frames lazily when printing the stacktrace. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 set_stack_overflow(Instance::Cast(result)); 122 set_stack_overflow(Instance::Cast(result));
123 123
124 result = DartLibraryCalls::InstanceCreate(library, 124 result = DartLibraryCalls::InstanceCreate(library,
125 Symbols::OutOfMemoryError(), 125 Symbols::OutOfMemoryError(),
126 Symbols::Dot(), 126 Symbols::Dot(),
127 Object::empty_array()); 127 Object::empty_array());
128 if (result.IsError()) { 128 if (result.IsError()) {
129 return false; 129 return false;
130 } 130 }
131 set_out_of_memory(Instance::Cast(result)); 131 set_out_of_memory(Instance::Cast(result));
132 const Array& func_array = Array::Handle(
133 isolate,
134 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld));
135 const Array& code_array = Array::Handle( 132 const Array& code_array = Array::Handle(
136 isolate, 133 isolate,
137 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); 134 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld));
138 const Array& pc_offset_array = Array::Handle( 135 const Array& pc_offset_array = Array::Handle(
139 isolate, 136 isolate,
140 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld)); 137 Array::New(Stacktrace::kPreallocatedStackdepth, Heap::kOld));
141 result = Stacktrace::New(func_array, code_array, pc_offset_array); 138 result = Stacktrace::New(code_array, pc_offset_array);
142 set_preallocated_stack_trace(Stacktrace::Cast(result)); 139 set_preallocated_stack_trace(Stacktrace::Cast(result));
143 140
144 return true; 141 return true;
145 } 142 }
146 143
147 144
148 void ObjectStore::InitKeywordTable() { 145 void ObjectStore::InitKeywordTable() {
149 // Set up the keywords symbol array so that we can access it while scanning. 146 // Set up the keywords symbol array so that we can access it while scanning.
150 Array& keywords = Array::Handle(keyword_symbols()); 147 Array& keywords = Array::Handle(keyword_symbols());
151 ASSERT(keywords.IsNull()); 148 ASSERT(keywords.IsNull());
152 keywords = Array::New(Token::numKeywords, Heap::kOld); 149 keywords = Array::New(Token::numKeywords, Heap::kOld);
153 ASSERT(!keywords.IsError() && !keywords.IsNull()); 150 ASSERT(!keywords.IsError() && !keywords.IsNull());
154 set_keyword_symbols(keywords); 151 set_keyword_symbols(keywords);
155 } 152 }
156 153
157 } // namespace dart 154 } // namespace dart
OLDNEW
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698