Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index ed3afa593c3bbe80506a321226011cd7b65ea9f6..d0e0b83f5605f0f00ff8964263768a3b5cac2b72 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -126,28 +126,6 @@ Handle<FixedArrayBase> Factory::NewFixedDoubleArrayWithHoles( |
} |
-Handle<ConstantPoolArray> Factory::NewConstantPoolArray( |
- const ConstantPoolArray::NumberOfEntries& small) { |
- DCHECK(small.total_count() > 0); |
- CALL_HEAP_FUNCTION( |
- isolate(), |
- isolate()->heap()->AllocateConstantPoolArray(small), |
- ConstantPoolArray); |
-} |
- |
- |
-Handle<ConstantPoolArray> Factory::NewExtendedConstantPoolArray( |
- const ConstantPoolArray::NumberOfEntries& small, |
- const ConstantPoolArray::NumberOfEntries& extended) { |
- DCHECK(small.total_count() > 0); |
- DCHECK(extended.total_count() > 0); |
- CALL_HEAP_FUNCTION( |
- isolate(), |
- isolate()->heap()->AllocateExtendedConstantPoolArray(small, extended), |
- ConstantPoolArray); |
-} |
- |
- |
Handle<OrderedHashSet> Factory::NewOrderedHashSet() { |
return OrderedHashSet::Allocate(isolate(), OrderedHashSet::kMinCapacity); |
} |
@@ -1028,14 +1006,6 @@ Handle<FixedDoubleArray> Factory::CopyFixedDoubleArray( |
} |
-Handle<ConstantPoolArray> Factory::CopyConstantPoolArray( |
- Handle<ConstantPoolArray> array) { |
- CALL_HEAP_FUNCTION(isolate(), |
- isolate()->heap()->CopyConstantPoolArray(*array), |
- ConstantPoolArray); |
-} |
- |
- |
Handle<Object> Factory::NewNumber(double value, |
PretenureFlag pretenure) { |
// We need to distinguish the minus zero value and this cannot be |
@@ -1456,8 +1426,6 @@ Handle<Code> Factory::NewCode(const CodeDesc& desc, |
int prologue_offset, |
bool is_debug) { |
Handle<ByteArray> reloc_info = NewByteArray(desc.reloc_size, TENURED); |
- Handle<ConstantPoolArray> constant_pool = |
- desc.origin->NewConstantPool(isolate()); |
// Compute size. |
int body_size = RoundUp(desc.instr_size, kObjectAlignment); |
@@ -1484,6 +1452,9 @@ Handle<Code> Factory::NewCode(const CodeDesc& desc, |
code->set_next_code_link(*undefined_value()); |
code->set_handler_table(*empty_fixed_array(), SKIP_WRITE_BARRIER); |
code->set_prologue_offset(prologue_offset); |
+ if (FLAG_enable_embedded_constant_pool) { |
+ code->set_constant_pool_offset(desc.instr_size - desc.constant_pool_size); |
+ } |
if (code->kind() == Code::OPTIMIZED_FUNCTION) { |
code->set_marked_for_deoptimization(false); |
} |
@@ -1493,9 +1464,6 @@ Handle<Code> Factory::NewCode(const CodeDesc& desc, |
code->set_has_debug_break_slots(true); |
} |
- desc.origin->PopulateConstantPool(*constant_pool); |
- code->set_constant_pool(*constant_pool); |
- |
// Allow self references to created code object by patching the handle to |
// point to the newly allocated Code object. |
if (!self_ref.is_null()) *(self_ref.location()) = *code; |