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

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

Issue 11000025: Revert hiding of VM-only coreimpl list implementation types. While I (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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
« no previous file with comments | « runtime/vm/intrinsifier.h ('k') | runtime/vm/intrinsifier_ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Class for intrinsifying functions. 4 // Class for intrinsifying functions.
5 5
6 #include "vm/intrinsifier.h" 6 #include "vm/intrinsifier.h"
7 #include "vm/flags.h" 7 #include "vm/flags.h"
8 #include "vm/object.h" 8 #include "vm/object.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 47
48 // Returns true if the function matches function_name and class_name, with 48 // Returns true if the function matches function_name and class_name, with
49 // special recognition of corelib private classes. 49 // special recognition of corelib private classes.
50 static bool TestFunction(const Function& function, 50 static bool TestFunction(const Function& function,
51 const char* function_class_name, 51 const char* function_class_name,
52 const char* function_name, 52 const char* function_name,
53 const char* test_class_name, 53 const char* test_class_name,
54 const char* test_function_name) { 54 const char* test_function_name) {
55 // If test_function_name starts with a '.' we use that to indicate
56 // that it is a named constructor in the class. Therefore, if
57 // the class matches and the rest of the method name starting with
58 // the dot matches, we have found a match.
59 if (test_function_name[0] == '.') {
60 function_name = strstr(function_name, ".");
61 if (function_name == NULL) {
62 return false;
63 }
64 }
65 return CompareNames(test_class_name, function_class_name) && 55 return CompareNames(test_class_name, function_class_name) &&
66 CompareNames(test_function_name, function_name); 56 CompareNames(test_function_name, function_name);
67 } 57 }
68 58
69 59
70 bool Intrinsifier::CanIntrinsify(const Function& function) { 60 bool Intrinsifier::CanIntrinsify(const Function& function) {
71 if (!FLAG_intrinsify) return false; 61 if (!FLAG_intrinsify) return false;
72 // Closure functions may have different arguments. 62 // Closure functions may have different arguments.
73 if (function.IsClosureFunction()) return false; 63 if (function.IsClosureFunction()) return false;
74 const char* function_name = String::Handle(function.name()).ToCString(); 64 const char* function_name = String::Handle(function.name()).ToCString();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 #test_class_name, #test_function_name)) { \ 98 #test_class_name, #test_function_name)) { \
109 return destination(assembler); \ 99 return destination(assembler); \
110 } \ 100 } \
111 101
112 INTRINSIC_LIST(FIND_INTRINSICS); 102 INTRINSIC_LIST(FIND_INTRINSICS);
113 #undef FIND_INTRINSICS 103 #undef FIND_INTRINSICS
114 return false; 104 return false;
115 } 105 }
116 106
117 } // namespace dart 107 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier.h ('k') | runtime/vm/intrinsifier_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698