OLD | NEW |
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 int column_offset); | 115 int column_offset); |
116 | 116 |
117 void* script_histogram_; | 117 void* script_histogram_; |
118 bool script_histogram_initialized_; | 118 bool script_histogram_initialized_; |
119 | 119 |
120 DISALLOW_IMPLICIT_CONSTRUCTORS(CompilationCacheScript); | 120 DISALLOW_IMPLICIT_CONSTRUCTORS(CompilationCacheScript); |
121 }; | 121 }; |
122 | 122 |
123 | 123 |
124 // Sub-cache for eval scripts. Two caches for eval are used. One for eval calls | 124 // Sub-cache for eval scripts. Two caches for eval are used. One for eval calls |
125 // in global contexts and one for eval calls in other contexts. The cache | 125 // in native contexts and one for eval calls in other contexts. The cache |
126 // considers the following pieces of information when checking for matching | 126 // considers the following pieces of information when checking for matching |
127 // entries: | 127 // entries: |
128 // 1. The source string. | 128 // 1. The source string. |
129 // 2. The shared function info of the calling function. | 129 // 2. The shared function info of the calling function. |
130 // 3. Whether the source should be compiled as strict code or as non-strict | 130 // 3. Whether the source should be compiled as strict code or as non-strict |
131 // code. | 131 // code. |
132 // Note: Currently there are clients of CompileEval that always compile | 132 // Note: Currently there are clients of CompileEval that always compile |
133 // non-strict code even if the calling function is a strict mode function. | 133 // non-strict code even if the calling function is a strict mode function. |
134 // More specifically these are the CompileString, DebugEvaluate and | 134 // More specifically these are the CompileString, DebugEvaluate and |
135 // DebugEvaluateGlobal runtime functions. | 135 // DebugEvaluateGlobal runtime functions. |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 | 285 |
286 friend class Isolate; | 286 friend class Isolate; |
287 | 287 |
288 DISALLOW_COPY_AND_ASSIGN(CompilationCache); | 288 DISALLOW_COPY_AND_ASSIGN(CompilationCache); |
289 }; | 289 }; |
290 | 290 |
291 | 291 |
292 } } // namespace v8::internal | 292 } } // namespace v8::internal |
293 | 293 |
294 #endif // V8_COMPILATION_CACHE_H_ | 294 #endif // V8_COMPILATION_CACHE_H_ |
OLD | NEW |