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

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

Issue 11368138: Add some support for the code-point code-unit distinction. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: New version integrates feedback, adds less to standard String class. Created 8 years, 1 month 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/parser.h" 5 #include "vm/parser.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/compiler_stats.h" 10 #include "vm/compiler_stats.h"
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 CheckFunctionIsCallable(token_pos, super_func); 1330 CheckFunctionIsCallable(token_pos, super_func);
1331 return super_func.raw(); 1331 return super_func.raw();
1332 } 1332 }
1333 1333
1334 1334
1335 // Lookup class in the core lib which also contains various VM 1335 // Lookup class in the core lib which also contains various VM
1336 // helper methods and classes. Allow look up of private classes. 1336 // helper methods and classes. Allow look up of private classes.
1337 static RawClass* LookupCoreClass(const String& class_name) { 1337 static RawClass* LookupCoreClass(const String& class_name) {
1338 const Library& core_lib = Library::Handle(Library::CoreLibrary()); 1338 const Library& core_lib = Library::Handle(Library::CoreLibrary());
1339 String& name = String::Handle(class_name.raw()); 1339 String& name = String::Handle(class_name.raw());
1340 if (class_name.CharAt(0) == Scanner::kPrivateIdentifierStart) { 1340 if (class_name.CodeUnitAt(0) == Scanner::kPrivateIdentifierStart) {
1341 // Private identifiers are mangled on a per script basis. 1341 // Private identifiers are mangled on a per script basis.
1342 name = String::Concat(name, String::Handle(core_lib.private_key())); 1342 name = String::Concat(name, String::Handle(core_lib.private_key()));
1343 name = Symbols::New(name); 1343 name = Symbols::New(name);
1344 } 1344 }
1345 return core_lib.LookupClass(name); 1345 return core_lib.LookupClass(name);
1346 } 1346 }
1347 1347
1348 1348
1349 StaticCallNode* Parser::BuildInvocationMirrorAllocation( 1349 StaticCallNode* Parser::BuildInvocationMirrorAllocation(
1350 intptr_t call_pos, 1350 intptr_t call_pos,
(...skipping 8658 matching lines...) Expand 10 before | Expand all | Expand 10 after
10009 void Parser::SkipQualIdent() { 10009 void Parser::SkipQualIdent() {
10010 ASSERT(IsIdentifier()); 10010 ASSERT(IsIdentifier());
10011 ConsumeToken(); 10011 ConsumeToken();
10012 if (CurrentToken() == Token::kPERIOD) { 10012 if (CurrentToken() == Token::kPERIOD) {
10013 ConsumeToken(); // Consume the kPERIOD token. 10013 ConsumeToken(); // Consume the kPERIOD token.
10014 ExpectIdentifier("identifier expected after '.'"); 10014 ExpectIdentifier("identifier expected after '.'");
10015 } 10015 }
10016 } 10016 }
10017 10017
10018 } // namespace dart 10018 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698