Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
|
Jakob Kummerow
2012/01/16 11:41:25
nit: 2012
fschneider
2012/01/19 10:26:11
Done.
| |
| 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 269 // of the source code. | 269 // of the source code. |
| 270 | 270 |
| 271 // Please note this interface returns shared function infos. This means you | 271 // Please note this interface returns shared function infos. This means you |
| 272 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a | 272 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a |
| 273 // real function with a context. | 273 // real function with a context. |
| 274 | 274 |
| 275 class Compiler : public AllStatic { | 275 class Compiler : public AllStatic { |
| 276 public: | 276 public: |
| 277 // Default maximum number of function optimization attempts before we | 277 // Default maximum number of function optimization attempts before we |
| 278 // give up. | 278 // give up. |
| 279 static const int kDefaultMaxOptCount = 10; | 279 static const int kDefaultMaxDeoptCount = 10; |
| 280 | 280 |
| 281 static const int kMaxInliningLevels = 3; | 281 static const int kMaxInliningLevels = 3; |
| 282 | 282 |
| 283 // All routines return a SharedFunctionInfo. | 283 // All routines return a SharedFunctionInfo. |
| 284 // If an error occurs an exception is raised and the return handle | 284 // If an error occurs an exception is raised and the return handle |
| 285 // contains NULL. | 285 // contains NULL. |
| 286 | 286 |
| 287 // Compile a String source within a context. | 287 // Compile a String source within a context. |
| 288 static Handle<SharedFunctionInfo> Compile(Handle<String> source, | 288 static Handle<SharedFunctionInfo> Compile(Handle<String> source, |
| 289 Handle<Object> script_name, | 289 Handle<Object> script_name, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 322 | 322 |
| 323 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, | 323 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, |
| 324 CompilationInfo* info, | 324 CompilationInfo* info, |
| 325 Handle<SharedFunctionInfo> shared); | 325 Handle<SharedFunctionInfo> shared); |
| 326 }; | 326 }; |
| 327 | 327 |
| 328 | 328 |
| 329 } } // namespace v8::internal | 329 } } // namespace v8::internal |
| 330 | 330 |
| 331 #endif // V8_COMPILER_H_ | 331 #endif // V8_COMPILER_H_ |
| OLD | NEW |