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

Unified Diff: src/objects-inl.h

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/objects.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 2bd8b533ace8ac88d0801d2559a5f6ba33b420c1..1a0664f8887ff1b235f8558d3f2a0fe9fae050f7 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -3639,8 +3639,17 @@ void BytecodeArray::set(int index, byte value) {
}
-INT_ACCESSORS(BytecodeArray, frame_size, kFrameSizeOffset)
-INT_ACCESSORS(BytecodeArray, number_of_locals, kNumberOfLocalsOffset)
+void BytecodeArray::set_frame_size(int frame_size) {
+ // We need at least one stack slot for the return register.
+ DCHECK_GE(frame_size, kPointerSize);
+ DCHECK(IsAligned(frame_size, static_cast<unsigned>(kPointerSize)));
+ WRITE_INT_FIELD(this, kFrameSizeOffset, frame_size);
+}
+
+
+int BytecodeArray::frame_size() const {
+ return READ_INT_FIELD(this, kFrameSizeOffset);
+}
Address BytecodeArray::GetFirstBytecodeAddress() {
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698