OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
8 #include "src/compilation-cache.h" | 8 #include "src/compilation-cache.h" |
9 #include "src/serialize.h" | 9 #include "src/serialize.h" |
10 | 10 |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 } else { | 337 } else { |
338 DCHECK(scope_position != RelocInfo::kNoPosition); | 338 DCHECK(scope_position != RelocInfo::kNoPosition); |
339 result = eval_contextual_.Lookup( | 339 result = eval_contextual_.Lookup( |
340 source, context, strict_mode, scope_position); | 340 source, context, strict_mode, scope_position); |
341 } | 341 } |
342 return result; | 342 return result; |
343 } | 343 } |
344 | 344 |
345 | 345 |
346 MaybeHandle<FixedArray> CompilationCache::LookupRegExp(Handle<String> source, | 346 MaybeHandle<FixedArray> CompilationCache::LookupRegExp(Handle<String> source, |
347 JSRegExp::Flags flags) { | 347 JSRegExp::Flags flags) { |
348 if (!IsEnabled()) return MaybeHandle<FixedArray>(); | 348 if (!IsEnabled()) return MaybeHandle<FixedArray>(); |
349 | 349 |
350 return reg_exp_.Lookup(source, flags); | 350 return reg_exp_.Lookup(source, flags); |
351 } | 351 } |
352 | 352 |
353 | 353 |
354 void CompilationCache::PutScript(Handle<String> source, | 354 void CompilationCache::PutScript(Handle<String> source, |
355 Handle<Context> context, | 355 Handle<Context> context, |
356 Handle<SharedFunctionInfo> function_info) { | 356 Handle<SharedFunctionInfo> function_info) { |
357 if (!IsEnabled()) return; | 357 if (!IsEnabled()) return; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 } | 421 } |
422 | 422 |
423 | 423 |
424 void CompilationCache::Disable() { | 424 void CompilationCache::Disable() { |
425 enabled_ = false; | 425 enabled_ = false; |
426 Clear(); | 426 Clear(); |
427 } | 427 } |
428 | 428 |
429 | 429 |
430 } } // namespace v8::internal | 430 } } // namespace v8::internal |
OLD | NEW |