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

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

Issue 10800002: Hide names of internal classes from the user by mapping them to the documented (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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
OLDNEW
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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 } 439 }
440 440
441 const bool eliminated = IsStaticTypeMoreSpecific(value, dst_type); 441 const bool eliminated = IsStaticTypeMoreSpecific(value, dst_type);
442 if (FLAG_eliminate_type_checks && FLAG_trace_type_check_elimination) { 442 if (FLAG_eliminate_type_checks && FLAG_trace_type_check_elimination) {
443 const Class& cls = Class::Handle( 443 const Class& cls = Class::Handle(
444 owner()->parsed_function().function().owner()); 444 owner()->parsed_function().function().owner());
445 const Script& script = Script::Handle(cls.script()); 445 const Script& script = Script::Handle(cls.script());
446 const char* static_type_name = "unknown"; 446 const char* static_type_name = "unknown";
447 if (value != NULL) { 447 if (value != NULL) {
448 const AbstractType& type = AbstractType::Handle(value->StaticType()); 448 const AbstractType& type = AbstractType::Handle(value->StaticType());
449 static_type_name = String::Handle(type.Name()).ToCString(); 449 static_type_name = String::Handle(type.UserVisibleName()).ToCString();
450 } 450 }
451 Parser::PrintMessage(script, token_pos, "", 451 Parser::PrintMessage(script, token_pos, "",
452 "%s type check: static type '%s' is %s specific than " 452 "%s type check: static type '%s' is %s specific than "
453 "type '%s' of '%s'.", 453 "type '%s' of '%s'.",
454 eliminated ? "Eliminated" : "Generated", 454 eliminated ? "Eliminated" : "Generated",
455 static_type_name, 455 static_type_name,
456 eliminated ? "more" : "not more", 456 eliminated ? "more" : "not more",
457 String::Handle(dst_type.Name()).ToCString(), 457 String::Handle(dst_type.UserVisibleName()).ToCString(),
458 dst_name.ToCString()); 458 dst_name.ToCString());
459 } 459 }
460 return eliminated; 460 return eliminated;
461 } 461 }
462 462
463 463
464 // <Expression> :: Assignable { expr: <Expression> 464 // <Expression> :: Assignable { expr: <Expression>
465 // type: AbstractType 465 // type: AbstractType
466 // dst_name: String } 466 // dst_name: String }
467 void EffectGraphVisitor::VisitAssignableNode(AssignableNode* node) { 467 void EffectGraphVisitor::VisitAssignableNode(AssignableNode* node) {
(...skipping 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after
2654 char* chars = reinterpret_cast<char*>( 2654 char* chars = reinterpret_cast<char*>(
2655 Isolate::Current()->current_zone()->Allocate(len)); 2655 Isolate::Current()->current_zone()->Allocate(len));
2656 OS::SNPrint(chars, len, kFormat, function_name, reason); 2656 OS::SNPrint(chars, len, kFormat, function_name, reason);
2657 const Error& error = Error::Handle( 2657 const Error& error = Error::Handle(
2658 LanguageError::New(String::Handle(String::New(chars)))); 2658 LanguageError::New(String::Handle(String::New(chars))));
2659 Isolate::Current()->long_jump_base()->Jump(1, error); 2659 Isolate::Current()->long_jump_base()->Jump(1, error);
2660 } 2660 }
2661 2661
2662 2662
2663 } // namespace dart 2663 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/object.h » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698