OLD | NEW |
1 // Copyright 2010 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 |
(...skipping 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1920 ASSERT(!IsMarkedWith(mark)); | 1920 ASSERT(!IsMarkedWith(mark)); |
1921 int instruction_count = instructions_.length(); | 1921 int instruction_count = instructions_.length(); |
1922 int variable_count = variables->length(); | 1922 int variable_count = variables->length(); |
1923 | 1923 |
1924 rd_.Initialize(definition_count); | 1924 rd_.Initialize(definition_count); |
1925 | 1925 |
1926 for (int i = 0; i < instruction_count; i++) { | 1926 for (int i = 0; i < instruction_count; i++) { |
1927 Expression* expr = instructions_[i]->AsExpression(); | 1927 Expression* expr = instructions_[i]->AsExpression(); |
1928 if (expr == NULL) continue; | 1928 if (expr == NULL) continue; |
1929 Variable* var = expr->AssignedVar(); | 1929 Variable* var = expr->AssignedVar(); |
1930 if (var == NULL) continue; | 1930 if (var == NULL || !var->IsStackAllocated()) continue; |
1931 | 1931 |
1932 // All definitions of this variable are killed. | 1932 // All definitions of this variable are killed. |
1933 BitVector* def_set = | 1933 BitVector* def_set = |
1934 variables->at(ReachingDefinitions::IndexFor(var, variable_count)); | 1934 variables->at(ReachingDefinitions::IndexFor(var, variable_count)); |
1935 rd_.kill()->Union(*def_set); | 1935 rd_.kill()->Union(*def_set); |
1936 | 1936 |
1937 // All previously generated definitions are not generated. | 1937 // All previously generated definitions are not generated. |
1938 rd_.gen()->Subtract(*def_set); | 1938 rd_.gen()->Subtract(*def_set); |
1939 | 1939 |
1940 // This one is generated. | 1940 // This one is generated. |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2110 // all necessary successors to the worklist. | 2110 // all necessary successors to the worklist. |
2111 while (!worklist.is_empty()) { | 2111 while (!worklist.is_empty()) { |
2112 Node* node = worklist.Remove(); | 2112 Node* node = worklist.Remove(); |
2113 node->MarkWith(!mark); | 2113 node->MarkWith(!mark); |
2114 node->UpdateRDIn(&worklist, mark); | 2114 node->UpdateRDIn(&worklist, mark); |
2115 } | 2115 } |
2116 } | 2116 } |
2117 | 2117 |
2118 | 2118 |
2119 } } // namespace v8::internal | 2119 } } // namespace v8::internal |
OLD | NEW |