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

Unified Diff: src/factory.cc

Issue 1162993006: Add support for Embedded Constant Pools for PPC and Arm (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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.h » ('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 f51b19cfa6d577e981eb0dd8fd799d476b69005f..4aca8854565c06b97d33fd11a9783313b3434613 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);
}
@@ -1024,14 +1002,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
@@ -1460,8 +1430,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);
@@ -1488,6 +1456,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);
}
@@ -1497,9 +1468,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') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698