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

Side by Side Diff: src/x64/full-codegen-x64.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/x64/codegen-x64.cc ('k') | test/cctest/test-compiler.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 __ Push(Smi::FromInt(is_eval() ? 1 : 0)); 774 __ Push(Smi::FromInt(is_eval() ? 1 : 0));
775 __ CallRuntime(Runtime::kDeclareGlobals, 3); 775 __ CallRuntime(Runtime::kDeclareGlobals, 3);
776 // Return value is ignored. 776 // Return value is ignored.
777 } 777 }
778 778
779 779
780 void FullCodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) { 780 void FullCodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) {
781 Comment cmnt(masm_, "[ FunctionLiteral"); 781 Comment cmnt(masm_, "[ FunctionLiteral");
782 782
783 // Build the function boilerplate and instantiate it. 783 // Build the function boilerplate and instantiate it.
784 Handle<JSFunction> boilerplate = 784 Handle<SharedFunctionInfo> function_info =
785 Compiler::BuildBoilerplate(expr, script(), this); 785 Compiler::BuildFunctionInfo(expr, script(), this);
786 if (HasStackOverflow()) return; 786 if (HasStackOverflow()) return;
787 787
788 ASSERT(boilerplate->IsBoilerplate());
789
790 // Create a new closure. 788 // Create a new closure.
791 __ push(rsi); 789 __ push(rsi);
792 __ Push(boilerplate); 790 __ Push(function_info);
793 __ CallRuntime(Runtime::kNewClosure, 2); 791 __ CallRuntime(Runtime::kNewClosure, 2);
794 Apply(context_, rax); 792 Apply(context_, rax);
795 } 793 }
796 794
797 795
798 void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { 796 void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) {
799 Comment cmnt(masm_, "[ VariableProxy"); 797 Comment cmnt(masm_, "[ VariableProxy");
800 EmitVariableLoad(expr->var(), context_); 798 EmitVariableLoad(expr->var(), context_);
801 } 799 }
802 800
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1985 __ movq(Operand(rsp, 0), rdx); 1983 __ movq(Operand(rsp, 0), rdx);
1986 // And return. 1984 // And return.
1987 __ ret(0); 1985 __ ret(0);
1988 } 1986 }
1989 1987
1990 1988
1991 #undef __ 1989 #undef __
1992 1990
1993 1991
1994 } } // namespace v8::internal 1992 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698