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

Side by Side Diff: runtime/lib/stacktrace.cc

Issue 2968003004: Revert "The current growth strategy for growable arrays allocates a backing array of size 2 at (emp… (Closed)
Patch Set: Created 3 years, 5 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/lib/growable_array.dart ('k') | runtime/vm/class_finalizer.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 #include "lib/stacktrace.h" 5 #include "lib/stacktrace.h"
6 #include "vm/bootstrap_natives.h" 6 #include "vm/bootstrap_natives.h"
7 #include "vm/debugger.h" 7 #include "vm/debugger.h"
8 #include "vm/exceptions.h" 8 #include "vm/exceptions.h"
9 #include "vm/native_entry.h" 9 #include "vm/native_entry.h"
10 #include "vm/object_store.h" 10 #include "vm/object_store.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 // Creates a StackTrace object from the current stack. 167 // Creates a StackTrace object from the current stack.
168 // 168 //
169 // Skips the first skip_frames Dart frames. 169 // Skips the first skip_frames Dart frames.
170 const StackTrace& GetCurrentStackTrace(int skip_frames) { 170 const StackTrace& GetCurrentStackTrace(int skip_frames) {
171 const GrowableObjectArray& code_list = 171 const GrowableObjectArray& code_list =
172 GrowableObjectArray::Handle(GrowableObjectArray::New()); 172 GrowableObjectArray::Handle(GrowableObjectArray::New());
173 const GrowableObjectArray& pc_offset_list = 173 const GrowableObjectArray& pc_offset_list =
174 GrowableObjectArray::Handle(GrowableObjectArray::New()); 174 GrowableObjectArray::Handle(GrowableObjectArray::New());
175 AppendFrames(code_list, pc_offset_list, skip_frames); 175 AppendFrames(code_list, pc_offset_list, skip_frames);
176 const Array& code_array = Array::Handle(Array::MakeFixedLength(code_list)); 176 const Array& code_array = Array::Handle(Array::MakeArray(code_list));
177 const Array& pc_offset_array = 177 const Array& pc_offset_array =
178 Array::Handle(Array::MakeFixedLength(pc_offset_list)); 178 Array::Handle(Array::MakeArray(pc_offset_list));
179 const StackTrace& stacktrace = 179 const StackTrace& stacktrace =
180 StackTrace::Handle(StackTrace::New(code_array, pc_offset_array)); 180 StackTrace::Handle(StackTrace::New(code_array, pc_offset_array));
181 return stacktrace; 181 return stacktrace;
182 } 182 }
183 183
184 } // namespace dart 184 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/growable_array.dart ('k') | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698