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

Side by Side Diff: lib/src/runner/v8_runner.dart

Issue 1422323005: Serve html report in server mode (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Reformat Created 5 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
« no previous file with comments | « lib/src/report/html_reporter.dart ('k') | lib/src/server/server.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /// V8 runner support used by dartdevrun. 5 /// V8 runner support used by dartdevrun.
6 library dev_compiler.src.runner.v8_utils; 6 library dev_compiler.src.runner.v8_utils;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 } 45 }
46 46
47 List<String> get _v8VersionArgs; 47 List<String> get _v8VersionArgs;
48 List<String> _getLoadStatements(List<File> files); 48 List<String> _getLoadStatements(List<File> files);
49 49
50 String get _v8Binary => _options.runnerOptions.v8Binary; 50 String get _v8Binary => _options.runnerOptions.v8Binary;
51 51
52 Future<Process> start(List<File> files, String startStatement) => 52 Future<Process> start(List<File> files, String startStatement) =>
53 Process.start( 53 Process.start(
54 _v8Binary, [ 54 _v8Binary,
55 [
55 "--harmony", 56 "--harmony",
56 "-e", 57 "-e",
57 _GLOBALS + _getLoadStatements(files).join() + startStatement 58 _GLOBALS + _getLoadStatements(files).join() + startStatement
58 ], 59 ],
59 workingDirectory: _options.codegenOptions.outputDir); 60 workingDirectory: _options.codegenOptions.outputDir);
60 61
61 /// Throws if the v8 version of this runner is not supported, or if the runner 62 /// Throws if the v8 version of this runner is not supported, or if the runner
62 /// is not in the path. 63 /// is not in the path.
63 void _checkVersion() { 64 void _checkVersion() {
64 ProcessResult result = Process.runSync(_v8Binary, _v8VersionArgs); 65 ProcessResult result = Process.runSync(_v8Binary, _v8VersionArgs);
(...skipping 28 matching lines...) Expand all
93 @override 94 @override
94 get _v8VersionArgs => ['-p', 'process.versions.v8']; 95 get _v8VersionArgs => ['-p', 'process.versions.v8'];
95 96
96 @override 97 @override
97 _getLoadStatements(List<File> files) => files.map((file) { 98 _getLoadStatements(List<File> files) => files.map((file) {
98 String alias = getRuntimeFileAlias(_options, file); 99 String alias = getRuntimeFileAlias(_options, file);
99 return (alias != null ? 'var $alias = ' : '') + 100 return (alias != null ? 'var $alias = ' : '') +
100 'require("${file.path}");'; 101 'require("${file.path}");';
101 }); 102 });
102 } 103 }
OLDNEW
« no previous file with comments | « lib/src/report/html_reporter.dart ('k') | lib/src/server/server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698