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

Side by Side Diff: src/compiler.cc

Issue 1159005: Initial support for marking live code. (Closed)
Patch Set: Addressed review comments. Created 10 years, 9 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
« no previous file with comments | « src/ast.cc ('k') | src/data-flow.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2010 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
11 // with the distribution. 11 // with the distribution.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 ReachingDefinitions rd(builder.postorder(), 99 ReachingDefinitions rd(builder.postorder(),
100 builder.body_definitions(), 100 builder.body_definitions(),
101 variable_count); 101 variable_count);
102 rd.Compute(); 102 rd.Compute();
103 103
104 TypeAnalyzer ta(builder.postorder(), 104 TypeAnalyzer ta(builder.postorder(),
105 builder.body_definitions(), 105 builder.body_definitions(),
106 variable_count, 106 variable_count,
107 function->num_parameters()); 107 function->num_parameters());
108 ta.Compute(); 108 ta.Compute();
109
110 MarkLiveCode(builder.preorder(),
111 builder.body_definitions(),
112 variable_count);
109 } 113 }
110 } 114 }
111 115
112 #ifdef DEBUG 116 #ifdef DEBUG
113 if (FLAG_print_graph_text && !builder.HasStackOverflow()) { 117 if (FLAG_print_graph_text && !builder.HasStackOverflow()) {
114 builder.graph()->PrintText(function, builder.postorder()); 118 builder.graph()->PrintText(function, builder.postorder());
115 } 119 }
116 #endif 120 #endif
117 } 121 }
118 122
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 ReachingDefinitions rd(builder.postorder(), 518 ReachingDefinitions rd(builder.postorder(),
515 builder.body_definitions(), 519 builder.body_definitions(),
516 variable_count); 520 variable_count);
517 rd.Compute(); 521 rd.Compute();
518 522
519 TypeAnalyzer ta(builder.postorder(), 523 TypeAnalyzer ta(builder.postorder(),
520 builder.body_definitions(), 524 builder.body_definitions(),
521 variable_count, 525 variable_count,
522 literal->num_parameters()); 526 literal->num_parameters());
523 ta.Compute(); 527 ta.Compute();
528
529 MarkLiveCode(builder.preorder(),
530 builder.body_definitions(),
531 variable_count);
524 } 532 }
525 } 533 }
526 534
527 #ifdef DEBUG 535 #ifdef DEBUG
528 if (FLAG_print_graph_text && !builder.HasStackOverflow()) { 536 if (FLAG_print_graph_text && !builder.HasStackOverflow()) {
529 builder.graph()->PrintText(literal, builder.postorder()); 537 builder.graph()->PrintText(literal, builder.postorder());
530 } 538 }
531 #endif 539 #endif
532 } 540 }
533 541
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 LOG(CodeCreateEvent(tag, *code, *func_name)); 653 LOG(CodeCreateEvent(tag, *code, *func_name));
646 OProfileAgent::CreateNativeCodeRegion(*func_name, 654 OProfileAgent::CreateNativeCodeRegion(*func_name,
647 code->instruction_start(), 655 code->instruction_start(),
648 code->instruction_size()); 656 code->instruction_size());
649 } 657 }
650 } 658 }
651 } 659 }
652 #endif 660 #endif
653 661
654 } } // namespace v8::internal 662 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/data-flow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698