OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/extensions/externalize-string-extension.h" | 10 #include "src/extensions/externalize-string-extension.h" |
(...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1445 | 1445 |
1446 // If we can't find the function in the cache, we compile a new | 1446 // If we can't find the function in the cache, we compile a new |
1447 // function and insert it into the cache. | 1447 // function and insert it into the cache. |
1448 if (cache == NULL || !cache->Lookup(name, &function_info)) { | 1448 if (cache == NULL || !cache->Lookup(name, &function_info)) { |
1449 DCHECK(source->IsOneByteRepresentation()); | 1449 DCHECK(source->IsOneByteRepresentation()); |
1450 Handle<String> script_name = | 1450 Handle<String> script_name = |
1451 factory->NewStringFromUtf8(name).ToHandleChecked(); | 1451 factory->NewStringFromUtf8(name).ToHandleChecked(); |
1452 function_info = Compiler::CompileScript( | 1452 function_info = Compiler::CompileScript( |
1453 source, script_name, 0, 0, false, false, top_context, extension, NULL, | 1453 source, script_name, 0, 0, false, false, top_context, extension, NULL, |
1454 ScriptCompiler::kNoCompileOptions, | 1454 ScriptCompiler::kNoCompileOptions, |
1455 use_runtime_context ? NATIVES_CODE : NOT_NATIVES_CODE); | 1455 use_runtime_context ? NATIVES_CODE : NOT_NATIVES_CODE, false); |
1456 if (function_info.is_null()) return false; | 1456 if (function_info.is_null()) return false; |
1457 if (cache != NULL) cache->Add(name, function_info); | 1457 if (cache != NULL) cache->Add(name, function_info); |
1458 } | 1458 } |
1459 | 1459 |
1460 // Set up the function context. Conceptually, we should clone the | 1460 // Set up the function context. Conceptually, we should clone the |
1461 // function before overwriting the context but since we're in a | 1461 // function before overwriting the context but since we're in a |
1462 // single-threaded environment it is not strictly necessary. | 1462 // single-threaded environment it is not strictly necessary. |
1463 DCHECK(top_context->IsNativeContext()); | 1463 DCHECK(top_context->IsNativeContext()); |
1464 Handle<Context> context = | 1464 Handle<Context> context = |
1465 Handle<Context>(use_runtime_context | 1465 Handle<Context>(use_runtime_context |
(...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2883 return from + sizeof(NestingCounterType); | 2883 return from + sizeof(NestingCounterType); |
2884 } | 2884 } |
2885 | 2885 |
2886 | 2886 |
2887 // Called when the top-level V8 mutex is destroyed. | 2887 // Called when the top-level V8 mutex is destroyed. |
2888 void Bootstrapper::FreeThreadResources() { | 2888 void Bootstrapper::FreeThreadResources() { |
2889 DCHECK(!IsActive()); | 2889 DCHECK(!IsActive()); |
2890 } | 2890 } |
2891 | 2891 |
2892 } } // namespace v8::internal | 2892 } } // namespace v8::internal |
OLD | NEW |