| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 class Genesis BASE_EMBEDDED { | 142 class Genesis BASE_EMBEDDED { |
| 143 public: | 143 public: |
| 144 Genesis(Isolate* isolate, | 144 Genesis(Isolate* isolate, |
| 145 Handle<Object> global_object, | 145 Handle<Object> global_object, |
| 146 v8::Handle<v8::ObjectTemplate> global_template, | 146 v8::Handle<v8::ObjectTemplate> global_template, |
| 147 v8::ExtensionConfiguration* extensions); | 147 v8::ExtensionConfiguration* extensions); |
| 148 ~Genesis() { } | 148 ~Genesis() { } |
| 149 | 149 |
| 150 Handle<Context> result() { return result_; } | 150 Handle<Context> result() { return result_; } |
| 151 | 151 |
| 152 Genesis* previous() { return previous_; } | |
| 153 | |
| 154 Isolate* isolate() const { return isolate_; } | 152 Isolate* isolate() const { return isolate_; } |
| 155 Factory* factory() const { return isolate_->factory(); } | 153 Factory* factory() const { return isolate_->factory(); } |
| 156 Heap* heap() const { return isolate_->heap(); } | 154 Heap* heap() const { return isolate_->heap(); } |
| 157 | 155 |
| 158 private: | 156 private: |
| 159 Handle<Context> native_context_; | 157 Handle<Context> native_context_; |
| 160 Isolate* isolate_; | 158 Isolate* isolate_; |
| 161 | 159 |
| 162 // There may be more than one active genesis object: When GC is | |
| 163 // triggered during environment creation there may be weak handle | |
| 164 // processing callbacks which may create new environments. | |
| 165 Genesis* previous_; | |
| 166 | |
| 167 Handle<Context> native_context() { return native_context_; } | 160 Handle<Context> native_context() { return native_context_; } |
| 168 | 161 |
| 169 // Creates some basic objects. Used for creating a context from scratch. | 162 // Creates some basic objects. Used for creating a context from scratch. |
| 170 void CreateRoots(); | 163 void CreateRoots(); |
| 171 // Creates the empty function. Used for creating a context from scratch. | 164 // Creates the empty function. Used for creating a context from scratch. |
| 172 Handle<JSFunction> CreateEmptyFunction(Isolate* isolate); | 165 Handle<JSFunction> CreateEmptyFunction(Isolate* isolate); |
| 173 // Creates the ThrowTypeError function. ECMA 5th Ed. 13.2.3 | 166 // Creates the ThrowTypeError function. ECMA 5th Ed. 13.2.3 |
| 174 Handle<JSFunction> GetThrowTypeErrorFunction(); | 167 Handle<JSFunction> GetThrowTypeErrorFunction(); |
| 175 | 168 |
| 176 void CreateStrictModeFunctionMaps(Handle<JSFunction> empty); | 169 void CreateStrictModeFunctionMaps(Handle<JSFunction> empty); |
| (...skipping 2323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2500 return from + sizeof(NestingCounterType); | 2493 return from + sizeof(NestingCounterType); |
| 2501 } | 2494 } |
| 2502 | 2495 |
| 2503 | 2496 |
| 2504 // Called when the top-level V8 mutex is destroyed. | 2497 // Called when the top-level V8 mutex is destroyed. |
| 2505 void Bootstrapper::FreeThreadResources() { | 2498 void Bootstrapper::FreeThreadResources() { |
| 2506 ASSERT(!IsActive()); | 2499 ASSERT(!IsActive()); |
| 2507 } | 2500 } |
| 2508 | 2501 |
| 2509 } } // namespace v8::internal | 2502 } } // namespace v8::internal |
| OLD | NEW |