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

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

Issue 12457034: Ensure that all goto instructions have deoptimization target. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address Florian's comments Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/deopt_instructions.h » ('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) 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/code_generator.h" 5 #include "vm/code_generator.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/bigint_operations.h" 9 #include "vm/bigint_operations.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 Error& malformed_error = Error::Handle(); 569 Error& malformed_error = Error::Handle();
570 const Bool& result = 570 const Bool& result =
571 instance.IsInstanceOf(type, 571 instance.IsInstanceOf(type,
572 instantiator_type_arguments, 572 instantiator_type_arguments,
573 &malformed_error) ? Bool::True() : Bool::False(); 573 &malformed_error) ? Bool::True() : Bool::False();
574 if (FLAG_trace_type_checks) { 574 if (FLAG_trace_type_checks) {
575 PrintTypeCheck("InstanceOf", 575 PrintTypeCheck("InstanceOf",
576 instance, type, instantiator_type_arguments, result); 576 instance, type, instantiator_type_arguments, result);
577 } 577 }
578 if (!result.value() && !malformed_error.IsNull()) { 578 if (!result.value() && !malformed_error.IsNull()) {
579 UNREACHABLE();
Florian Schneider 2013/04/12 11:01:52 Accidental edit?
Vyacheslav Egorov (Google) 2013/04/12 11:02:48 Indeed. Reverted.
580
579 // Throw a dynamic type error only if the instanceof test fails. 581 // Throw a dynamic type error only if the instanceof test fails.
580 const intptr_t location = GetCallerLocation(); 582 const intptr_t location = GetCallerLocation();
581 String& malformed_error_message = String::Handle( 583 String& malformed_error_message = String::Handle(
582 String::New(malformed_error.ToErrorCString())); 584 String::New(malformed_error.ToErrorCString()));
583 Exceptions::CreateAndThrowTypeError( 585 Exceptions::CreateAndThrowTypeError(
584 location, Symbols::Empty(), Symbols::Empty(), 586 location, Symbols::Empty(), Symbols::Empty(),
585 Symbols::Empty(), malformed_error_message); 587 Symbols::Empty(), malformed_error_message);
586 UNREACHABLE(); 588 UNREACHABLE();
587 } 589 }
588 UpdateTypeTestCache(instance, type, instantiator, 590 UpdateTypeTestCache(instance, type, instantiator,
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1719 // Arg1: Value that is being stored. 1721 // Arg1: Value that is being stored.
1720 DEFINE_RUNTIME_ENTRY(UpdateFieldCid, 2) { 1722 DEFINE_RUNTIME_ENTRY(UpdateFieldCid, 2) {
1721 ASSERT(arguments.ArgCount() == kUpdateFieldCidRuntimeEntry.argument_count()); 1723 ASSERT(arguments.ArgCount() == kUpdateFieldCidRuntimeEntry.argument_count());
1722 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); 1724 const Field& field = Field::CheckedHandle(arguments.ArgAt(0));
1723 const Object& value = Object::Handle(arguments.ArgAt(1)); 1725 const Object& value = Object::Handle(arguments.ArgAt(1));
1724 1726
1725 field.UpdateCid(Class::Handle(value.clazz()).id()); 1727 field.UpdateCid(Class::Handle(value.clazz()).id());
1726 } 1728 }
1727 1729
1728 } // namespace dart 1730 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/deopt_instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698