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

Side by Side Diff: src/compiler.cc

Issue 8835: Track whether a node or variable are likely to be a Smi value. Propagate that... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 1 month 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-ia32.cc ('k') | src/flag-definitions.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 top->AllocateVariables(); 58 top->AllocateVariables();
59 59
60 #ifdef DEBUG 60 #ifdef DEBUG
61 if (Bootstrapper::IsActive() ? 61 if (Bootstrapper::IsActive() ?
62 FLAG_print_builtin_scopes : 62 FLAG_print_builtin_scopes :
63 FLAG_print_scopes) { 63 FLAG_print_scopes) {
64 literal->scope()->Print(); 64 literal->scope()->Print();
65 } 65 }
66 #endif 66 #endif
67 67
68 // Optimize the AST.
69 Rewriter::Optimize(literal);
70
68 // Generate code and return it. 71 // Generate code and return it.
69 Handle<Code> result = CodeGenerator::MakeCode(literal, script, is_eval); 72 Handle<Code> result = CodeGenerator::MakeCode(literal, script, is_eval);
70 return result; 73 return result;
71 } 74 }
72 75
73 76
74 static Handle<JSFunction> MakeFunction(bool is_global, 77 static Handle<JSFunction> MakeFunction(bool is_global,
75 bool is_eval, 78 bool is_eval,
76 Handle<Script> script, 79 Handle<Script> script,
77 v8::Extension* extension, 80 v8::Extension* extension,
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 // Set the expected number of properties for instances. 288 // Set the expected number of properties for instances.
286 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); 289 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count());
287 290
288 // Check the function has compiled code. 291 // Check the function has compiled code.
289 ASSERT(shared->is_compiled()); 292 ASSERT(shared->is_compiled());
290 return true; 293 return true;
291 } 294 }
292 295
293 296
294 } } // namespace v8::internal 297 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/codegen-ia32.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698