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

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

Issue 2933983002: Avoid assert fault when using --trace-type-checks (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/runtime_entry.h" 5 #include "vm/runtime_entry.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast.h" 8 #include "vm/ast.h"
9 #include "vm/code_patcher.h" 9 #include "vm/code_patcher.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 const AbstractType& type, 382 const AbstractType& type,
383 const TypeArguments& instantiator_type_arguments, 383 const TypeArguments& instantiator_type_arguments,
384 const TypeArguments& function_type_arguments, 384 const TypeArguments& function_type_arguments,
385 const Bool& result) { 385 const Bool& result) {
386 DartFrameIterator iterator(Thread::Current(), 386 DartFrameIterator iterator(Thread::Current(),
387 StackFrameIterator::kNoCrossThreadIteration); 387 StackFrameIterator::kNoCrossThreadIteration);
388 StackFrame* caller_frame = iterator.NextFrame(); 388 StackFrame* caller_frame = iterator.NextFrame();
389 ASSERT(caller_frame != NULL); 389 ASSERT(caller_frame != NULL);
390 390
391 const AbstractType& instance_type = 391 const AbstractType& instance_type =
392 AbstractType::Handle(instance.GetType(Heap::kNew)); 392 AbstractType::Handle(instance.GetType(Heap::kOld));
rmacnak 2017/06/12 23:46:31 We implement Object.runtimeType in terms of Instan
393 ASSERT(instance_type.IsInstantiated()); 393 ASSERT(instance_type.IsInstantiated());
394 if (type.IsInstantiated()) { 394 if (type.IsInstantiated()) {
395 OS::PrintErr("%s: '%s' %" Pd " %s '%s' %" Pd " (pc: %#" Px ").\n", message, 395 OS::PrintErr("%s: '%s' %" Pd " %s '%s' %" Pd " (pc: %#" Px ").\n", message,
396 String::Handle(instance_type.Name()).ToCString(), 396 String::Handle(instance_type.Name()).ToCString(),
397 Class::Handle(instance_type.type_class()).id(), 397 Class::Handle(instance_type.type_class()).id(),
398 (result.raw() == Bool::True().raw()) ? "is" : "is !", 398 (result.raw() == Bool::True().raw()) ? "is" : "is !",
399 String::Handle(type.Name()).ToCString(), 399 String::Handle(type.Name()).ToCString(),
400 Class::Handle(type.type_class()).id(), caller_frame->pc()); 400 Class::Handle(type.type_class()).id(), caller_frame->pc());
401 } else { 401 } else {
402 // Instantiate type before printing. 402 // Instantiate type before printing.
(...skipping 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after
2354 const intptr_t new_size = 2 * old_size; 2354 const intptr_t new_size = 2 * old_size;
2355 const intptr_t elm_size = old_data.ElementSizeInBytes(); 2355 const intptr_t elm_size = old_data.ElementSizeInBytes();
2356 const TypedData& new_data = 2356 const TypedData& new_data =
2357 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); 2357 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld));
2358 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); 2358 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size);
2359 typed_data_cell.SetAt(0, new_data); 2359 typed_data_cell.SetAt(0, new_data);
2360 arguments.SetReturn(new_data); 2360 arguments.SetReturn(new_data);
2361 } 2361 }
2362 2362
2363 } // namespace dart 2363 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698