| 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/heap/heap.h" | 5 #include "src/heap/heap.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/ast/context-slot-cache.h" | 9 #include "src/ast/context-slot-cache.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 2519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2530 set_encountered_transition_arrays(array); | 2530 set_encountered_transition_arrays(array); |
| 2531 } else { | 2531 } else { |
| 2532 array->set_next_link(undefined_value(), SKIP_WRITE_BARRIER); | 2532 array->set_next_link(undefined_value(), SKIP_WRITE_BARRIER); |
| 2533 } | 2533 } |
| 2534 return array; | 2534 return array; |
| 2535 } | 2535 } |
| 2536 | 2536 |
| 2537 | 2537 |
| 2538 void Heap::CreateApiObjects() { | 2538 void Heap::CreateApiObjects() { |
| 2539 HandleScope scope(isolate()); | 2539 HandleScope scope(isolate()); |
| 2540 Factory* factory = isolate()->factory(); | |
| 2541 Handle<Map> new_neander_map = | |
| 2542 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); | |
| 2543 | |
| 2544 // Don't use Smi-only elements optimizations for objects with the neander | |
| 2545 // map. There are too many cases where element values are set directly with a | |
| 2546 // bottleneck to trap the Smi-only -> fast elements transition, and there | |
| 2547 // appears to be no benefit for optimize this case. | |
| 2548 new_neander_map->set_elements_kind(TERMINAL_FAST_ELEMENTS_KIND); | |
| 2549 set_neander_map(*new_neander_map); | |
| 2550 set_message_listeners(*TemplateList::New(isolate(), 2)); | 2540 set_message_listeners(*TemplateList::New(isolate(), 2)); |
| 2551 } | 2541 } |
| 2552 | 2542 |
| 2553 | 2543 |
| 2554 void Heap::CreateJSEntryStub() { | 2544 void Heap::CreateJSEntryStub() { |
| 2555 JSEntryStub stub(isolate(), StackFrame::ENTRY); | 2545 JSEntryStub stub(isolate(), StackFrame::ENTRY); |
| 2556 set_js_entry_code(*stub.GetCode()); | 2546 set_js_entry_code(*stub.GetCode()); |
| 2557 } | 2547 } |
| 2558 | 2548 |
| 2559 | 2549 |
| (...skipping 3936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6496 } | 6486 } |
| 6497 | 6487 |
| 6498 | 6488 |
| 6499 // static | 6489 // static |
| 6500 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6490 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6501 return StaticVisitorBase::GetVisitorId(map); | 6491 return StaticVisitorBase::GetVisitorId(map); |
| 6502 } | 6492 } |
| 6503 | 6493 |
| 6504 } // namespace internal | 6494 } // namespace internal |
| 6505 } // namespace v8 | 6495 } // namespace v8 |
| OLD | NEW |