Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: src/heap/heap.cc

Issue 2950993002: Make some functions that are hit during renderer startup available for inlining (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <unordered_map> 7 #include <unordered_map>
8 #include <unordered_set> 8 #include <unordered_set>
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 3994 matching lines...) Expand 10 before | Expand all | Expand 10 after
4005 } 4005 }
4006 4006
4007 result->set_map_after_allocation(fixed_array_map(), SKIP_WRITE_BARRIER); 4007 result->set_map_after_allocation(fixed_array_map(), SKIP_WRITE_BARRIER);
4008 FixedArray* array = FixedArray::cast(result); 4008 FixedArray* array = FixedArray::cast(result);
4009 array->set_length(length); 4009 array->set_length(length);
4010 MemsetPointer(array->data_start(), filler, length); 4010 MemsetPointer(array->data_start(), filler, length);
4011 return array; 4011 return array;
4012 } 4012 }
4013 4013
4014 4014
4015 AllocationResult Heap::AllocateFixedArray(int length, PretenureFlag pretenure) {
4016 return AllocateFixedArrayWithFiller(length, pretenure, undefined_value());
4017 }
4018
4019
4020 AllocationResult Heap::AllocateUninitializedFixedArray(int length) { 4015 AllocationResult Heap::AllocateUninitializedFixedArray(int length) {
4021 if (length == 0) return empty_fixed_array(); 4016 if (length == 0) return empty_fixed_array();
4022 4017
4023 HeapObject* obj = nullptr; 4018 HeapObject* obj = nullptr;
4024 { 4019 {
4025 AllocationResult allocation = AllocateRawFixedArray(length, NOT_TENURED); 4020 AllocationResult allocation = AllocateRawFixedArray(length, NOT_TENURED);
4026 if (!allocation.To(&obj)) return allocation; 4021 if (!allocation.To(&obj)) return allocation;
4027 } 4022 }
4028 4023
4029 obj->set_map_after_allocation(fixed_array_map(), SKIP_WRITE_BARRIER); 4024 obj->set_map_after_allocation(fixed_array_map(), SKIP_WRITE_BARRIER);
(...skipping 2674 matching lines...) Expand 10 before | Expand all | Expand 10 after
6704 return dst == src && type == CODE_TYPE; 6699 return dst == src && type == CODE_TYPE;
6705 case MAP_SPACE: 6700 case MAP_SPACE:
6706 case LO_SPACE: 6701 case LO_SPACE:
6707 return false; 6702 return false;
6708 } 6703 }
6709 UNREACHABLE(); 6704 UNREACHABLE();
6710 } 6705 }
6711 6706
6712 } // namespace internal 6707 } // namespace internal
6713 } // namespace v8 6708 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/heap-inl.h » ('j') | src/interpreter/bytecodes.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698