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

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: 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 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 Library& coreimpl = Library::Handle(Library::CoreImplLibrary()); 1371 Library& coreimpl = Library::Handle(Library::CoreImplLibrary());
1372 return coreimpl.LookupClassAllowPrivate(class_name); 1372 return coreimpl.LookupClassAllowPrivate(class_name);
1373 } 1373 }
1374 1374
1375 1375
1376 // Lookup class in the core lib which also contains various VM 1376 // Lookup class in the core lib which also contains various VM
1377 // helper methods and classes. Allow look up of private classes. 1377 // helper methods and classes. Allow look up of private classes.
1378 static RawClass* LookupCoreClass(const String& class_name) { 1378 static RawClass* LookupCoreClass(const String& class_name) {
1379 const Library& core_lib = Library::Handle(Library::CoreLibrary()); 1379 const Library& core_lib = Library::Handle(Library::CoreLibrary());
1380 String& name = String::Handle(class_name.raw()); 1380 String& name = String::Handle(class_name.raw());
1381 if (class_name.CharAt(0) == Scanner::kPrivateIdentifierStart) { 1381 if (class_name.CodeUnitAt(0) == Scanner::kPrivateIdentifierStart) {
1382 // Private identifiers are mangled on a per script basis. 1382 // Private identifiers are mangled on a per script basis.
1383 name = String::Concat(name, String::Handle(core_lib.private_key())); 1383 name = String::Concat(name, String::Handle(core_lib.private_key()));
1384 name = Symbols::New(name); 1384 name = Symbols::New(name);
1385 } 1385 }
1386 return core_lib.LookupClass(name); 1386 return core_lib.LookupClass(name);
1387 } 1387 }
1388 1388
1389 1389
1390 StaticCallNode* Parser::BuildInvocationMirrorAllocation( 1390 StaticCallNode* Parser::BuildInvocationMirrorAllocation(
1391 intptr_t call_pos, 1391 intptr_t call_pos,
(...skipping 8559 matching lines...) Expand 10 before | Expand all | Expand 10 after
9951 void Parser::SkipQualIdent() { 9951 void Parser::SkipQualIdent() {
9952 ASSERT(IsIdentifier()); 9952 ASSERT(IsIdentifier());
9953 ConsumeToken(); 9953 ConsumeToken();
9954 if (CurrentToken() == Token::kPERIOD) { 9954 if (CurrentToken() == Token::kPERIOD) {
9955 ConsumeToken(); // Consume the kPERIOD token. 9955 ConsumeToken(); // Consume the kPERIOD token.
9956 ExpectIdentifier("identifier expected after '.'"); 9956 ExpectIdentifier("identifier expected after '.'");
9957 } 9957 }
9958 } 9958 }
9959 9959
9960 } // namespace dart 9960 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698