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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 | 263 |
264 // Probe the script generation tables. Make sure not to leak handles | 264 // Probe the script generation tables. Make sure not to leak handles |
265 // into the caller's handle scope. | 265 // into the caller's handle scope. |
266 { HandleScope scope; | 266 { HandleScope scope; |
267 for (generation = 0; generation < generations(); generation++) { | 267 for (generation = 0; generation < generations(); generation++) { |
268 Handle<CompilationCacheTable> table = GetTable(generation); | 268 Handle<CompilationCacheTable> table = GetTable(generation); |
269 Handle<Object> probe(table->Lookup(*source)); | 269 Handle<Object> probe(table->Lookup(*source)); |
270 if (probe->IsSharedFunctionInfo()) { | 270 if (probe->IsSharedFunctionInfo()) { |
271 Handle<SharedFunctionInfo> function_info = | 271 Handle<SharedFunctionInfo> function_info = |
272 Handle<SharedFunctionInfo>::cast(probe); | 272 Handle<SharedFunctionInfo>::cast(probe); |
273 // Break when we've found a suitable boilerplate function that | 273 // Break when we've found a suitable shared function info that |
274 // matches the origin. | 274 // matches the origin. |
275 if (HasOrigin(function_info, name, line_offset, column_offset)) { | 275 if (HasOrigin(function_info, name, line_offset, column_offset)) { |
276 result = *function_info; | 276 result = *function_info; |
277 break; | 277 break; |
278 } | 278 } |
279 } | 279 } |
280 } | 280 } |
281 } | 281 } |
282 | 282 |
283 static void* script_histogram = StatsTable::CreateHistogram( | 283 static void* script_histogram = StatsTable::CreateHistogram( |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 } | 525 } |
526 | 526 |
527 | 527 |
528 void CompilationCache::Disable() { | 528 void CompilationCache::Disable() { |
529 enabled = false; | 529 enabled = false; |
530 Clear(); | 530 Clear(); |
531 } | 531 } |
532 | 532 |
533 | 533 |
534 } } // namespace v8::internal | 534 } } // namespace v8::internal |
OLD | NEW |