Chromium Code Reviews

Unified Diff: src/factory.cc

Issue 200213003: Handlification of ArrayConstructorCommon(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review comments. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « src/factory.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 6f86647ef5911348cda4fa55bb590e39d4334b27..bc1e7b28b07441fafa657deeabfa186b50aa8fca 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::NewJSArrayStorage(Handle<JSArray> array,
+ 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) {
« no previous file with comments | « src/factory.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine