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

Side by Side Diff: runtime/vm/clustered_snapshot.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/vm/class_finalizer.cc ('k') | runtime/vm/code_descriptors.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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/clustered_snapshot.h" 5 #include "vm/clustered_snapshot.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
(...skipping 3457 matching lines...) Expand 10 before | Expand all | Expand 10 after
3468 const GrowableObjectArray& new_constants = 3468 const GrowableObjectArray& new_constants =
3469 GrowableObjectArray::Handle(zone, GrowableObjectArray::New()); 3469 GrowableObjectArray::Handle(zone, GrowableObjectArray::New());
3470 Object& number = Object::Handle(zone); 3470 Object& number = Object::Handle(zone);
3471 for (intptr_t i = start_index_; i < stop_index_; i++) { 3471 for (intptr_t i = start_index_; i < stop_index_; i++) {
3472 number = refs.At(i); 3472 number = refs.At(i);
3473 if (number.IsMint() && number.IsCanonical()) { 3473 if (number.IsMint() && number.IsCanonical()) {
3474 new_constants.Add(number); 3474 new_constants.Add(number);
3475 } 3475 }
3476 } 3476 }
3477 const Array& constants_array = 3477 const Array& constants_array =
3478 Array::Handle(zone, Array::MakeFixedLength(new_constants)); 3478 Array::Handle(zone, Array::MakeArray(new_constants));
3479 const Class& mint_cls = 3479 const Class& mint_cls =
3480 Class::Handle(zone, Isolate::Current()->object_store()->mint_class()); 3480 Class::Handle(zone, Isolate::Current()->object_store()->mint_class());
3481 mint_cls.set_constants(constants_array); 3481 mint_cls.set_constants(constants_array);
3482 } 3482 }
3483 }; 3483 };
3484 3484
3485 3485
3486 #if !defined(DART_PRECOMPILED_RUNTIME) 3486 #if !defined(DART_PRECOMPILED_RUNTIME)
3487 class BigintSerializationCluster : public SerializationCluster { 3487 class BigintSerializationCluster : public SerializationCluster {
3488 public: 3488 public:
(...skipping 2153 matching lines...) Expand 10 before | Expand all | Expand 10 after
5642 thread_->isolate()->SetupImagePage(data_buffer_, 5642 thread_->isolate()->SetupImagePage(data_buffer_,
5643 /* is_executable */ false); 5643 /* is_executable */ false);
5644 } 5644 }
5645 5645
5646 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store()); 5646 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store());
5647 5647
5648 return ApiError::null(); 5648 return ApiError::null();
5649 } 5649 }
5650 5650
5651 } // namespace dart 5651 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/code_descriptors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698