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

Unified Diff: src/factory.cc

Issue 1131783003: Embedded constant pools. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix debug-mode Arm issue. Created 5 years, 7 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') | 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 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;
« no previous file with comments | « src/factory.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698