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

Side by Side Diff: src/compiler.h

Issue 10823362: Change the maximum optimization count into a commandline flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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 | « no previous file | src/compiler.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 // parameters which then can be executed. If the source code contains other 403 // parameters which then can be executed. If the source code contains other
404 // functions, they will be compiled and allocated as part of the compilation 404 // functions, they will be compiled and allocated as part of the compilation
405 // of the source code. 405 // of the source code.
406 406
407 // Please note this interface returns shared function infos. This means you 407 // Please note this interface returns shared function infos. This means you
408 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a 408 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a
409 // real function with a context. 409 // real function with a context.
410 410
411 class Compiler : public AllStatic { 411 class Compiler : public AllStatic {
412 public: 412 public:
413 // Default maximum number of function optimization attempts before we
414 // give up.
415 static const int kDefaultMaxOptCount = 10;
416
417 static const int kMaxInliningLevels = 3; 413 static const int kMaxInliningLevels = 3;
418 414
419 // Call count before primitive functions trigger their own optimization. 415 // Call count before primitive functions trigger their own optimization.
420 static const int kCallsUntilPrimitiveOpt = 200; 416 static const int kCallsUntilPrimitiveOpt = 200;
421 417
422 // All routines return a SharedFunctionInfo. 418 // All routines return a SharedFunctionInfo.
423 // If an error occurs an exception is raised and the return handle 419 // If an error occurs an exception is raised and the return handle
424 // contains NULL. 420 // contains NULL.
425 421
426 // Compile a String source within a context. 422 // Compile a String source within a context.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 461
466 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, 462 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag,
467 CompilationInfo* info, 463 CompilationInfo* info,
468 Handle<SharedFunctionInfo> shared); 464 Handle<SharedFunctionInfo> shared);
469 }; 465 };
470 466
471 467
472 } } // namespace v8::internal 468 } } // namespace v8::internal
473 469
474 #endif // V8_COMPILER_H_ 470 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698