OLD | NEW |
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 #import('dart:io'); | 5 #import('dart:io'); |
6 #import('dart:uri'); | 6 #import('dart:uri'); |
7 | 7 |
8 #import('../../lib/compiler/implementation/util/uri_extras.dart'); | 8 #import('../../lib/compiler/implementation/util/uri_extras.dart'); |
9 #import('../../lib/compiler/implementation/filenames.dart'); | 9 #import('../../lib/compiler/implementation/filenames.dart'); |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 Uri dart2jsUri = dartUri.resolve('lib/compiler/implementation/dart2js.dart'); | 66 Uri dart2jsUri = dartUri.resolve('lib/compiler/implementation/dart2js.dart'); |
67 String dart2jsPath = relativize(dartVmLocation, dart2jsUri); | 67 String dart2jsPath = relativize(dartVmLocation, dart2jsUri); |
68 String dart2jsPathWin = dart2jsPath.replaceAll("/", "\\"); | 68 String dart2jsPathWin = dart2jsPath.replaceAll("/", "\\"); |
69 | 69 |
70 print('dartUri = $dartUri'); | 70 print('dartUri = $dartUri'); |
71 print('dartVmLocation = $dartVmLocation'); | 71 print('dartVmLocation = $dartVmLocation'); |
72 print('dart2jsUri = $dart2jsUri'); | 72 print('dart2jsUri = $dart2jsUri'); |
73 print('dart2jsPath = $dart2jsPath'); | 73 print('dart2jsPath = $dart2jsPath'); |
74 print('dart2jsPathWin = $dart2jsPathWin'); | 74 print('dart2jsPathWin = $dart2jsPathWin'); |
75 | 75 |
| 76 // Disable String operator+. This should only be necessary |
| 77 // temporarily as the operator will go away soon. |
| 78 // TODO(ahe): Remove this option. |
| 79 options = ' --allow_string_plus=false$options'; |
| 80 |
76 return [ | 81 return [ |
77 ''' | 82 ''' |
78 #!/bin/sh | 83 #!/bin/sh |
79 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 84 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
80 # for details. All rights reserved. Use of this source code is governed by a | 85 # for details. All rights reserved. Use of this source code is governed by a |
81 # BSD-style license that can be found in the LICENSE file. | 86 # BSD-style license that can be found in the LICENSE file. |
82 | 87 |
83 BIN_DIR=`dirname \$0` | 88 BIN_DIR=`dirname \$0` |
84 exec \$BIN_DIR/dart$options \$BIN_DIR/$dart2jsPath "\$@" | 89 exec \$BIN_DIR/dart$options \$BIN_DIR/$dart2jsPath "\$@" |
85 ''', | 90 ''', |
86 ''' | 91 ''' |
87 @echo off | 92 @echo off |
88 REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 93 REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
89 REM for details. All rights reserved. Use of this source code is governed by a | 94 REM for details. All rights reserved. Use of this source code is governed by a |
90 REM BSD-style license that can be found in the LICENSE file. | 95 REM BSD-style license that can be found in the LICENSE file. |
91 | 96 |
92 set SCRIPTPATH=%~dp0 | 97 set SCRIPTPATH=%~dp0 |
93 | 98 |
94 REM Does the path have a trailing slash? If so, remove it. | 99 REM Does the path have a trailing slash? If so, remove it. |
95 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1% | 100 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1% |
96 | 101 |
97 set arguments=%* | 102 set arguments=%* |
98 | 103 |
99 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$dart2jsPathWin" %arguments% | 104 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$dart2jsPathWin" %arguments% |
100 '''.replaceAll('\n', '\r\n')]; | 105 '''.replaceAll('\n', '\r\n')]; |
101 } | 106 } |
OLD | NEW |