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

Unified Diff: runtime/vm/parser.cc

Issue 11826024: Clean up uses of X::CheckedHandle where X::Cast or X::Handle is sufficient. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 16802)
+++ runtime/vm/parser.cc (working copy)
@@ -6357,7 +6357,7 @@
String& result = String::Handle();
const String& msg = String::Handle(String::NewFormattedV(format, args));
if (!script.IsNull()) {
- const String& script_url = String::CheckedHandle(script.url());
+ const String& script_url = String::Handle(script.url());
if (token_pos >= 0) {
intptr_t line, column;
script.GetTokenLocation(token_pos, &line, &column);
@@ -7386,11 +7386,10 @@
String* ident = ExpectIdentifier("identifier expected");
if (CurrentToken() == Token::kLPAREN) {
// Identifier followed by a opening paren: method call.
- if (left->IsPrimaryNode()
- && left->AsPrimaryNode()->primary().IsClass()) {
+ if (left->IsPrimaryNode() &&
+ left->AsPrimaryNode()->primary().IsClass()) {
// Static method call prefixed with class name.
- Class& cls = Class::CheckedHandle(
- left->AsPrimaryNode()->primary().raw());
+ const Class& cls = Class::Cast(left->AsPrimaryNode()->primary());
selector = ParseStaticCall(cls, *ident, ident_pos);
} else {
selector = ParseInstanceCall(left, *ident);
@@ -7446,8 +7445,8 @@
PrimaryNode* primary = left->AsPrimaryNode();
const intptr_t primary_pos = primary->token_pos();
if (primary->primary().IsFunction()) {
- Function& func = Function::CheckedHandle(primary->primary().raw());
- String& func_name = String::ZoneHandle(func.name());
+ const Function& func = Function::Cast(primary->primary());
+ const String& func_name = String::ZoneHandle(func.name());
if (func.is_static()) {
// Parse static function call.
Class& cls = Class::Handle(func.Owner());
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698