| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 #include "assembler.h" | 30 #include "assembler.h" |
| 31 #include "compilation-cache.h" | 31 #include "compilation-cache.h" |
| 32 #include "serialize.h" | 32 #include "serialize.h" |
| 33 | 33 |
| 34 namespace v8 { | 34 namespace v8 { |
| 35 namespace internal { | 35 namespace internal { |
| 36 | 36 |
| 37 | 37 |
| 38 // The number of generations for each sub cache. | 38 // The number of generations for each sub cache. |
| 39 // The number of ScriptGenerations is carefully chosen based on histograms. | 39 // The number of ScriptGenerations is carefuly chosen based on histograms. |
| 40 // See issue 458: http://code.google.com/p/v8/issues/detail?id=458 | 40 // See issue 458: http://code.google.com/p/v8/issues/detail?id=458 |
| 41 static const int kScriptGenerations = 5; | 41 static const int kScriptGenerations = 5; |
| 42 static const int kEvalGlobalGenerations = 2; | 42 static const int kEvalGlobalGenerations = 2; |
| 43 static const int kEvalContextualGenerations = 2; | 43 static const int kEvalContextualGenerations = 2; |
| 44 static const int kRegExpGenerations = 2; | 44 static const int kRegExpGenerations = 2; |
| 45 | 45 |
| 46 // Initial size of each compilation cache table allocated. | 46 // Initial size of each compilation cache table allocated. |
| 47 static const int kInitialCacheSize = 64; | 47 static const int kInitialCacheSize = 64; |
| 48 | 48 |
| 49 | 49 |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 } | 507 } |
| 508 | 508 |
| 509 | 509 |
| 510 void CompilationCache::Disable() { | 510 void CompilationCache::Disable() { |
| 511 enabled_ = false; | 511 enabled_ = false; |
| 512 Clear(); | 512 Clear(); |
| 513 } | 513 } |
| 514 | 514 |
| 515 | 515 |
| 516 } } // namespace v8::internal | 516 } } // namespace v8::internal |
| OLD | NEW |