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

Side by Side Diff: runtime/vm/intermediate_language.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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/flow_graph_allocator.h" 9 #include "vm/flow_graph_allocator.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 } 212 }
213 UNREACHABLE(); 213 UNREACHABLE();
214 return NULL; 214 return NULL;
215 } 215 }
216 216
217 217
218 static bool CompareNames(const Library& lib, 218 static bool CompareNames(const Library& lib,
219 const char* test_name, 219 const char* test_name,
220 const String& name) { 220 const String& name) {
221 // If both names are private mangle test_name before comparison. 221 // If both names are private mangle test_name before comparison.
222 if ((name.CharAt(0) == '_') && (test_name[0] == '_')) { 222 if ((name.CodeUnitAt(0) == '_') && (test_name[0] == '_')) {
223 const String& test_name_symbol = String::Handle(Symbols::New(test_name)); 223 const String& test_name_symbol = String::Handle(Symbols::New(test_name));
224 return String::Handle(lib.PrivateName(test_name_symbol)).Equals(name); 224 return String::Handle(lib.PrivateName(test_name_symbol)).Equals(name);
225 } 225 }
226 return name.Equals(test_name); 226 return name.Equals(test_name);
227 } 227 }
228 228
229 229
230 MethodRecognizer::Kind MethodRecognizer::RecognizeKind( 230 MethodRecognizer::Kind MethodRecognizer::RecognizeKind(
231 const Function& function) { 231 const Function& function) {
232 // Only core and math library methods can be recognized. 232 // Only core and math library methods can be recognized.
(...skipping 2420 matching lines...) Expand 10 before | Expand all | Expand 10 after
2653 return Array::length_offset(); 2653 return Array::length_offset();
2654 default: 2654 default:
2655 UNREACHABLE(); 2655 UNREACHABLE();
2656 return -1; 2656 return -1;
2657 } 2657 }
2658 } 2658 }
2659 2659
2660 #undef __ 2660 #undef __
2661 2661
2662 } // namespace dart 2662 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698