| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 2603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2614 Utils::OpenHandle(this)->SetInternalField(index, *proxy); | 2614 Utils::OpenHandle(this)->SetInternalField(index, *proxy); |
| 2615 } | 2615 } |
| 2616 | 2616 |
| 2617 | 2617 |
| 2618 // --- E n v i r o n m e n t --- | 2618 // --- E n v i r o n m e n t --- |
| 2619 | 2619 |
| 2620 bool v8::V8::Initialize() { | 2620 bool v8::V8::Initialize() { |
| 2621 if (i::V8::IsRunning()) return true; | 2621 if (i::V8::IsRunning()) return true; |
| 2622 ENTER_V8; | 2622 ENTER_V8; |
| 2623 HandleScope scope; | 2623 HandleScope scope; |
| 2624 if (i::Snapshot::Initialize()) { | 2624 if (i::FLAG_new_snapshot) { |
| 2625 return true; | 2625 if (i::Snapshot::Initialize2()) return true; |
| 2626 } else { | 2626 } else { |
| 2627 return i::V8::Initialize(NULL); | 2627 if (i::Snapshot::Initialize()) return true; |
| 2628 } | 2628 } |
| 2629 return i::V8::Initialize(NULL); |
| 2629 } | 2630 } |
| 2630 | 2631 |
| 2631 | 2632 |
| 2632 bool v8::V8::Dispose() { | 2633 bool v8::V8::Dispose() { |
| 2633 i::V8::TearDown(); | 2634 i::V8::TearDown(); |
| 2634 return true; | 2635 return true; |
| 2635 } | 2636 } |
| 2636 | 2637 |
| 2637 | 2638 |
| 2638 HeapStatistics::HeapStatistics(): total_heap_size_(0), used_heap_size_(0) { } | 2639 HeapStatistics::HeapStatistics(): total_heap_size_(0), used_heap_size_(0) { } |
| (...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3842 | 3843 |
| 3843 | 3844 |
| 3844 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 3845 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 3845 HandleScopeImplementer* thread_local = | 3846 HandleScopeImplementer* thread_local = |
| 3846 reinterpret_cast<HandleScopeImplementer*>(storage); | 3847 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 3847 thread_local->IterateThis(v); | 3848 thread_local->IterateThis(v); |
| 3848 return storage + ArchiveSpacePerThread(); | 3849 return storage + ArchiveSpacePerThread(); |
| 3849 } | 3850 } |
| 3850 | 3851 |
| 3851 } } // namespace v8::internal | 3852 } } // namespace v8::internal |
| OLD | NEW |