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 3457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |