OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 if (variable_count > 0 && builder.definitions()->length() > 0) { | 98 if (variable_count > 0 && builder.definitions()->length() > 0) { |
99 ReachingDefinitions rd(builder.postorder(), | 99 ReachingDefinitions rd(builder.postorder(), |
100 builder.definitions(), | 100 builder.definitions(), |
101 variable_count); | 101 variable_count); |
102 rd.Compute(); | 102 rd.Compute(); |
103 } | 103 } |
104 } | 104 } |
105 | 105 |
106 #ifdef DEBUG | 106 #ifdef DEBUG |
107 if (FLAG_print_graph_text && !builder.HasStackOverflow()) { | 107 if (FLAG_print_graph_text && !builder.HasStackOverflow()) { |
108 builder.graph()->PrintText(builder.postorder()); | 108 builder.graph()->PrintText(function, builder.postorder()); |
109 } | 109 } |
110 #endif | 110 #endif |
111 } | 111 } |
112 | 112 |
113 // Generate code and return it. Code generator selection is governed by | 113 // Generate code and return it. Code generator selection is governed by |
114 // which backends are enabled and whether the function is considered | 114 // which backends are enabled and whether the function is considered |
115 // run-once code or not: | 115 // run-once code or not: |
116 // | 116 // |
117 // --full-compiler enables the dedicated backend for code we expect to be | 117 // --full-compiler enables the dedicated backend for code we expect to be |
118 // run once | 118 // run once |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 if (variable_count > 0 && builder.definitions()->length() > 0) { | 502 if (variable_count > 0 && builder.definitions()->length() > 0) { |
503 ReachingDefinitions rd(builder.postorder(), | 503 ReachingDefinitions rd(builder.postorder(), |
504 builder.definitions(), | 504 builder.definitions(), |
505 variable_count); | 505 variable_count); |
506 rd.Compute(); | 506 rd.Compute(); |
507 } | 507 } |
508 } | 508 } |
509 | 509 |
510 #ifdef DEBUG | 510 #ifdef DEBUG |
511 if (FLAG_print_graph_text && !builder.HasStackOverflow()) { | 511 if (FLAG_print_graph_text && !builder.HasStackOverflow()) { |
512 builder.graph()->PrintText(builder.postorder()); | 512 builder.graph()->PrintText(literal, builder.postorder()); |
513 } | 513 } |
514 #endif | 514 #endif |
515 } | 515 } |
516 | 516 |
517 // Generate code and return it. The way that the compilation mode | 517 // Generate code and return it. The way that the compilation mode |
518 // is controlled by the command-line flags is described in | 518 // is controlled by the command-line flags is described in |
519 // the static helper function MakeCode. | 519 // the static helper function MakeCode. |
520 CompilationInfo info(literal, script, false); | 520 CompilationInfo info(literal, script, false); |
521 | 521 |
522 CHECK(!FLAG_always_full_compiler || !FLAG_always_fast_compiler); | 522 CHECK(!FLAG_always_full_compiler || !FLAG_always_fast_compiler); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 LOG(CodeCreateEvent(tag, *code, *func_name)); | 633 LOG(CodeCreateEvent(tag, *code, *func_name)); |
634 OProfileAgent::CreateNativeCodeRegion(*func_name, | 634 OProfileAgent::CreateNativeCodeRegion(*func_name, |
635 code->instruction_start(), | 635 code->instruction_start(), |
636 code->instruction_size()); | 636 code->instruction_size()); |
637 } | 637 } |
638 } | 638 } |
639 } | 639 } |
640 #endif | 640 #endif |
641 | 641 |
642 } } // namespace v8::internal | 642 } } // namespace v8::internal |
OLD | NEW |