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

Unified Diff: src/interpreter/bytecode-array-builder.cc

Issue 2167763003: [Interpreter] Avoid allocating pairs array in VisitDeclarations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_merge_binary
Patch Set: Rebase Created 4 years, 5 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/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.cc
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
index 7e7a142538b334c6fd6c88c69d2479457bc65ff8..1aefe7af493959d1f1f39d7f0ab7451bc15aa556 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -179,6 +179,12 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CompareOperation(Token::Value op,
return *this;
}
+BytecodeArrayBuilder& BytecodeArrayBuilder::LoadConstantPoolEntry(
+ size_t entry) {
+ Output(Bytecode::kLdaConstant, UnsignedOperand(entry));
+ return *this;
+}
+
BytecodeArrayBuilder& BytecodeArrayBuilder::LoadLiteral(
v8::internal::Smi* smi) {
int32_t raw_smi = smi->value();
@@ -633,6 +639,15 @@ size_t BytecodeArrayBuilder::GetConstantPoolEntry(Handle<Object> object) {
return constant_array_builder()->Insert(object);
}
+size_t BytecodeArrayBuilder::AllocateConstantPoolEntry() {
+ return constant_array_builder()->AllocateEntry();
+}
+
+void BytecodeArrayBuilder::InsertConstantPoolEntryAt(size_t entry,
+ Handle<Object> object) {
+ constant_array_builder()->InsertAllocatedEntry(entry, object);
+}
+
void BytecodeArrayBuilder::SetReturnPosition() {
if (return_position_ == kNoSourcePosition) return;
latest_source_info_.MakeStatementPosition(return_position_);
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698