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

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

Issue 189443004: Fix performance of setRange by avoiding going to Lists.copy (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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/bootstrap_natives.h ('k') | runtime/vm/object.h » ('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/assembler.h" 6 #include "vm/assembler.h"
7 #include "vm/intrinsifier.h" 7 #include "vm/intrinsifier.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/symbols.h" 10 #include "vm/symbols.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 #define SETUP_FUNCTION(class_name, function_name, destination, fp) \ 103 #define SETUP_FUNCTION(class_name, function_name, destination, fp) \
104 if (strcmp(#class_name, "::") == 0) { \ 104 if (strcmp(#class_name, "::") == 0) { \
105 str = String::New(#function_name); \ 105 str = String::New(#function_name); \
106 func = lib.LookupFunctionAllowPrivate(str); \ 106 func = lib.LookupFunctionAllowPrivate(str); \
107 } else { \ 107 } else { \
108 str = String::New(#class_name); \ 108 str = String::New(#class_name); \
109 cls = lib.LookupClassAllowPrivate(str); \ 109 cls = lib.LookupClassAllowPrivate(str); \
110 ASSERT(!cls.IsNull()); \ 110 ASSERT(!cls.IsNull()); \
111 error = cls.EnsureIsFinalized(isolate); \ 111 error = cls.EnsureIsFinalized(isolate); \
112 if (!error.IsNull()) { \
113 OS::PrintErr("%s\n", error.ToErrorCString()); \
114 } \
112 ASSERT(error.IsNull()); \ 115 ASSERT(error.IsNull()); \
113 if (#function_name[0] == '.') { \ 116 if (#function_name[0] == '.') { \
114 str = String::New(#class_name#function_name); \ 117 str = String::New(#class_name#function_name); \
115 } else { \ 118 } else { \
116 str = String::New(#function_name); \ 119 str = String::New(#function_name); \
117 } \ 120 } \
118 func = cls.LookupFunctionAllowPrivate(str); \ 121 func = cls.LookupFunctionAllowPrivate(str); \
119 } \ 122 } \
120 ASSERT(!func.IsNull()); \ 123 ASSERT(!func.IsNull()); \
121 func.set_is_intrinsic(true); 124 func.set_is_intrinsic(true);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 170 }
168 } else if (lib.raw() == Library::TypedDataLibrary()) { 171 } else if (lib.raw() == Library::TypedDataLibrary()) {
169 TYPED_DATA_LIB_INTRINSIC_LIST(FIND_INTRINSICS); 172 TYPED_DATA_LIB_INTRINSIC_LIST(FIND_INTRINSICS);
170 } else if (lib.raw() == Library::MathLibrary()) { 173 } else if (lib.raw() == Library::MathLibrary()) {
171 MATH_LIB_INTRINSIC_LIST(FIND_INTRINSICS); 174 MATH_LIB_INTRINSIC_LIST(FIND_INTRINSICS);
172 } 175 }
173 #undef FIND_INTRINSICS 176 #undef FIND_INTRINSICS
174 } 177 }
175 178
176 } // namespace dart 179 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698