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

Side by Side Diff: src/hydrogen.cc

Issue 8346032: Allow inlining of named function expressions containing ThisFunction reference. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 2 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.cc ('k') | src/hydrogen-instructions.h » ('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 5946 matching lines...) Expand 10 before | Expand all | Expand 10 after
5957 HIsNilAndBranch* instr = new(zone()) HIsNilAndBranch(value, kind, nil); 5957 HIsNilAndBranch* instr = new(zone()) HIsNilAndBranch(value, kind, nil);
5958 instr->set_position(expr->position()); 5958 instr->set_position(expr->position());
5959 return ast_context()->ReturnControl(instr, expr->id()); 5959 return ast_context()->ReturnControl(instr, expr->id());
5960 } 5960 }
5961 5961
5962 5962
5963 void HGraphBuilder::VisitThisFunction(ThisFunction* expr) { 5963 void HGraphBuilder::VisitThisFunction(ThisFunction* expr) {
5964 ASSERT(!HasStackOverflow()); 5964 ASSERT(!HasStackOverflow());
5965 ASSERT(current_block() != NULL); 5965 ASSERT(current_block() != NULL);
5966 ASSERT(current_block()->HasPredecessor()); 5966 ASSERT(current_block()->HasPredecessor());
5967 HThisFunction* self = new(zone()) HThisFunction; 5967 HThisFunction* self = new(zone()) HThisFunction(
5968 function_state()->compilation_info()->closure());
5968 return ast_context()->ReturnInstruction(self, expr->id()); 5969 return ast_context()->ReturnInstruction(self, expr->id());
5969 } 5970 }
5970 5971
5971 5972
5972 void HGraphBuilder::VisitDeclaration(Declaration* decl) { 5973 void HGraphBuilder::VisitDeclaration(Declaration* decl) {
5973 HandleDeclaration(decl->proxy(), decl->mode(), decl->fun()); 5974 HandleDeclaration(decl->proxy(), decl->mode(), decl->fun());
5974 } 5975 }
5975 5976
5976 5977
5977 void HGraphBuilder::HandleDeclaration(VariableProxy* proxy, 5978 void HGraphBuilder::HandleDeclaration(VariableProxy* proxy,
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
6937 } 6938 }
6938 } 6939 }
6939 6940
6940 #ifdef DEBUG 6941 #ifdef DEBUG
6941 if (graph_ != NULL) graph_->Verify(false); // No full verify. 6942 if (graph_ != NULL) graph_->Verify(false); // No full verify.
6942 if (allocator_ != NULL) allocator_->Verify(); 6943 if (allocator_ != NULL) allocator_->Verify();
6943 #endif 6944 #endif
6944 } 6945 }
6945 6946
6946 } } // namespace v8::internal 6947 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698