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

Side by Side Diff: src/compiler.cc

Issue 57048: Use the AST optimizer on the bodies of function literals. Notify the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 8 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/codegen.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 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
11 // with the distribution. 11 // with the distribution.
(...skipping 13 matching lines...) Expand all
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #include "bootstrapper.h" 30 #include "bootstrapper.h"
31 #include "codegen-inl.h" 31 #include "codegen-inl.h"
32 #include "compilation-cache.h" 32 #include "compilation-cache.h"
33 #include "compiler.h" 33 #include "compiler.h"
34 #include "debug.h" 34 #include "debug.h"
35 #include "oprofile-agent.h"
36 #include "rewriter.h"
35 #include "scopes.h" 37 #include "scopes.h"
36 #include "rewriter.h"
37 #include "usage-analyzer.h" 38 #include "usage-analyzer.h"
38 #include "oprofile-agent.h"
39 39
40 namespace v8 { namespace internal { 40 namespace v8 { namespace internal {
41 41
42 static Handle<Code> MakeCode(FunctionLiteral* literal, 42 static Handle<Code> MakeCode(FunctionLiteral* literal,
43 Handle<Script> script, 43 Handle<Script> script,
44 Handle<Context> context, 44 Handle<Context> context,
45 bool is_eval) { 45 bool is_eval) {
46 ASSERT(literal != NULL); 46 ASSERT(literal != NULL);
47 47
48 // Rewrite the AST by introducing .result assignments where needed. 48 // Rewrite the AST by introducing .result assignments where needed.
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 // Set the expected number of properties for instances. 341 // Set the expected number of properties for instances.
342 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); 342 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count());
343 343
344 // Check the function has compiled code. 344 // Check the function has compiled code.
345 ASSERT(shared->is_compiled()); 345 ASSERT(shared->is_compiled());
346 return true; 346 return true;
347 } 347 }
348 348
349 349
350 } } // namespace v8::internal 350 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/codegen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698