OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 va_end(args); | 201 va_end(args); |
202 fflush(stderr); | 202 fflush(stderr); |
203 // Print preparser data to stdout. | 203 // Print preparser data to stdout. |
204 uint32_t size = data->size(); | 204 uint32_t size = data->size(); |
205 fprintf(stderr, "LOG: data size: %u\n", size); | 205 fprintf(stderr, "LOG: data size: %u\n", size); |
206 if (!WriteBuffer(stdout, data->data(), size)) { | 206 if (!WriteBuffer(stdout, data->data(), size)) { |
207 perror("ERROR: Writing data"); | 207 perror("ERROR: Writing data"); |
208 fflush(stderr); | 208 fflush(stderr); |
209 } | 209 } |
210 exit(EXIT_FAILURE); | 210 exit(EXIT_FAILURE); |
211 }; | 211 } |
212 | 212 |
213 | 213 |
214 bool IsFlag(const char* arg) { | 214 bool IsFlag(const char* arg) { |
215 // Anything starting with '-' is considered a flag. | 215 // Anything starting with '-' is considered a flag. |
216 // It's summarily ignored for now. | 216 // It's summarily ignored for now. |
217 return arg[0] == '-'; | 217 return arg[0] == '-'; |
218 } | 218 } |
219 | 219 |
220 | 220 |
221 struct ExceptionExpectation { | 221 struct ExceptionExpectation { |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 if (data.stack_overflow()) { | 370 if (data.stack_overflow()) { |
371 fail(&data, "ERROR: Stack overflow\n"); | 371 fail(&data, "ERROR: Stack overflow\n"); |
372 } | 372 } |
373 | 373 |
374 // Check that the expected exception is thrown, if an exception is | 374 // Check that the expected exception is thrown, if an exception is |
375 // expected. | 375 // expected. |
376 CheckException(&data, &expects); | 376 CheckException(&data, &expects); |
377 | 377 |
378 return EXIT_SUCCESS; | 378 return EXIT_SUCCESS; |
379 } | 379 } |
OLD | NEW |