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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 memcpy(new_output, output_, pos_); | 440 memcpy(new_output, output_, pos_); |
441 DeleteArray(output_); | 441 DeleteArray(output_); |
442 output_ = new_output; | 442 output_ = new_output; |
443 size_ = new_size; | 443 size_ = new_size; |
444 } | 444 } |
445 } | 445 } |
446 } | 446 } |
447 | 447 |
448 | 448 |
449 void PrettyPrinter::PrintStatements(ZoneList<Statement*>* statements) { | 449 void PrettyPrinter::PrintStatements(ZoneList<Statement*>* statements) { |
| 450 if (statements == NULL) return; |
450 for (int i = 0; i < statements->length(); i++) { | 451 for (int i = 0; i < statements->length(); i++) { |
451 if (i != 0) Print(" "); | 452 if (i != 0) Print(" "); |
452 Visit(statements->at(i)); | 453 Visit(statements->at(i)); |
453 } | 454 } |
454 } | 455 } |
455 | 456 |
456 | 457 |
457 void PrettyPrinter::PrintLabels(ZoneStringList* labels) { | 458 void PrettyPrinter::PrintLabels(ZoneStringList* labels) { |
458 if (labels != NULL) { | 459 if (labels != NULL) { |
459 for (int i = 0; i < labels->length(); i++) { | 460 for (int i = 0; i < labels->length(); i++) { |
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1400 AddAttribute("mode", Variable::Mode2String(decl->mode())); | 1401 AddAttribute("mode", Variable::Mode2String(decl->mode())); |
1401 } | 1402 } |
1402 Visit(decl->proxy()); | 1403 Visit(decl->proxy()); |
1403 if (decl->fun() != NULL) Visit(decl->fun()); | 1404 if (decl->fun() != NULL) Visit(decl->fun()); |
1404 } | 1405 } |
1405 | 1406 |
1406 | 1407 |
1407 #endif // DEBUG | 1408 #endif // DEBUG |
1408 | 1409 |
1409 } } // namespace v8::internal | 1410 } } // namespace v8::internal |
OLD | NEW |