OLD | NEW |
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 19 matching lines...) Expand all Loading... |
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" | 35 #include "oprofile-agent.h" |
36 #include "rewriter.h" | 36 #include "rewriter.h" |
37 #include "scopes.h" | 37 #include "scopes.h" |
38 #include "usage-analyzer.h" | 38 #include "usage-analyzer.h" |
39 | 39 |
40 namespace v8 { namespace internal { | 40 namespace v8 { |
| 41 namespace internal { |
41 | 42 |
42 static Handle<Code> MakeCode(FunctionLiteral* literal, | 43 static Handle<Code> MakeCode(FunctionLiteral* literal, |
43 Handle<Script> script, | 44 Handle<Script> script, |
44 Handle<Context> context, | 45 Handle<Context> context, |
45 bool is_eval) { | 46 bool is_eval) { |
46 ASSERT(literal != NULL); | 47 ASSERT(literal != NULL); |
47 | 48 |
48 // Rewrite the AST by introducing .result assignments where needed. | 49 // Rewrite the AST by introducing .result assignments where needed. |
49 if (!Rewriter::Process(literal) || !AnalyzeVariableUsage(literal)) { | 50 if (!Rewriter::Process(literal) || !AnalyzeVariableUsage(literal)) { |
50 // Signal a stack overflow by returning a null handle. The stack | 51 // Signal a stack overflow by returning a null handle. The stack |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 // Set the expected number of properties for instances. | 385 // Set the expected number of properties for instances. |
385 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); | 386 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); |
386 | 387 |
387 // Check the function has compiled code. | 388 // Check the function has compiled code. |
388 ASSERT(shared->is_compiled()); | 389 ASSERT(shared->is_compiled()); |
389 return true; | 390 return true; |
390 } | 391 } |
391 | 392 |
392 | 393 |
393 } } // namespace v8::internal | 394 } } // namespace v8::internal |
OLD | NEW |