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 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1359 | 1359 |
1360 | 1360 |
1361 bool Genesis::CompileExperimentalBuiltin(Isolate* isolate, int index) { | 1361 bool Genesis::CompileExperimentalBuiltin(Isolate* isolate, int index) { |
1362 Vector<const char> name = ExperimentalNatives::GetScriptName(index); | 1362 Vector<const char> name = ExperimentalNatives::GetScriptName(index); |
1363 Factory* factory = isolate->factory(); | 1363 Factory* factory = isolate->factory(); |
1364 Handle<String> source_code; | 1364 Handle<String> source_code; |
1365 ASSIGN_RETURN_ON_EXCEPTION_VALUE( | 1365 ASSIGN_RETURN_ON_EXCEPTION_VALUE( |
1366 isolate, source_code, | 1366 isolate, source_code, |
1367 factory->NewStringFromAscii(ExperimentalNatives::GetScriptSource(index)), | 1367 factory->NewStringFromAscii(ExperimentalNatives::GetScriptSource(index)), |
1368 false); | 1368 false); |
1369 return CompileNative(isolate, name, source_code); | 1369 |
| 1370 // TODO(rossberg): The natives do not yet obey strong mode rules |
| 1371 // (for example, some macros use '=='). |
| 1372 bool use_strong = FLAG_use_strong; |
| 1373 FLAG_use_strong = false; |
| 1374 bool result = CompileNative(isolate, name, source_code); |
| 1375 FLAG_use_strong = use_strong; |
| 1376 return result; |
1370 } | 1377 } |
1371 | 1378 |
1372 | 1379 |
1373 bool Genesis::CompileNative(Isolate* isolate, | 1380 bool Genesis::CompileNative(Isolate* isolate, |
1374 Vector<const char> name, | 1381 Vector<const char> name, |
1375 Handle<String> source) { | 1382 Handle<String> source) { |
1376 HandleScope scope(isolate); | 1383 HandleScope scope(isolate); |
1377 SuppressDebug compiling_natives(isolate->debug()); | 1384 SuppressDebug compiling_natives(isolate->debug()); |
1378 // During genesis, the boilerplate for stack overflow won't work until the | 1385 // During genesis, the boilerplate for stack overflow won't work until the |
1379 // environment has been at least partially initialized. Add a stack check | 1386 // environment has been at least partially initialized. Add a stack check |
(...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2859 return from + sizeof(NestingCounterType); | 2866 return from + sizeof(NestingCounterType); |
2860 } | 2867 } |
2861 | 2868 |
2862 | 2869 |
2863 // Called when the top-level V8 mutex is destroyed. | 2870 // Called when the top-level V8 mutex is destroyed. |
2864 void Bootstrapper::FreeThreadResources() { | 2871 void Bootstrapper::FreeThreadResources() { |
2865 DCHECK(!IsActive()); | 2872 DCHECK(!IsActive()); |
2866 } | 2873 } |
2867 | 2874 |
2868 } } // namespace v8::internal | 2875 } } // namespace v8::internal |
OLD | NEW |