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

Unified Diff: src/objects-inl.h

Issue 1314953004: [interpreter] Add constant_pool() to BytecodeArray. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_args
Patch Set: Fix test flag. 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-debug.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 5b87748703959d0ad4daa766b5884650297e5311..d2f2a1364f1e8e859e1dde709808d4ff3a2c4326 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1477,6 +1477,8 @@ HeapObjectContents HeapObject::ContentType() {
} else if (type == JS_FUNCTION_TYPE) {
return HeapObjectContents::kMixedValues;
#endif
+ } else if (type == BYTECODE_ARRAY_TYPE) {
+ return HeapObjectContents::kMixedValues;
} else if (type >= FIRST_FIXED_TYPED_ARRAY_TYPE &&
type <= LAST_FIXED_TYPED_ARRAY_TYPE) {
return HeapObjectContents::kMixedValues;
@@ -4034,6 +4036,11 @@ Address ByteArray::GetDataStartAddress() {
}
+void BytecodeArray::BytecodeArrayIterateBody(ObjectVisitor* v) {
+ IteratePointer(v, kConstantPoolOffset);
+}
+
+
byte BytecodeArray::get(int index) {
DCHECK(index >= 0 && index < this->length());
return READ_BYTE_FIELD(this, kHeaderSize + index * kCharSize);
@@ -4074,6 +4081,9 @@ int BytecodeArray::parameter_count() const {
}
+ACCESSORS(BytecodeArray, constant_pool, FixedArray, kConstantPoolOffset)
+
+
Address BytecodeArray::GetFirstBytecodeAddress() {
return reinterpret_cast<Address>(this) - kHeapObjectTag + kHeaderSize;
}
« no previous file with comments | « src/objects-debug.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698