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

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

Issue 11293063: Add missing path_separator arguments after sdk paths became (Closed) Base URL: http://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
« no previous file with comments | « no previous file | no next file » | 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 4
5 #include "vm/benchmark_test.h" 5 #include "vm/benchmark_test.h"
6 6
7 #include "bin/file.h" 7 #include "bin/file.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 10
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 "%s%ssdk%slib%s_internal%scompiler%scompiler.dart"; 237 "%s%ssdk%slib%s_internal%scompiler%scompiler.dart";
238 const char* path_separator = File::PathSeparator(); 238 const char* path_separator = File::PathSeparator();
239 ASSERT(path_separator != NULL && strlen(path_separator) == 1); 239 ASSERT(path_separator != NULL && strlen(path_separator) == 1);
240 char* ptr = strrchr(dart2js_path, *path_separator); 240 char* ptr = strrchr(dart2js_path, *path_separator);
241 while (ptr != NULL) { 241 while (ptr != NULL) {
242 *ptr = '\0'; 242 *ptr = '\0';
243 OS::SNPrint(buffer, 2048, compiler_path, 243 OS::SNPrint(buffer, 2048, compiler_path,
244 dart2js_path, 244 dart2js_path,
245 path_separator, 245 path_separator,
246 path_separator, 246 path_separator,
247 path_separator,
Ivan Posva 2012/11/02 16:05:09 Carl, any reason why this was not caught during th
cshapiro 2012/11/02 17:24:34 Only format control string literals are checked.
248 path_separator,
247 path_separator); 249 path_separator);
248 if (File::Exists(buffer)) { 250 if (File::Exists(buffer)) {
249 break; 251 break;
250 } 252 }
251 ptr = strrchr(dart2js_path, *path_separator); 253 ptr = strrchr(dart2js_path, *path_separator);
252 } 254 }
253 if (ptr == NULL) { 255 if (ptr == NULL) {
254 free(dart2js_path); 256 free(dart2js_path);
255 dart2js_path = NULL; 257 dart2js_path = NULL;
256 } 258 }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 Dart_Handle cls = Dart_GetClass(lib, NewString("StackFrameTest")); 384 Dart_Handle cls = Dart_GetClass(lib, NewString("StackFrameTest"));
383 Dart_Handle result = Dart_Invoke(cls, NewString("testMain"), 0, NULL); 385 Dart_Handle result = Dart_Invoke(cls, NewString("testMain"), 0, NULL);
384 EXPECT_VALID(result); 386 EXPECT_VALID(result);
385 int64_t elapsed_time = 0; 387 int64_t elapsed_time = 0;
386 result = Dart_IntegerToInt64(result, &elapsed_time); 388 result = Dart_IntegerToInt64(result, &elapsed_time);
387 EXPECT_VALID(result); 389 EXPECT_VALID(result);
388 benchmark->set_score(elapsed_time); 390 benchmark->set_score(elapsed_time);
389 } 391 }
390 392
391 } // namespace dart 393 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698