| 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 #ifndef V8_BOOTSTRAPPER_H_ | 5 #ifndef V8_BOOTSTRAPPER_H_ |
| 6 #define V8_BOOTSTRAPPER_H_ | 6 #define V8_BOOTSTRAPPER_H_ |
| 7 | 7 |
| 8 #include "src/factory.h" | 8 #include "src/factory.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 v8::Handle<v8::ObjectTemplate> global_object_template, | 80 v8::Handle<v8::ObjectTemplate> global_object_template, |
| 81 v8::ExtensionConfiguration* extensions); | 81 v8::ExtensionConfiguration* extensions); |
| 82 | 82 |
| 83 // Detach the environment from its outer global object. | 83 // Detach the environment from its outer global object. |
| 84 void DetachGlobal(Handle<Context> env); | 84 void DetachGlobal(Handle<Context> env); |
| 85 | 85 |
| 86 // Traverses the pointers for memory management. | 86 // Traverses the pointers for memory management. |
| 87 void Iterate(ObjectVisitor* v); | 87 void Iterate(ObjectVisitor* v); |
| 88 | 88 |
| 89 // Accessor for the native scripts source code. | 89 // Accessor for the native scripts source code. |
| 90 Handle<String> NativesSourceLookup(int index); | 90 template <class Source> |
| 91 Handle<String> SourceLookup(int index); |
| 91 | 92 |
| 92 // Tells whether bootstrapping is active. | 93 // Tells whether bootstrapping is active. |
| 93 bool IsActive() const { return nesting_ != 0; } | 94 bool IsActive() const { return nesting_ != 0; } |
| 94 | 95 |
| 95 // Support for thread preemption. | 96 // Support for thread preemption. |
| 96 static int ArchiveSpacePerThread(); | 97 static int ArchiveSpacePerThread(); |
| 97 char* ArchiveState(char* to); | 98 char* ArchiveState(char* to); |
| 98 char* RestoreState(char* from); | 99 char* RestoreState(char* from); |
| 99 void FreeThreadResources(); | 100 void FreeThreadResources(); |
| 100 | 101 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 size_t length() const override { return length_; } | 154 size_t length() const override { return length_; } |
| 154 | 155 |
| 155 private: | 156 private: |
| 156 const char* data_; | 157 const char* data_; |
| 157 size_t length_; | 158 size_t length_; |
| 158 }; | 159 }; |
| 159 | 160 |
| 160 }} // namespace v8::internal | 161 }} // namespace v8::internal |
| 161 | 162 |
| 162 #endif // V8_BOOTSTRAPPER_H_ | 163 #endif // V8_BOOTSTRAPPER_H_ |
| OLD | NEW |