| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index 37204c9a018e9aa8d6010e8645717f314f957ab2..0d810e41afc51954e9f7d4897658e19c15e54b0c 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -2932,23 +2932,14 @@ Expression* Parser::ParseLeftHandSideExpression(bool* ok) {
|
| // Keep track of eval() calls since they disable all local variable
|
| // optimizations.
|
| // The calls that need special treatment are the
|
| - // direct (i.e. not aliased) eval calls. These calls are all of the
|
| - // form eval(...) with no explicit receiver object where eval is not
|
| - // declared in the current scope chain.
|
| + // direct eval calls. These calls are all of the form eval(...), with
|
| + // no explicit receiver.
|
| // These calls are marked as potentially direct eval calls. Whether
|
| // they are actually direct calls to eval is determined at run time.
|
| - // TODO(994): In ES5, it doesn't matter if the "eval" var is declared
|
| - // in the local scope chain. It only matters that it's called "eval",
|
| - // is called without a receiver and it refers to the original eval
|
| - // function.
|
| VariableProxy* callee = result->AsVariableProxy();
|
| if (callee != NULL &&
|
| callee->IsVariable(isolate()->factory()->eval_symbol())) {
|
| - Handle<String> name = callee->name();
|
| - Variable* var = top_scope_->Lookup(name);
|
| - if (var == NULL) {
|
| - top_scope_->DeclarationScope()->RecordEvalCall();
|
| - }
|
| + top_scope_->DeclarationScope()->RecordEvalCall();
|
| }
|
| result = NewCall(result, args, pos);
|
| break;
|
|
|