OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_COMPILATION_CACHE_H_ | 5 #ifndef V8_COMPILATION_CACHE_H_ |
6 #define V8_COMPILATION_CACHE_H_ | 6 #define V8_COMPILATION_CACHE_H_ |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 Handle<Context> context, | 82 Handle<Context> context, |
83 Handle<SharedFunctionInfo> function_info); | 83 Handle<SharedFunctionInfo> function_info); |
84 | 84 |
85 private: | 85 private: |
86 bool HasOrigin(Handle<SharedFunctionInfo> function_info, | 86 bool HasOrigin(Handle<SharedFunctionInfo> function_info, |
87 Handle<Object> name, | 87 Handle<Object> name, |
88 int line_offset, | 88 int line_offset, |
89 int column_offset, | 89 int column_offset, |
90 bool is_shared_cross_origin); | 90 bool is_shared_cross_origin); |
91 | 91 |
92 void* script_histogram_; | |
93 bool script_histogram_initialized_; | |
94 | |
95 DISALLOW_IMPLICIT_CONSTRUCTORS(CompilationCacheScript); | 92 DISALLOW_IMPLICIT_CONSTRUCTORS(CompilationCacheScript); |
96 }; | 93 }; |
97 | 94 |
98 | 95 |
99 // Sub-cache for eval scripts. Two caches for eval are used. One for eval calls | 96 // Sub-cache for eval scripts. Two caches for eval are used. One for eval calls |
100 // in native contexts and one for eval calls in other contexts. The cache | 97 // in native contexts and one for eval calls in other contexts. The cache |
101 // considers the following pieces of information when checking for matching | 98 // considers the following pieces of information when checking for matching |
102 // entries: | 99 // entries: |
103 // 1. The source string. | 100 // 1. The source string. |
104 // 2. The shared function info of the calling function. | 101 // 2. The shared function info of the calling function. |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 228 |
232 friend class Isolate; | 229 friend class Isolate; |
233 | 230 |
234 DISALLOW_COPY_AND_ASSIGN(CompilationCache); | 231 DISALLOW_COPY_AND_ASSIGN(CompilationCache); |
235 }; | 232 }; |
236 | 233 |
237 | 234 |
238 } } // namespace v8::internal | 235 } } // namespace v8::internal |
239 | 236 |
240 #endif // V8_COMPILATION_CACHE_H_ | 237 #endif // V8_COMPILATION_CACHE_H_ |
OLD | NEW |