| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 // Associate the (source, flags) pair to the given regexp data. | 73 // Associate the (source, flags) pair to the given regexp data. |
| 74 // This may overwrite an existing mapping. | 74 // This may overwrite an existing mapping. |
| 75 static void PutRegExp(Handle<String> source, | 75 static void PutRegExp(Handle<String> source, |
| 76 JSRegExp::Flags flags, | 76 JSRegExp::Flags flags, |
| 77 Handle<FixedArray> data); | 77 Handle<FixedArray> data); |
| 78 | 78 |
| 79 // Clear the cache - also used to initialize the cache at startup. | 79 // Clear the cache - also used to initialize the cache at startup. |
| 80 static void Clear(); | 80 static void Clear(); |
| 81 | 81 |
| 82 | |
| 83 static bool HasFunction(SharedFunctionInfo* function_info); | |
| 84 | |
| 85 // GC support. | 82 // GC support. |
| 86 static void Iterate(ObjectVisitor* v); | 83 static void Iterate(ObjectVisitor* v); |
| 84 static void IterateFunctions(ObjectVisitor* v); |
| 87 | 85 |
| 88 // Notify the cache that a mark-sweep garbage collection is about to | 86 // Notify the cache that a mark-sweep garbage collection is about to |
| 89 // take place. This is used to retire entries from the cache to | 87 // take place. This is used to retire entries from the cache to |
| 90 // avoid keeping them alive too long without using them. | 88 // avoid keeping them alive too long without using them. |
| 91 static void MarkCompactPrologue(); | 89 static void MarkCompactPrologue(); |
| 92 | 90 |
| 93 // Enable/disable compilation cache. Used by debugger to disable compilation | 91 // Enable/disable compilation cache. Used by debugger to disable compilation |
| 94 // cache during debugging to make sure new scripts are always compiled. | 92 // cache during debugging to make sure new scripts are always compiled. |
| 95 static void Enable(); | 93 static void Enable(); |
| 96 static void Disable(); | 94 static void Disable(); |
| 97 }; | 95 }; |
| 98 | 96 |
| 99 | 97 |
| 100 } } // namespace v8::internal | 98 } } // namespace v8::internal |
| 101 | 99 |
| 102 #endif // V8_COMPILATION_CACHE_H_ | 100 #endif // V8_COMPILATION_CACHE_H_ |
| OLD | NEW |