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

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 669240: - Remove function boilerplate objects and use SharedFunctionInfos in... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Committed Created 10 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/ia32/fast-codegen-ia32.cc ('k') | src/objects.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 __ push(Immediate(Smi::FromInt(is_eval() ? 1 : 0))); 770 __ push(Immediate(Smi::FromInt(is_eval() ? 1 : 0)));
771 __ CallRuntime(Runtime::kDeclareGlobals, 3); 771 __ CallRuntime(Runtime::kDeclareGlobals, 3);
772 // Return value is ignored. 772 // Return value is ignored.
773 } 773 }
774 774
775 775
776 void FullCodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) { 776 void FullCodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) {
777 Comment cmnt(masm_, "[ FunctionLiteral"); 777 Comment cmnt(masm_, "[ FunctionLiteral");
778 778
779 // Build the function boilerplate and instantiate it. 779 // Build the function boilerplate and instantiate it.
780 Handle<JSFunction> boilerplate = 780 Handle<SharedFunctionInfo> function_info =
781 Compiler::BuildBoilerplate(expr, script(), this); 781 Compiler::BuildFunctionInfo(expr, script(), this);
782 if (HasStackOverflow()) return; 782 if (HasStackOverflow()) return;
783 783
784 ASSERT(boilerplate->IsBoilerplate());
785
786 // Create a new closure. 784 // Create a new closure.
787 __ push(esi); 785 __ push(esi);
788 __ push(Immediate(boilerplate)); 786 __ push(Immediate(function_info));
789 __ CallRuntime(Runtime::kNewClosure, 2); 787 __ CallRuntime(Runtime::kNewClosure, 2);
790 Apply(context_, eax); 788 Apply(context_, eax);
791 } 789 }
792 790
793 791
794 void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { 792 void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) {
795 Comment cmnt(masm_, "[ VariableProxy"); 793 Comment cmnt(masm_, "[ VariableProxy");
796 EmitVariableLoad(expr->var(), context_); 794 EmitVariableLoad(expr->var(), context_);
797 } 795 }
798 796
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
2006 __ add(Operand(edx), Immediate(masm_->CodeObject())); 2004 __ add(Operand(edx), Immediate(masm_->CodeObject()));
2007 __ mov(Operand(esp, 0), edx); 2005 __ mov(Operand(esp, 0), edx);
2008 // And return. 2006 // And return.
2009 __ ret(0); 2007 __ ret(0);
2010 } 2008 }
2011 2009
2012 2010
2013 #undef __ 2011 #undef __
2014 2012
2015 } } // namespace v8::internal 2013 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/fast-codegen-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698