OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 2673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2684 | 2684 |
2685 Handle<JSObject> listeners = factory->NewNeanderObject(); | 2685 Handle<JSObject> listeners = factory->NewNeanderObject(); |
2686 Handle<FixedArray> elements = factory->NewFixedArray(2); | 2686 Handle<FixedArray> elements = factory->NewFixedArray(2); |
2687 elements->set(0, Smi::FromInt(0)); | 2687 elements->set(0, Smi::FromInt(0)); |
2688 listeners->set_elements(*elements); | 2688 listeners->set_elements(*elements); |
2689 set_message_listeners(*listeners); | 2689 set_message_listeners(*listeners); |
2690 } | 2690 } |
2691 | 2691 |
2692 | 2692 |
2693 void Heap::CreateJSEntryStub() { | 2693 void Heap::CreateJSEntryStub() { |
2694 JSEntryStub stub(isolate()); | 2694 JSEntryStub stub(isolate(), StackFrame::ENTRY); |
2695 set_js_entry_code(*stub.GetCode()); | 2695 set_js_entry_code(*stub.GetCode()); |
2696 } | 2696 } |
2697 | 2697 |
2698 | 2698 |
2699 void Heap::CreateJSConstructEntryStub() { | 2699 void Heap::CreateJSConstructEntryStub() { |
2700 JSConstructEntryStub stub(isolate()); | 2700 JSEntryStub stub(isolate(), StackFrame::ENTRY_CONSTRUCT); |
2701 set_js_construct_entry_code(*stub.GetCode()); | 2701 set_js_construct_entry_code(*stub.GetCode()); |
2702 } | 2702 } |
2703 | 2703 |
2704 | 2704 |
2705 void Heap::CreateFixedStubs() { | 2705 void Heap::CreateFixedStubs() { |
2706 // Here we create roots for fixed stubs. They are needed at GC | 2706 // Here we create roots for fixed stubs. They are needed at GC |
2707 // for cooking and uncooking (check out frames.cc). | 2707 // for cooking and uncooking (check out frames.cc). |
2708 // The eliminates the need for doing dictionary lookup in the | 2708 // The eliminates the need for doing dictionary lookup in the |
2709 // stub cache for these stubs. | 2709 // stub cache for these stubs. |
2710 HandleScope scope(isolate()); | 2710 HandleScope scope(isolate()); |
(...skipping 3412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6123 static_cast<int>(object_sizes_last_time_[index])); | 6123 static_cast<int>(object_sizes_last_time_[index])); |
6124 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6124 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6125 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6125 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6126 | 6126 |
6127 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6127 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6128 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6128 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6129 ClearObjectStats(); | 6129 ClearObjectStats(); |
6130 } | 6130 } |
6131 } | 6131 } |
6132 } // namespace v8::internal | 6132 } // namespace v8::internal |
OLD | NEW |