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

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

Issue 11360061: Fix a few more dregs from sdk move (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 | tests/compiler/dart2js/value_range2_test.dart » ('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 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 227 }
228 228
229 229
230 // 230 //
231 // Measure compile of all dart2js(compiler) functions. 231 // Measure compile of all dart2js(compiler) functions.
232 // 232 //
233 static char* ComputeDart2JSPath(const char* arg) { 233 static char* ComputeDart2JSPath(const char* arg) {
234 char buffer[2048]; 234 char buffer[2048];
235 char* dart2js_path = strdup(File::GetCanonicalPath(arg)); 235 char* dart2js_path = strdup(File::GetCanonicalPath(arg));
236 const char* compiler_path = 236 const char* compiler_path =
237 "%s%ssdk%slib%siinternal%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); 247 path_separator);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 Dart_Handle cls = Dart_GetClass(lib, NewString("StackFrameTest")); 382 Dart_Handle cls = Dart_GetClass(lib, NewString("StackFrameTest"));
383 Dart_Handle result = Dart_Invoke(cls, NewString("testMain"), 0, NULL); 383 Dart_Handle result = Dart_Invoke(cls, NewString("testMain"), 0, NULL);
384 EXPECT_VALID(result); 384 EXPECT_VALID(result);
385 int64_t elapsed_time = 0; 385 int64_t elapsed_time = 0;
386 result = Dart_IntegerToInt64(result, &elapsed_time); 386 result = Dart_IntegerToInt64(result, &elapsed_time);
387 EXPECT_VALID(result); 387 EXPECT_VALID(result);
388 benchmark->set_score(elapsed_time); 388 benchmark->set_score(elapsed_time);
389 } 389 }
390 390
391 } // namespace dart 391 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/value_range2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698