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

Side by Side Diff: src/hydrogen.cc

Issue 7860033: Fix bug in optimized named function expressions on 3.4 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.4/
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 2425 matching lines...) Expand 10 before | Expand all | Expand 10 after
2436 // not have declarations). 2436 // not have declarations).
2437 if (scope->arguments() != NULL) { 2437 if (scope->arguments() != NULL) {
2438 if (!scope->arguments()->IsStackAllocated()) { 2438 if (!scope->arguments()->IsStackAllocated()) {
2439 return Bailout("context-allocated arguments"); 2439 return Bailout("context-allocated arguments");
2440 } 2440 }
2441 HArgumentsObject* object = new(zone()) HArgumentsObject; 2441 HArgumentsObject* object = new(zone()) HArgumentsObject;
2442 AddInstruction(object); 2442 AddInstruction(object);
2443 graph()->SetArgumentsObject(object); 2443 graph()->SetArgumentsObject(object);
2444 environment()->Bind(scope->arguments(), object); 2444 environment()->Bind(scope->arguments(), object);
2445 } 2445 }
2446 // Handle implicit declaration of the function name in named function
2447 // expressions before other declarations.
2448 if (scope->is_function_scope() && scope->function() != NULL) {
2449 if (!scope->function()->IsStackAllocated()) {
2450 return Bailout("unsupported declaration");
2451 }
2452 environment()->Bind(scope->function(), graph()->GetConstantHole());
2453 }
2446 } 2454 }
2447 2455
2448 2456
2449 void HGraphBuilder::VisitStatements(ZoneList<Statement*>* statements) { 2457 void HGraphBuilder::VisitStatements(ZoneList<Statement*>* statements) {
2450 for (int i = 0; i < statements->length(); i++) { 2458 for (int i = 0; i < statements->length(); i++) {
2451 CHECK_ALIVE(Visit(statements->at(i))); 2459 CHECK_ALIVE(Visit(statements->at(i)));
2452 } 2460 }
2453 } 2461 }
2454 2462
2455 2463
(...skipping 4306 matching lines...) Expand 10 before | Expand all | Expand 10 after
6762 } 6770 }
6763 } 6771 }
6764 6772
6765 #ifdef DEBUG 6773 #ifdef DEBUG
6766 if (graph_ != NULL) graph_->Verify(); 6774 if (graph_ != NULL) graph_->Verify();
6767 if (allocator_ != NULL) allocator_->Verify(); 6775 if (allocator_ != NULL) allocator_->Verify();
6768 #endif 6776 #endif
6769 } 6777 }
6770 6778
6771 } } // namespace v8::internal 6779 } } // 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