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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 Entry entry); | 63 Entry entry); |
64 | 64 |
65 // Returns the regexp data associated with the given regexp if it | 65 // Returns the regexp data associated with the given regexp if it |
66 // is in cache, otherwise an empty handle. | 66 // is in cache, otherwise an empty handle. |
67 static Handle<FixedArray> LookupRegExp(Handle<String> source, | 67 static Handle<FixedArray> LookupRegExp(Handle<String> source, |
68 JSRegExp::Flags flags); | 68 JSRegExp::Flags flags); |
69 | 69 |
70 // Associate the (source, kind) pair to the boilerplate. This may | 70 // Associate the (source, kind) pair to the boilerplate. This may |
71 // overwrite an existing mapping. | 71 // overwrite an existing mapping. |
72 static void PutScript(Handle<String> source, | 72 static void PutScript(Handle<String> source, |
73 Entry entry, | |
74 Handle<JSFunction> boilerplate); | 73 Handle<JSFunction> boilerplate); |
75 | 74 |
76 // Associate the (source, context->closure()->shared(), kind) triple | 75 // Associate the (source, context->closure()->shared(), kind) triple |
77 // with the boilerplate. This may overwrite an existing mapping. | 76 // with the boilerplate. This may overwrite an existing mapping. |
78 static void PutEval(Handle<String> source, | 77 static void PutEval(Handle<String> source, |
79 Handle<Context> context, | 78 Handle<Context> context, |
80 Entry entry, | 79 Entry entry, |
81 Handle<JSFunction> boilerplate); | 80 Handle<JSFunction> boilerplate); |
82 | 81 |
83 // Associate the (source, flags) pair to the given regexp data. | 82 // Associate the (source, flags) pair to the given regexp data. |
(...skipping 13 matching lines...) Expand all Loading... |
97 // avoid keeping them alive too long without using them. For now, we | 96 // avoid keeping them alive too long without using them. For now, we |
98 // just clear the cache but we should consider are more | 97 // just clear the cache but we should consider are more |
99 // sophisticated LRU scheme. | 98 // sophisticated LRU scheme. |
100 static void MarkCompactPrologue() { Clear(); } | 99 static void MarkCompactPrologue() { Clear(); } |
101 }; | 100 }; |
102 | 101 |
103 | 102 |
104 } } // namespace v8::internal | 103 } } // namespace v8::internal |
105 | 104 |
106 #endif // V8_COMPILATION_CACHE_H_ | 105 #endif // V8_COMPILATION_CACHE_H_ |
OLD | NEW |