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 "bootstrapper.h" | 5 #include "bootstrapper.h" |
6 | 6 |
7 #include "accessors.h" | 7 #include "accessors.h" |
8 #include "isolate-inl.h" | 8 #include "isolate-inl.h" |
9 #include "natives.h" | 9 #include "natives.h" |
10 #include "snapshot.h" | 10 #include "snapshot.h" |
(...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1474 ExperimentalNatives::GetRawScriptSource(index)), | 1474 ExperimentalNatives::GetRawScriptSource(index)), |
1475 false); | 1475 false); |
1476 return CompileNative(isolate, name, source_code); | 1476 return CompileNative(isolate, name, source_code); |
1477 } | 1477 } |
1478 | 1478 |
1479 | 1479 |
1480 bool Genesis::CompileNative(Isolate* isolate, | 1480 bool Genesis::CompileNative(Isolate* isolate, |
1481 Vector<const char> name, | 1481 Vector<const char> name, |
1482 Handle<String> source) { | 1482 Handle<String> source) { |
1483 HandleScope scope(isolate); | 1483 HandleScope scope(isolate); |
1484 Debugger::IgnoreScope compiling_natives(isolate->debugger()); | 1484 Debug::IgnoreScope compiling_natives(isolate->debug()); |
1485 // During genesis, the boilerplate for stack overflow won't work until the | 1485 // During genesis, the boilerplate for stack overflow won't work until the |
1486 // environment has been at least partially initialized. Add a stack check | 1486 // environment has been at least partially initialized. Add a stack check |
1487 // before entering JS code to catch overflow early. | 1487 // before entering JS code to catch overflow early. |
1488 StackLimitCheck check(isolate); | 1488 StackLimitCheck check(isolate); |
1489 if (check.HasOverflowed()) return false; | 1489 if (check.HasOverflowed()) return false; |
1490 | 1490 |
1491 bool result = CompileScriptCached(isolate, | 1491 bool result = CompileScriptCached(isolate, |
1492 name, | 1492 name, |
1493 source, | 1493 source, |
1494 NULL, | 1494 NULL, |
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2705 return from + sizeof(NestingCounterType); | 2705 return from + sizeof(NestingCounterType); |
2706 } | 2706 } |
2707 | 2707 |
2708 | 2708 |
2709 // Called when the top-level V8 mutex is destroyed. | 2709 // Called when the top-level V8 mutex is destroyed. |
2710 void Bootstrapper::FreeThreadResources() { | 2710 void Bootstrapper::FreeThreadResources() { |
2711 ASSERT(!IsActive()); | 2711 ASSERT(!IsActive()); |
2712 } | 2712 } |
2713 | 2713 |
2714 } } // namespace v8::internal | 2714 } } // namespace v8::internal |
OLD | NEW |