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/objects-inl.h

Issue 1303403004: [Interpreter] Add support for parameter variables. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_add_bytecodes
Patch Set: Address review comments Created 5 years, 4 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') | src/x64/builtins-x64.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 f5f2eaeaad93e3d8960771a902afd80aa111bdad..5b87748703959d0ad4daa766b5884650297e5311 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -4058,6 +4058,22 @@ int BytecodeArray::frame_size() const {
}
+void BytecodeArray::set_parameter_count(int number_of_parameters) {
+ DCHECK_GE(number_of_parameters, 0);
+ // Parameter count is stored as the size on stack of the parameters to allow
+ // it to be used directly by generated code.
+ WRITE_INT_FIELD(this, kParameterSizeOffset,
+ (number_of_parameters << kPointerSizeLog2));
+}
+
+
+int BytecodeArray::parameter_count() const {
+ // Parameter count is stored as the size on stack of the parameters to allow
+ // it to be used directly by generated code.
+ return READ_INT_FIELD(this, kParameterSizeOffset) >> kPointerSizeLog2;
+}
+
+
Address BytecodeArray::GetFirstBytecodeAddress() {
return reinterpret_cast<Address>(this) - kHeapObjectTag + kHeaderSize;
}
« no previous file with comments | « src/objects.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698