| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 } | 156 } |
| 157 | 157 |
| 158 | 158 |
| 159 void AstLabeler::VisitSlot(Slot* expr) { | 159 void AstLabeler::VisitSlot(Slot* expr) { |
| 160 UNREACHABLE(); | 160 UNREACHABLE(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 | 163 |
| 164 void AstLabeler::VisitVariableProxy(VariableProxy* expr) { | 164 void AstLabeler::VisitVariableProxy(VariableProxy* expr) { |
| 165 expr->set_num(next_number_++); | 165 expr->set_num(next_number_++); |
| 166 Variable* var = expr->var(); |
| 167 if (var->is_global() && !var->is_this()) { |
| 168 info_->set_has_globals(true); |
| 169 } |
| 166 } | 170 } |
| 167 | 171 |
| 168 | 172 |
| 169 void AstLabeler::VisitLiteral(Literal* expr) { | 173 void AstLabeler::VisitLiteral(Literal* expr) { |
| 170 UNREACHABLE(); | 174 UNREACHABLE(); |
| 171 } | 175 } |
| 172 | 176 |
| 173 | 177 |
| 174 void AstLabeler::VisitRegExpLiteral(RegExpLiteral* expr) { | 178 void AstLabeler::VisitRegExpLiteral(RegExpLiteral* expr) { |
| 175 UNREACHABLE(); | 179 UNREACHABLE(); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 void AstLabeler::VisitThisFunction(ThisFunction* expr) { | 263 void AstLabeler::VisitThisFunction(ThisFunction* expr) { |
| 260 UNREACHABLE(); | 264 UNREACHABLE(); |
| 261 } | 265 } |
| 262 | 266 |
| 263 | 267 |
| 264 void AstLabeler::VisitDeclaration(Declaration* decl) { | 268 void AstLabeler::VisitDeclaration(Declaration* decl) { |
| 265 UNREACHABLE(); | 269 UNREACHABLE(); |
| 266 } | 270 } |
| 267 | 271 |
| 268 } } // namespace v8::internal | 272 } } // namespace v8::internal |
| OLD | NEW |