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

Side by Side Diff: src/data-flow.cc

Issue 3432022: Clean up some messiness in Scopes. (Closed)
Patch Set: Created 10 years, 3 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/codegen.cc ('k') | src/full-codegen.cc » ('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 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 if (update->op() == Token::INC && term_value == Smi::kMaxValue) return NULL; 118 if (update->op() == Token::INC && term_value == Smi::kMaxValue) return NULL;
119 if (update->op() == Token::DEC && term_value == Smi::kMinValue) return NULL; 119 if (update->op() == Token::DEC && term_value == Smi::kMinValue) return NULL;
120 120
121 // Found a smi loop variable. 121 // Found a smi loop variable.
122 return loop_var; 122 return loop_var;
123 } 123 }
124 124
125 int AssignedVariablesAnalyzer::BitIndex(Variable* var) { 125 int AssignedVariablesAnalyzer::BitIndex(Variable* var) {
126 ASSERT(var != NULL); 126 ASSERT(var != NULL);
127 ASSERT(var->IsStackAllocated()); 127 ASSERT(var->IsStackAllocated());
128 Slot* slot = var->slot(); 128 Slot* slot = var->AsSlot();
129 if (slot->type() == Slot::PARAMETER) { 129 if (slot->type() == Slot::PARAMETER) {
130 return slot->index(); 130 return slot->index();
131 } else { 131 } else {
132 return fun_->scope()->num_parameters() + slot->index(); 132 return fun_->scope()->num_parameters() + slot->index();
133 } 133 }
134 } 134 }
135 135
136 136
137 void AssignedVariablesAnalyzer::RecordAssignedVar(Variable* var) { 137 void AssignedVariablesAnalyzer::RecordAssignedVar(Variable* var) {
138 ASSERT(var != NULL); 138 ASSERT(var != NULL);
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 ASSERT(av_.IsEmpty()); 515 ASSERT(av_.IsEmpty());
516 } 516 }
517 517
518 518
519 void AssignedVariablesAnalyzer::VisitDeclaration(Declaration* decl) { 519 void AssignedVariablesAnalyzer::VisitDeclaration(Declaration* decl) {
520 UNREACHABLE(); 520 UNREACHABLE();
521 } 521 }
522 522
523 523
524 } } // namespace v8::internal 524 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/codegen.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698