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

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

Issue 2818273002: Remove parent_level field of function type parameters. (Closed)
Patch Set: Created 3 years, 8 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
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 3171 matching lines...) Expand 10 before | Expand all | Expand 10 after
3182 for (intptr_t i = 0; i < count; i++) { 3182 for (intptr_t i = 0; i < count; i++) {
3183 RawTypeParameter* type = objects_[i]; 3183 RawTypeParameter* type = objects_[i];
3184 RawObject** from = type->from(); 3184 RawObject** from = type->from();
3185 RawObject** to = type->to(); 3185 RawObject** to = type->to();
3186 for (RawObject** p = from; p <= to; p++) { 3186 for (RawObject** p = from; p <= to; p++) {
3187 s->WriteRef(*p); 3187 s->WriteRef(*p);
3188 } 3188 }
3189 s->Write<int32_t>(type->ptr()->parameterized_class_id_); 3189 s->Write<int32_t>(type->ptr()->parameterized_class_id_);
3190 s->WriteTokenPosition(type->ptr()->token_pos_); 3190 s->WriteTokenPosition(type->ptr()->token_pos_);
3191 s->Write<int16_t>(type->ptr()->index_); 3191 s->Write<int16_t>(type->ptr()->index_);
3192 s->Write<uint8_t>(type->ptr()->parent_level_);
3193 s->Write<int8_t>(type->ptr()->type_state_); 3192 s->Write<int8_t>(type->ptr()->type_state_);
3194 } 3193 }
3195 } 3194 }
3196 3195
3197 private: 3196 private:
3198 GrowableArray<RawTypeParameter*> objects_; 3197 GrowableArray<RawTypeParameter*> objects_;
3199 }; 3198 };
3200 #endif // !DART_PRECOMPILED_RUNTIME 3199 #endif // !DART_PRECOMPILED_RUNTIME
3201 3200
3202 3201
(...skipping 21 matching lines...) Expand all
3224 Deserializer::InitializeHeader( 3223 Deserializer::InitializeHeader(
3225 type, kTypeParameterCid, TypeParameter::InstanceSize(), is_vm_object); 3224 type, kTypeParameterCid, TypeParameter::InstanceSize(), is_vm_object);
3226 RawObject** from = type->from(); 3225 RawObject** from = type->from();
3227 RawObject** to = type->to(); 3226 RawObject** to = type->to();
3228 for (RawObject** p = from; p <= to; p++) { 3227 for (RawObject** p = from; p <= to; p++) {
3229 *p = d->ReadRef(); 3228 *p = d->ReadRef();
3230 } 3229 }
3231 type->ptr()->parameterized_class_id_ = d->Read<int32_t>(); 3230 type->ptr()->parameterized_class_id_ = d->Read<int32_t>();
3232 type->ptr()->token_pos_ = d->ReadTokenPosition(); 3231 type->ptr()->token_pos_ = d->ReadTokenPosition();
3233 type->ptr()->index_ = d->Read<int16_t>(); 3232 type->ptr()->index_ = d->Read<int16_t>();
3234 type->ptr()->parent_level_ = d->Read<uint8_t>();
3235 type->ptr()->type_state_ = d->Read<int8_t>(); 3233 type->ptr()->type_state_ = d->Read<int8_t>();
3236 } 3234 }
3237 } 3235 }
3238 }; 3236 };
3239 3237
3240 3238
3241 #if !defined(DART_PRECOMPILED_RUNTIME) 3239 #if !defined(DART_PRECOMPILED_RUNTIME)
3242 class BoundedTypeSerializationCluster : public SerializationCluster { 3240 class BoundedTypeSerializationCluster : public SerializationCluster {
3243 public: 3241 public:
3244 BoundedTypeSerializationCluster() {} 3242 BoundedTypeSerializationCluster() {}
(...skipping 2321 matching lines...) Expand 10 before | Expand all | Expand 10 after
5566 thread_->isolate()->SetupImagePage(data_buffer_, 5564 thread_->isolate()->SetupImagePage(data_buffer_,
5567 /* is_executable */ false); 5565 /* is_executable */ false);
5568 } 5566 }
5569 5567
5570 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store()); 5568 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store());
5571 5569
5572 return ApiError::null(); 5570 return ApiError::null();
5573 } 5571 }
5574 5572
5575 } // namespace dart 5573 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698