Chromium Code Reviews| Index: src/factory.cc |
| diff --git a/src/factory.cc b/src/factory.cc |
| index 6f86647ef5911348cda4fa55bb590e39d4334b27..b6f02a8db1e46646c4dce4ece2758161bdef18b5 100644 |
| --- a/src/factory.cc |
| +++ b/src/factory.cc |
| @@ -1393,12 +1393,18 @@ Handle<GlobalObject> Factory::NewGlobalObject(Handle<JSFunction> constructor) { |
| } |
| -Handle<JSObject> Factory::NewJSObjectFromMap(Handle<Map> map, |
| - PretenureFlag pretenure, |
| - bool alloc_props) { |
| +Handle<JSObject> Factory::NewJSObjectFromMap( |
| + Handle<Map> map, |
| + PretenureFlag pretenure, |
| + bool alloc_props, |
| + Handle<AllocationSite> allocation_site) { |
| CALL_HEAP_FUNCTION( |
| isolate(), |
| - isolate()->heap()->AllocateJSObjectFromMap(*map, pretenure, alloc_props), |
| + isolate()->heap()->AllocateJSObjectFromMap( |
| + *map, |
| + pretenure, |
| + alloc_props, |
| + allocation_site.is_null() ? NULL : *allocation_site), |
| JSObject); |
| } |
| @@ -1433,6 +1439,18 @@ Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArrayBase> elements, |
| } |
| +void Factory::AllocateJSArrayStorage(Handle<JSArray> array, |
|
Yang
2014/03/17 14:13:05
If a heap method is called AllocateX, we usually c
|
| + int length, |
| + int capacity, |
| + ArrayStorageAllocationMode mode) { |
| + CALL_HEAP_FUNCTION_VOID(isolate(), |
| + isolate()->heap()->AllocateJSArrayStorage(*array, |
| + length, |
| + capacity, |
| + mode)); |
| +} |
| + |
| + |
| void Factory::SetElementsCapacityAndLength(Handle<JSArray> array, |
| int capacity, |
| int length) { |