OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 | 5 |
6 #include "vm/ast_printer.h" | 6 #include "vm/ast_printer.h" |
7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
8 #include "vm/debugger.h" | 8 #include "vm/debugger.h" |
9 #include "vm/longjump.h" | 9 #include "vm/longjump.h" |
10 #include "vm/object.h" | 10 #include "vm/object.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 Parser::ParseCompilationUnit(lib, script); | 161 Parser::ParseCompilationUnit(lib, script); |
162 EXPECT(ClassFinalizer::ProcessPendingClasses()); | 162 EXPECT(ClassFinalizer::ProcessPendingClasses()); |
163 | 163 |
164 DumpFunction(lib, "A", "foo"); | 164 DumpFunction(lib, "A", "foo"); |
165 DumpFunction(lib, "A", "bar"); | 165 DumpFunction(lib, "A", "bar"); |
166 DumpFunction(lib, "A", "baz"); | 166 DumpFunction(lib, "A", "baz"); |
167 DumpFunction(lib, "B", "bam"); | 167 DumpFunction(lib, "B", "bam"); |
168 } | 168 } |
169 | 169 |
170 | 170 |
171 const char* saved_vars = NULL; | 171 #ifndef PRODUCT |
172 | 172 |
173 | 173 |
174 char* SkipIndex(const char* input) { | 174 static const char* saved_vars = NULL; |
| 175 |
| 176 |
| 177 static char* SkipIndex(const char* input) { |
175 char* output_buffer = new char[strlen(input)]; | 178 char* output_buffer = new char[strlen(input)]; |
176 char* output = output_buffer; | 179 char* output = output_buffer; |
177 | 180 |
178 while (input[0] != '\0') { | 181 while (input[0] != '\0') { |
179 const char* index_pos = strstr(input, "index="); | 182 const char* index_pos = strstr(input, "index="); |
180 if (index_pos == NULL) { | 183 if (index_pos == NULL) { |
181 while (input[0] != '\0') { | 184 while (input[0] != '\0') { |
182 *output++ = *input++; | 185 *output++ = *input++; |
183 } | 186 } |
184 break; | 187 break; |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 | 561 |
559 "a\n" | 562 "a\n" |
560 " 0 CurrentCtx scope=0 begin=0 end=0" | 563 " 0 CurrentCtx scope=0 begin=0 end=0" |
561 " name=:current_context_var\n" | 564 " name=:current_context_var\n" |
562 " 1 ContextLevel level=1 scope=2 begin=3 end=79\n" | 565 " 1 ContextLevel level=1 scope=2 begin=3 end=79\n" |
563 " 2 ContextVar level=1 begin=9 end=79 name=x\n" | 566 " 2 ContextVar level=1 begin=9 end=79 name=x\n" |
564 " 3 StackVar scope=2 begin=11 end=79 name=b\n", | 567 " 3 StackVar scope=2 begin=11 end=79 name=b\n", |
565 CaptureVarsAtLine(lib, "a", 10)); | 568 CaptureVarsAtLine(lib, "a", 10)); |
566 } | 569 } |
567 | 570 |
| 571 #endif // !PRODUCT |
| 572 |
568 } // namespace dart | 573 } // namespace dart |
OLD | NEW |