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

Unified Diff: src/factory.cc

Issue 10209027: Implement tracking and optimizations of packed arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: New upload Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/factory.h ('k') | src/flag-definitions.h » ('j') | src/objects.cc » ('J')
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 6bb7893746d794b7654e1fb7dfd85aaf8f9fe569..bd2b26f9130e16f8f1acf5415a9cf3966024dfcb 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -775,7 +775,7 @@ Handle<JSFunction> Factory::NewFunctionWithPrototype(Handle<String> name,
instance_size != JSObject::kHeaderSize) {
Handle<Map> initial_map = NewMap(type,
instance_size,
- FAST_SMI_ONLY_ELEMENTS);
+ INITIAL_FAST_ELEMENTS_KIND);
function->set_initial_map(*initial_map);
initial_map->set_constructor(*function);
}
@@ -986,9 +986,10 @@ Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArrayBase> elements,
}
-void Factory::SetElementsCapacityAndLength(Handle<JSArray> array,
- int capacity,
- int length) {
+void Factory::SetElementsCapacityAndLength(
+ Handle<JSArray> array,
+ int capacity,
+ int length) {
ElementsAccessor* accessor = array->GetElementsAccessor();
CALL_HEAP_FUNCTION_VOID(
isolate(),
@@ -1013,10 +1014,11 @@ void Factory::EnsureCanContainHeapObjectElements(Handle<JSArray> array) {
void Factory::EnsureCanContainElements(Handle<JSArray> array,
Handle<FixedArrayBase> elements,
+ uint32_t length,
EnsureElementsMode mode) {
CALL_HEAP_FUNCTION_VOID(
isolate(),
- array->EnsureCanContainElements(*elements, mode));
+ array->EnsureCanContainElements(*elements, length, mode));
}
« no previous file with comments | « src/factory.h ('k') | src/flag-definitions.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698