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

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

Issue 2799373002: Pass a second type argument vector to all type instantiation calls in the VM. (Closed)
Patch Set: addressed comments 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
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/object_test.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/debugger.h" 5 #include "vm/debugger.h"
6 #include "vm/disassembler.h" 6 #include "vm/disassembler.h"
7 #include "vm/object.h" 7 #include "vm/object.h"
8 #include "vm/object_store.h" 8 #include "vm/object_store.h"
9 #include "vm/stub_code.h" 9 #include "vm/stub_code.h"
10 #include "vm/symbols.h" 10 #include "vm/symbols.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 type_arg = TypeAt(i); 213 type_arg = TypeAt(i);
214 jsarr.AddValue(type_arg); 214 jsarr.AddValue(type_arg);
215 } 215 }
216 } 216 }
217 if (!IsInstantiated()) { 217 if (!IsInstantiated()) {
218 JSONArray jsarr(&jsobj, "_instantiations"); 218 JSONArray jsarr(&jsobj, "_instantiations");
219 Array& prior_instantiations = Array::Handle(instantiations()); 219 Array& prior_instantiations = Array::Handle(instantiations());
220 ASSERT(prior_instantiations.Length() > 0); // Always at least a sentinel. 220 ASSERT(prior_instantiations.Length() > 0); // Always at least a sentinel.
221 TypeArguments& type_args = TypeArguments::Handle(); 221 TypeArguments& type_args = TypeArguments::Handle();
222 intptr_t i = 0; 222 intptr_t i = 0;
223 while (true) { 223 while (prior_instantiations.At(i) != Smi::New(StubCode::kNoInstantiator)) {
224 if (prior_instantiations.At(i) == Smi::New(StubCode::kNoInstantiator)) {
225 break;
226 }
227 JSONObject instantiation(&jsarr); 224 JSONObject instantiation(&jsarr);
228 type_args ^= prior_instantiations.At(i); 225 type_args ^= prior_instantiations.At(i);
229 instantiation.AddProperty("instantiator", type_args, true); 226 instantiation.AddProperty("instantiatorTypeArguments", type_args, true);
230 type_args ^= prior_instantiations.At(i + 1); 227 type_args ^= prior_instantiations.At(i + 1);
228 instantiation.AddProperty("functionTypeArguments", type_args, true);
229 type_args ^= prior_instantiations.At(i + 2);
231 instantiation.AddProperty("instantiated", type_args, true); 230 instantiation.AddProperty("instantiated", type_args, true);
232 i += 2; 231 i += StubCode::kInstantiationSizeInWords;
233 } 232 }
234 } 233 }
235 } 234 }
236 235
237 236
238 void PatchClass::PrintJSONImpl(JSONStream* stream, bool ref) const { 237 void PatchClass::PrintJSONImpl(JSONStream* stream, bool ref) const {
239 Object::PrintJSONImpl(stream, ref); 238 Object::PrintJSONImpl(stream, ref);
240 } 239 }
241 240
242 241
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 jsobj.AddProperty("mirrorReferent", referent_handle); 1581 jsobj.AddProperty("mirrorReferent", referent_handle);
1583 } 1582 }
1584 1583
1585 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 1584 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
1586 Instance::PrintJSONImpl(stream, ref); 1585 Instance::PrintJSONImpl(stream, ref);
1587 } 1586 }
1588 1587
1589 #endif 1588 #endif
1590 1589
1591 } // namespace dart 1590 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698