OLD | NEW |
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 3454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3465 const GrowableObjectArray& new_constants = | 3465 const GrowableObjectArray& new_constants = |
3466 GrowableObjectArray::Handle(zone, GrowableObjectArray::New()); | 3466 GrowableObjectArray::Handle(zone, GrowableObjectArray::New()); |
3467 Object& number = Object::Handle(zone); | 3467 Object& number = Object::Handle(zone); |
3468 for (intptr_t i = start_index_; i < stop_index_; i++) { | 3468 for (intptr_t i = start_index_; i < stop_index_; i++) { |
3469 number = refs.At(i); | 3469 number = refs.At(i); |
3470 if (number.IsMint() && number.IsCanonical()) { | 3470 if (number.IsMint() && number.IsCanonical()) { |
3471 new_constants.Add(number); | 3471 new_constants.Add(number); |
3472 } | 3472 } |
3473 } | 3473 } |
3474 const Array& constants_array = | 3474 const Array& constants_array = |
3475 Array::Handle(zone, Array::MakeArray(new_constants)); | 3475 Array::Handle(zone, Array::MakeFixedLength(new_constants)); |
3476 const Class& mint_cls = | 3476 const Class& mint_cls = |
3477 Class::Handle(zone, Isolate::Current()->object_store()->mint_class()); | 3477 Class::Handle(zone, Isolate::Current()->object_store()->mint_class()); |
3478 mint_cls.set_constants(constants_array); | 3478 mint_cls.set_constants(constants_array); |
3479 } | 3479 } |
3480 }; | 3480 }; |
3481 | 3481 |
3482 | 3482 |
3483 #if !defined(DART_PRECOMPILED_RUNTIME) | 3483 #if !defined(DART_PRECOMPILED_RUNTIME) |
3484 class BigintSerializationCluster : public SerializationCluster { | 3484 class BigintSerializationCluster : public SerializationCluster { |
3485 public: | 3485 public: |
(...skipping 2153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5639 thread_->isolate()->SetupImagePage(data_buffer_, | 5639 thread_->isolate()->SetupImagePage(data_buffer_, |
5640 /* is_executable */ false); | 5640 /* is_executable */ false); |
5641 } | 5641 } |
5642 | 5642 |
5643 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store()); | 5643 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store()); |
5644 | 5644 |
5645 return ApiError::null(); | 5645 return ApiError::null(); |
5646 } | 5646 } |
5647 | 5647 |
5648 } // namespace dart | 5648 } // namespace dart |
OLD | NEW |