| Index: src/factory.cc
|
| diff --git a/src/factory.cc b/src/factory.cc
|
| index 2077180377e9ba32dbcc481a2d6b085fd0f3f4b4..10f5268bc783027ff60185f72f962d813352a27a 100644
|
| --- a/src/factory.cc
|
| +++ b/src/factory.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2006-2008 the V8 project authors. All rights reserved.
|
| +// Copyright 2010 the V8 project authors. All rights reserved.
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| // met:
|
| @@ -32,6 +32,7 @@
|
| #include "execution.h"
|
| #include "factory.h"
|
| #include "macro-assembler.h"
|
| +#include "objects.h"
|
| #include "objects-visiting.h"
|
|
|
| namespace v8 {
|
| @@ -81,6 +82,28 @@ Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors) {
|
| }
|
|
|
|
|
| +Handle<DeoptimizationInputData> Factory::NewDeoptimizationInputData(
|
| + int deopt_entry_count,
|
| + PretenureFlag pretenure) {
|
| + ASSERT(deopt_entry_count > 0);
|
| + CALL_HEAP_FUNCTION(isolate(),
|
| + DeoptimizationInputData::Allocate(deopt_entry_count,
|
| + pretenure),
|
| + DeoptimizationInputData);
|
| +}
|
| +
|
| +
|
| +Handle<DeoptimizationOutputData> Factory::NewDeoptimizationOutputData(
|
| + int deopt_entry_count,
|
| + PretenureFlag pretenure) {
|
| + ASSERT(deopt_entry_count > 0);
|
| + CALL_HEAP_FUNCTION(isolate(),
|
| + DeoptimizationOutputData::Allocate(deopt_entry_count,
|
| + pretenure),
|
| + DeoptimizationOutputData);
|
| +}
|
| +
|
| +
|
| // Symbols are created in the old generation (data space).
|
| Handle<String> Factory::LookupSymbol(Vector<const char> string) {
|
| CALL_HEAP_FUNCTION(isolate(),
|
| @@ -300,6 +323,15 @@ Handle<ExternalArray> Factory::NewExternalArray(int length,
|
| }
|
|
|
|
|
| +Handle<JSGlobalPropertyCell> Factory::NewJSGlobalPropertyCell(
|
| + Handle<Object> value) {
|
| + CALL_HEAP_FUNCTION(
|
| + isolate(),
|
| + isolate()->heap()->AllocateJSGlobalPropertyCell(*value),
|
| + JSGlobalPropertyCell);
|
| +}
|
| +
|
| +
|
| Handle<Map> Factory::NewMap(InstanceType type, int instance_size) {
|
| CALL_HEAP_FUNCTION(
|
| isolate(),
|
| @@ -397,6 +429,15 @@ Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo(
|
| context->global_context());
|
| }
|
| result->set_literals(*literals);
|
| + result->set_next_function_link(isolate()->heap()->undefined_value());
|
| +
|
| + if (V8::UseCrankshaft() &&
|
| + FLAG_always_opt &&
|
| + result->is_compiled() &&
|
| + !function_info->is_toplevel() &&
|
| + function_info->allows_lazy_compilation()) {
|
| + result->MarkForLazyRecompilation();
|
| + }
|
| return result;
|
| }
|
|
|
|
|