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

Side by Side Diff: src/hydrogen.cc

Issue 6625048: Strict mode arguments do not share binding with formal parameters. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR Feedback Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/ast-inl.h ('k') | src/ia32/codegen-ia32.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after
2228 2228
2229 // Set the initial values of stack-allocated locals. 2229 // Set the initial values of stack-allocated locals.
2230 for (int i = count; i < environment()->length(); ++i) { 2230 for (int i = count; i < environment()->length(); ++i) {
2231 environment()->Bind(i, undefined_constant); 2231 environment()->Bind(i, undefined_constant);
2232 } 2232 }
2233 2233
2234 // Handle the arguments and arguments shadow variables specially (they do 2234 // Handle the arguments and arguments shadow variables specially (they do
2235 // not have declarations). 2235 // not have declarations).
2236 if (scope->arguments() != NULL) { 2236 if (scope->arguments() != NULL) {
2237 if (!scope->arguments()->IsStackAllocated() || 2237 if (!scope->arguments()->IsStackAllocated() ||
2238 !scope->arguments_shadow()->IsStackAllocated()) { 2238 (scope->arguments_shadow() != NULL &&
2239 !scope->arguments_shadow()->IsStackAllocated())) {
2239 BAILOUT("context-allocated arguments"); 2240 BAILOUT("context-allocated arguments");
2240 } 2241 }
2241 HArgumentsObject* object = new HArgumentsObject; 2242 HArgumentsObject* object = new HArgumentsObject;
2242 AddInstruction(object); 2243 AddInstruction(object);
2243 graph()->SetArgumentsObject(object); 2244 graph()->SetArgumentsObject(object);
2244 environment()->Bind(scope->arguments(), object); 2245 environment()->Bind(scope->arguments(), object);
2245 environment()->Bind(scope->arguments_shadow(), object); 2246 if (scope->arguments_shadow() != NULL) {
2247 environment()->Bind(scope->arguments_shadow(), object);
2248 }
2246 } 2249 }
2247 } 2250 }
2248 2251
2249 2252
2250 void HGraphBuilder::VisitStatements(ZoneList<Statement*>* statements) { 2253 void HGraphBuilder::VisitStatements(ZoneList<Statement*>* statements) {
2251 for (int i = 0; i < statements->length(); i++) { 2254 for (int i = 0; i < statements->length(); i++) {
2252 Visit(statements->at(i)); 2255 Visit(statements->at(i));
2253 if (HasStackOverflow() || current_block() == NULL) break; 2256 if (HasStackOverflow() || current_block() == NULL) break;
2254 } 2257 }
2255 } 2258 }
(...skipping 3750 matching lines...) Expand 10 before | Expand all | Expand 10 after
6006 } 6009 }
6007 } 6010 }
6008 6011
6009 #ifdef DEBUG 6012 #ifdef DEBUG
6010 if (graph_ != NULL) graph_->Verify(); 6013 if (graph_ != NULL) graph_->Verify();
6011 if (allocator_ != NULL) allocator_->Verify(); 6014 if (allocator_ != NULL) allocator_->Verify();
6012 #endif 6015 #endif
6013 } 6016 }
6014 6017
6015 } } // namespace v8::internal 6018 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast-inl.h ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698