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 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1773 Release_Store(&debugger_initialized_, true); | 1773 Release_Store(&debugger_initialized_, true); |
1774 #endif | 1774 #endif |
1775 } | 1775 } |
1776 | 1776 |
1777 | 1777 |
1778 bool Isolate::Init(Deserializer* des) { | 1778 bool Isolate::Init(Deserializer* des) { |
1779 ASSERT(state_ != INITIALIZED); | 1779 ASSERT(state_ != INITIALIZED); |
1780 ASSERT(Isolate::Current() == this); | 1780 ASSERT(Isolate::Current() == this); |
1781 TRACE_ISOLATE(init); | 1781 TRACE_ISOLATE(init); |
1782 | 1782 |
1783 #ifdef DEBUG | |
1784 // The initialization process does not handle memory exhaustion. | 1783 // The initialization process does not handle memory exhaustion. |
1785 DisallowAllocationFailure disallow_allocation_failure; | 1784 DisallowAllocationFailure disallow_allocation_failure; |
1786 #endif | |
1787 | 1785 |
1788 InitializeLoggingAndCounters(); | 1786 InitializeLoggingAndCounters(); |
1789 | 1787 |
1790 InitializeDebugger(); | 1788 InitializeDebugger(); |
1791 | 1789 |
1792 memory_allocator_ = new MemoryAllocator(this); | 1790 memory_allocator_ = new MemoryAllocator(this); |
1793 code_range_ = new CodeRange(this); | 1791 code_range_ = new CodeRange(this); |
1794 | 1792 |
1795 // Safe after setting Heap::isolate_, initializing StackGuard and | 1793 // Safe after setting Heap::isolate_, initializing StackGuard and |
1796 // ensuring that Isolate::Current() == this. | 1794 // ensuring that Isolate::Current() == this. |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2034 | 2032 |
2035 #ifdef DEBUG | 2033 #ifdef DEBUG |
2036 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2034 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
2037 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2035 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
2038 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2036 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
2039 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2037 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
2040 #undef ISOLATE_FIELD_OFFSET | 2038 #undef ISOLATE_FIELD_OFFSET |
2041 #endif | 2039 #endif |
2042 | 2040 |
2043 } } // namespace v8::internal | 2041 } } // namespace v8::internal |
OLD | NEW |