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

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

Issue 2098573004: DBC: CheckClassInstr (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/deferred_objects.h" 5 #include "vm/deferred_objects.h"
6 6
7 #include "vm/code_patcher.h" 7 #include "vm/code_patcher.h"
8 #include "vm/compiler.h" 8 #include "vm/compiler.h"
9 #include "vm/deopt_instructions.h" 9 #include "vm/deopt_instructions.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 } 348 }
349 } else { 349 } else {
350 const Instance& obj = Instance::Cast(*object_); 350 const Instance& obj = Instance::Cast(*object_);
351 351
352 Smi& offset = Smi::Handle(); 352 Smi& offset = Smi::Handle();
353 Field& field = Field::Handle(); 353 Field& field = Field::Handle();
354 Object& value = Object::Handle(); 354 Object& value = Object::Handle();
355 const Array& offset_map = Array::Handle(cls.OffsetToFieldMap()); 355 const Array& offset_map = Array::Handle(cls.OffsetToFieldMap());
356 356
357 for (intptr_t i = 0; i < field_count_; i++) { 357 for (intptr_t i = 0; i < field_count_; i++) {
358 //RawObject* o = GetFieldOffset(i);
359 //OS::PrintErr("i = %ld, o = %p\n", i, o);
358 offset ^= GetFieldOffset(i); 360 offset ^= GetFieldOffset(i);
359 field ^= offset_map.At(offset.Value() / kWordSize); 361 field ^= offset_map.At(offset.Value() / kWordSize);
360 value = GetValue(i); 362 value = GetValue(i);
361 if (!field.IsNull()) { 363 if (!field.IsNull()) {
362 obj.SetField(field, value); 364 obj.SetField(field, value);
363 if (FLAG_trace_deoptimization_verbose) { 365 if (FLAG_trace_deoptimization_verbose) {
364 OS::PrintErr(" %s <- %s\n", 366 OS::PrintErr(" %s <- %s\n",
365 String::Handle(field.name()).ToCString(), 367 String::Handle(field.name()).ToCString(),
366 value.ToCString()); 368 value.ToCString());
367 } 369 }
368 } else { 370 } else {
369 ASSERT(offset.Value() == cls.type_arguments_field_offset()); 371 ASSERT(offset.Value() == cls.type_arguments_field_offset());
370 obj.SetFieldAtOffset(offset.Value(), value); 372 obj.SetFieldAtOffset(offset.Value(), value);
371 if (FLAG_trace_deoptimization_verbose) { 373 if (FLAG_trace_deoptimization_verbose) {
372 OS::PrintErr(" null Field @ offset(%" Pd ") <- %s\n", 374 OS::PrintErr(" null Field @ offset(%" Pd ") <- %s\n",
373 offset.Value(), 375 offset.Value(),
374 value.ToCString()); 376 value.ToCString());
375 } 377 }
376 } 378 }
377 } 379 }
378 } 380 }
379 } 381 }
380 382
381 } // namespace dart 383 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698