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

Side by Side Diff: tests/compiler/dart2js/source_mapping_test.dart

Issue 10969067: Attach positions to methods with interceptors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | « lib/compiler/implementation/ssa/builder.dart ('k') | 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 #import('dart:uri'); 5 #import('dart:uri');
6 6
7 #import("../../../lib/compiler/implementation/leg.dart"); 7 #import("../../../lib/compiler/implementation/leg.dart");
8 #import('../../../lib/compiler/implementation/source_file.dart'); 8 #import('../../../lib/compiler/implementation/source_file.dart');
9 #import("mock_compiler.dart"); 9 #import("mock_compiler.dart");
10 #import('parser_helper.dart'); 10 #import('parser_helper.dart');
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 class A { int x; foo() { @x = 3; } }'''; 82 class A { int x; foo() { @x = 3; } }''';
83 83
84 String LOOP_TEST = ''' 84 String LOOP_TEST = '''
85 void main() { 85 void main() {
86 @for (int i = 0; i < 100; ++i) { print(test(13)); @} 86 @for (int i = 0; i < 100; ++i) { print(test(13)); @}
87 } 87 }
88 int test(int x) { 88 int test(int x) {
89 int result = 1; @while (result < x) { result <<= 1; @} return result; 89 int result = 1; @while (result < x) { result <<= 1; @} return result;
90 }'''; 90 }''';
91 91
92 String INTERCEPTOR_TEST = '''void main() { var l = []; @l.add(0); print(l); }''' ;
ahe 2012/09/24 12:56:21 Long line.
podivilov1 2012/09/24 15:04:49 Done.
92 93
93 main() { 94 main() {
94 // These tests are fragile, since mappings for specific source locations 95 // These tests are fragile, since mappings for specific source locations
95 // could disappear due to various optimizations like code elimination, 96 // could disappear due to various optimizations like code elimination,
96 // function inlining, etc. If you broke the test, please try to rewrite it 97 // function inlining, etc. If you broke the test, please try to rewrite it
97 // so that the new code is not optimized, otherwise just remove the marker 98 // so that the new code is not optimized, otherwise just remove the marker
98 // from problematic location. 99 // from problematic location.
99 testSourceMapLocations(FUNCTIONS_TEST); 100 testSourceMapLocations(FUNCTIONS_TEST);
100 testSourceMapLocations(RETURN_TEST); 101 testSourceMapLocations(RETURN_TEST);
101 testSourceMapLocations(NOT_TEST); 102 testSourceMapLocations(NOT_TEST);
102 testSourceMapLocations(UNARY_TEST); 103 testSourceMapLocations(UNARY_TEST);
103 testSourceMapLocations(BINARY_TEST); 104 testSourceMapLocations(BINARY_TEST);
104 testSourceMapLocations(SEND_TEST); 105 testSourceMapLocations(SEND_TEST);
105 testSourceMapLocations(SEND_SET_TEST); 106 testSourceMapLocations(SEND_SET_TEST);
106 testSourceMapLocations(LOOP_TEST); 107 testSourceMapLocations(LOOP_TEST);
108 testSourceMapLocations(INTERCEPTOR_TEST);
107 } 109 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698