OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_COMPILER_H_ | 5 #ifndef V8_COMPILER_H_ |
6 #define V8_COMPILER_H_ | 6 #define V8_COMPILER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 | 65 |
66 // Parser::Parse, then Compiler::Analyze. | 66 // Parser::Parse, then Compiler::Analyze. |
67 static bool ParseAndAnalyze(ParseInfo* info); | 67 static bool ParseAndAnalyze(ParseInfo* info); |
68 // Rewrite, analyze scopes, and renumber. | 68 // Rewrite, analyze scopes, and renumber. |
69 static bool Analyze(ParseInfo* info); | 69 static bool Analyze(ParseInfo* info); |
70 // Adds deoptimization support, requires ParseAndAnalyze. | 70 // Adds deoptimization support, requires ParseAndAnalyze. |
71 static bool EnsureDeoptimizationSupport(CompilationInfo* info); | 71 static bool EnsureDeoptimizationSupport(CompilationInfo* info); |
72 // Ensures that bytecode is generated, calls ParseAndAnalyze internally. | 72 // Ensures that bytecode is generated, calls ParseAndAnalyze internally. |
73 static bool EnsureBytecode(CompilationInfo* info); | 73 static bool EnsureBytecode(CompilationInfo* info); |
74 | 74 |
75 static Handle<SharedFunctionInfo> NewSharedFunctionInfoFromLiteral( | |
titzer
2016/11/28 10:40:11
I think this probably belongs on Factory.
bradn
2016/11/29 06:30:35
Moved the private method there.
| |
76 Isolate* isolate, FunctionLiteral* literal, Handle<Script> script); | |
77 | |
75 // The next compilation tier which the function should be compiled to for | 78 // The next compilation tier which the function should be compiled to for |
76 // optimization. This is used as a hint by the runtime profiler. | 79 // optimization. This is used as a hint by the runtime profiler. |
77 static CompilationTier NextCompilationTier(JSFunction* function); | 80 static CompilationTier NextCompilationTier(JSFunction* function); |
78 | 81 |
79 // =========================================================================== | 82 // =========================================================================== |
80 // The following family of methods instantiates new functions for scripts or | 83 // The following family of methods instantiates new functions for scripts or |
81 // function literals. The decision whether those functions will be compiled, | 84 // function literals. The decision whether those functions will be compiled, |
82 // is left to the discretion of the compiler. | 85 // is left to the discretion of the compiler. |
83 // | 86 // |
84 // Please note this interface returns shared function infos. This means you | 87 // Please note this interface returns shared function infos. This means you |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
221 state_ = State::kFailed; | 224 state_ = State::kFailed; |
222 } | 225 } |
223 return status; | 226 return status; |
224 } | 227 } |
225 }; | 228 }; |
226 | 229 |
227 } // namespace internal | 230 } // namespace internal |
228 } // namespace v8 | 231 } // namespace v8 |
229 | 232 |
230 #endif // V8_COMPILER_H_ | 233 #endif // V8_COMPILER_H_ |
OLD | NEW |