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

Unified Diff: src/heap/heap.cc

Issue 1254873002: [interpreter] A couple of minor tweaks to BytecodeArray. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/heap/heap.h ('k') | src/interpreter/interpreter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 8fb4454c9bb094872c874f56c7da0c2f549ec91f..84ea2cc4c9f0091651bf3d90b4ba66d7581b668e 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -3068,7 +3068,9 @@ bool Heap::CreateInitialMaps() {
set_empty_byte_array(byte_array);
BytecodeArray* bytecode_array;
- if (!AllocateBytecodeArray(0, nullptr).To(&bytecode_array)) {
+ AllocationResult allocation =
+ AllocateBytecodeArray(0, nullptr, kPointerSize);
+ if (!allocation.To(&bytecode_array)) {
return false;
}
set_empty_bytecode_array(bytecode_array);
@@ -3821,7 +3823,8 @@ AllocationResult Heap::AllocateByteArray(int length, PretenureFlag pretenure) {
AllocationResult Heap::AllocateBytecodeArray(int length,
- const byte* const raw_bytecodes) {
+ const byte* const raw_bytecodes,
+ int frame_size) {
if (length < 0 || length > BytecodeArray::kMaxLength) {
v8::internal::Heap::FatalProcessOutOfMemory("invalid array length", true);
}
@@ -3836,6 +3839,7 @@ AllocationResult Heap::AllocateBytecodeArray(int length,
result->set_map_no_write_barrier(bytecode_array_map());
BytecodeArray* instance = BytecodeArray::cast(result);
instance->set_length(length);
+ instance->set_frame_size(frame_size);
CopyBytes(instance->GetFirstBytecodeAddress(), raw_bytecodes, length);
return result;
« no previous file with comments | « src/heap/heap.h ('k') | src/interpreter/interpreter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698