| 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 215                                           int line_offset, | 215                                           int line_offset, | 
| 216                                           int column_offset, | 216                                           int column_offset, | 
| 217                                           bool is_shared_cross_origin, | 217                                           bool is_shared_cross_origin, | 
| 218                                           Handle<Context> context); | 218                                           Handle<Context> context); | 
| 219 | 219 | 
| 220   // Finds the shared function info for a source string for eval in a | 220   // Finds the shared function info for a source string for eval in a | 
| 221   // given context.  Returns an empty handle if the cache doesn't | 221   // given context.  Returns an empty handle if the cache doesn't | 
| 222   // contain a script for the given source string. | 222   // contain a script for the given source string. | 
| 223   Handle<SharedFunctionInfo> LookupEval(Handle<String> source, | 223   Handle<SharedFunctionInfo> LookupEval(Handle<String> source, | 
| 224                                         Handle<Context> context, | 224                                         Handle<Context> context, | 
| 225                                         bool is_global, |  | 
| 226                                         LanguageMode language_mode, | 225                                         LanguageMode language_mode, | 
| 227                                         int scope_position); | 226                                         int scope_position); | 
| 228 | 227 | 
| 229   // Returns the regexp data associated with the given regexp if it | 228   // Returns the regexp data associated with the given regexp if it | 
| 230   // is in cache, otherwise an empty handle. | 229   // is in cache, otherwise an empty handle. | 
| 231   Handle<FixedArray> LookupRegExp(Handle<String> source, | 230   Handle<FixedArray> LookupRegExp(Handle<String> source, | 
| 232                                   JSRegExp::Flags flags); | 231                                   JSRegExp::Flags flags); | 
| 233 | 232 | 
| 234   // Associate the (source, kind) pair to the shared function | 233   // Associate the (source, kind) pair to the shared function | 
| 235   // info. This may overwrite an existing mapping. | 234   // info. This may overwrite an existing mapping. | 
| 236   void PutScript(Handle<String> source, | 235   void PutScript(Handle<String> source, | 
| 237                  Handle<Context> context, | 236                  Handle<Context> context, | 
| 238                  Handle<SharedFunctionInfo> function_info); | 237                  Handle<SharedFunctionInfo> function_info); | 
| 239 | 238 | 
| 240   // Associate the (source, context->closure()->shared(), kind) triple | 239   // Associate the (source, context->closure()->shared(), kind) triple | 
| 241   // with the shared function info. This may overwrite an existing mapping. | 240   // with the shared function info. This may overwrite an existing mapping. | 
| 242   void PutEval(Handle<String> source, | 241   void PutEval(Handle<String> source, | 
| 243                Handle<Context> context, | 242                Handle<Context> context, | 
| 244                bool is_global, |  | 
| 245                Handle<SharedFunctionInfo> function_info, | 243                Handle<SharedFunctionInfo> function_info, | 
| 246                int scope_position); | 244                int scope_position); | 
| 247 | 245 | 
| 248   // Associate the (source, flags) pair to the given regexp data. | 246   // Associate the (source, flags) pair to the given regexp data. | 
| 249   // This may overwrite an existing mapping. | 247   // This may overwrite an existing mapping. | 
| 250   void PutRegExp(Handle<String> source, | 248   void PutRegExp(Handle<String> source, | 
| 251                  JSRegExp::Flags flags, | 249                  JSRegExp::Flags flags, | 
| 252                  Handle<FixedArray> data); | 250                  Handle<FixedArray> data); | 
| 253 | 251 | 
| 254   // Clear the cache - also used to initialize the cache at startup. | 252   // Clear the cache - also used to initialize the cache at startup. | 
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 297 | 295 | 
| 298   friend class Isolate; | 296   friend class Isolate; | 
| 299 | 297 | 
| 300   DISALLOW_COPY_AND_ASSIGN(CompilationCache); | 298   DISALLOW_COPY_AND_ASSIGN(CompilationCache); | 
| 301 }; | 299 }; | 
| 302 | 300 | 
| 303 | 301 | 
| 304 } }  // namespace v8::internal | 302 } }  // namespace v8::internal | 
| 305 | 303 | 
| 306 #endif  // V8_COMPILATION_CACHE_H_ | 304 #endif  // V8_COMPILATION_CACHE_H_ | 
| OLD | NEW | 
|---|