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

Side by Side Diff: src/hydrogen.cc

Issue 7860034: Fix bug in optimized named function expressions on 3.5 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.5/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/version.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 2433 matching lines...) Expand 10 before | Expand all | Expand 10 after
2444 // not have declarations). 2444 // not have declarations).
2445 if (scope->arguments() != NULL) { 2445 if (scope->arguments() != NULL) {
2446 if (!scope->arguments()->IsStackAllocated()) { 2446 if (!scope->arguments()->IsStackAllocated()) {
2447 return Bailout("context-allocated arguments"); 2447 return Bailout("context-allocated arguments");
2448 } 2448 }
2449 HArgumentsObject* object = new(zone()) HArgumentsObject; 2449 HArgumentsObject* object = new(zone()) HArgumentsObject;
2450 AddInstruction(object); 2450 AddInstruction(object);
2451 graph()->SetArgumentsObject(object); 2451 graph()->SetArgumentsObject(object);
2452 environment()->Bind(scope->arguments(), object); 2452 environment()->Bind(scope->arguments(), object);
2453 } 2453 }
2454 // Handle implicit declaration of the function name in named function
2455 // expressions before other declarations.
2456 if (scope->is_function_scope() && scope->function() != NULL) {
2457 if (!scope->function()->IsStackAllocated()) {
2458 return Bailout("unsupported declaration");
2459 }
2460 environment()->Bind(scope->function(), graph()->GetConstantHole());
2461 }
2454 } 2462 }
2455 2463
2456 2464
2457 void HGraphBuilder::VisitStatements(ZoneList<Statement*>* statements) { 2465 void HGraphBuilder::VisitStatements(ZoneList<Statement*>* statements) {
2458 for (int i = 0; i < statements->length(); i++) { 2466 for (int i = 0; i < statements->length(); i++) {
2459 CHECK_ALIVE(Visit(statements->at(i))); 2467 CHECK_ALIVE(Visit(statements->at(i)));
2460 } 2468 }
2461 } 2469 }
2462 2470
2463 2471
(...skipping 4285 matching lines...) Expand 10 before | Expand all | Expand 10 after
6749 } 6757 }
6750 } 6758 }
6751 6759
6752 #ifdef DEBUG 6760 #ifdef DEBUG
6753 if (graph_ != NULL) graph_->Verify(); 6761 if (graph_ != NULL) graph_->Verify();
6754 if (allocator_ != NULL) allocator_->Verify(); 6762 if (allocator_ != NULL) allocator_->Verify();
6755 #endif 6763 #endif
6756 } 6764 }
6757 6765
6758 } } // namespace v8::internal 6766 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698