Index: bleeding_edge/src/factory.cc |
=================================================================== |
--- bleeding_edge/src/factory.cc (revision 3473) |
+++ bleeding_edge/src/factory.cc (working copy) |
@@ -284,7 +284,8 @@ |
Handle<JSFunction> Factory::BaseNewFunctionFromBoilerplate( |
Handle<JSFunction> boilerplate, |
- Handle<Map> function_map) { |
+ Handle<Map> function_map, |
+ PretenureFlag pretenure) { |
ASSERT(boilerplate->IsBoilerplate()); |
ASSERT(!boilerplate->has_initial_map()); |
ASSERT(!boilerplate->has_prototype()); |
@@ -292,20 +293,22 @@ |
ASSERT(boilerplate->elements() == Heap::empty_fixed_array()); |
CALL_HEAP_FUNCTION(Heap::AllocateFunction(*function_map, |
boilerplate->shared(), |
- Heap::the_hole_value()), |
+ Heap::the_hole_value(), |
+ pretenure), |
JSFunction); |
} |
Handle<JSFunction> Factory::NewFunctionFromBoilerplate( |
Handle<JSFunction> boilerplate, |
- Handle<Context> context) { |
- Handle<JSFunction> result = |
- BaseNewFunctionFromBoilerplate(boilerplate, Top::function_map()); |
+ Handle<Context> context, |
+ PretenureFlag pretenure) { |
+ Handle<JSFunction> result = BaseNewFunctionFromBoilerplate( |
+ boilerplate, Top::function_map(), pretenure); |
result->set_context(*context); |
int number_of_literals = boilerplate->NumberOfLiterals(); |
Handle<FixedArray> literals = |
- Factory::NewFixedArray(number_of_literals, TENURED); |
+ Factory::NewFixedArray(number_of_literals, pretenure); |
if (number_of_literals > 0) { |
// Store the object, regexp and array functions in the literals |
// array prefix. These functions will be used when creating |