| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/flow_graph_builder.h" | 5 #include "vm/flow_graph_builder.h" |
| 6 | 6 |
| 7 #include "vm/ast_printer.h" | 7 #include "vm/ast_printer.h" |
| 8 #include "vm/bit_vector.h" | 8 #include "vm/bit_vector.h" |
| 9 #include "vm/code_descriptors.h" | 9 #include "vm/code_descriptors.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 } | 424 } |
| 425 | 425 |
| 426 const bool eliminated = IsStaticTypeMoreSpecific(value, dst_type); | 426 const bool eliminated = IsStaticTypeMoreSpecific(value, dst_type); |
| 427 if (FLAG_eliminate_type_checks && FLAG_trace_type_check_elimination) { | 427 if (FLAG_eliminate_type_checks && FLAG_trace_type_check_elimination) { |
| 428 const Class& cls = Class::Handle( | 428 const Class& cls = Class::Handle( |
| 429 owner()->parsed_function().function().owner()); | 429 owner()->parsed_function().function().owner()); |
| 430 const Script& script = Script::Handle(cls.script()); | 430 const Script& script = Script::Handle(cls.script()); |
| 431 const char* static_type_name = "unknown"; | 431 const char* static_type_name = "unknown"; |
| 432 if (value != NULL) { | 432 if (value != NULL) { |
| 433 const AbstractType& type = AbstractType::Handle(value->StaticType()); | 433 const AbstractType& type = AbstractType::Handle(value->StaticType()); |
| 434 static_type_name = String::Handle(type.Name()).ToCString(); | 434 static_type_name = String::Handle(type.UserVisibleName()).ToCString(); |
| 435 } | 435 } |
| 436 Parser::PrintMessage(script, token_pos, "", | 436 Parser::PrintMessage(script, token_pos, "", |
| 437 "%s type check: static type '%s' is %s specific than " | 437 "%s type check: static type '%s' is %s specific than " |
| 438 "type '%s' of '%s'.", | 438 "type '%s' of '%s'.", |
| 439 eliminated ? "Eliminated" : "Generated", | 439 eliminated ? "Eliminated" : "Generated", |
| 440 static_type_name, | 440 static_type_name, |
| 441 eliminated ? "more" : "not more", | 441 eliminated ? "more" : "not more", |
| 442 String::Handle(dst_type.Name()).ToCString(), | 442 String::Handle(dst_type.UserVisibleName()).ToCString(), |
| 443 dst_name.ToCString()); | 443 dst_name.ToCString()); |
| 444 } | 444 } |
| 445 return eliminated; | 445 return eliminated; |
| 446 } | 446 } |
| 447 | 447 |
| 448 | 448 |
| 449 // <Expression> :: Assignable { expr: <Expression> | 449 // <Expression> :: Assignable { expr: <Expression> |
| 450 // type: AbstractType | 450 // type: AbstractType |
| 451 // dst_name: String } | 451 // dst_name: String } |
| 452 void EffectGraphVisitor::VisitAssignableNode(AssignableNode* node) { | 452 void EffectGraphVisitor::VisitAssignableNode(AssignableNode* node) { |
| (...skipping 2218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2671 char* chars = reinterpret_cast<char*>( | 2671 char* chars = reinterpret_cast<char*>( |
| 2672 Isolate::Current()->current_zone()->Allocate(len)); | 2672 Isolate::Current()->current_zone()->Allocate(len)); |
| 2673 OS::SNPrint(chars, len, kFormat, function_name, reason); | 2673 OS::SNPrint(chars, len, kFormat, function_name, reason); |
| 2674 const Error& error = Error::Handle( | 2674 const Error& error = Error::Handle( |
| 2675 LanguageError::New(String::Handle(String::New(chars)))); | 2675 LanguageError::New(String::Handle(String::New(chars)))); |
| 2676 Isolate::Current()->long_jump_base()->Jump(1, error); | 2676 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 2677 } | 2677 } |
| 2678 | 2678 |
| 2679 | 2679 |
| 2680 } // namespace dart | 2680 } // namespace dart |
| OLD | NEW |