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

Unified Diff: src/objects-body-descriptors-inl.h

Issue 1601813009: [interpreter] Add field for source position table to byte code array. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comment Created 4 years, 11 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.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-body-descriptors-inl.h
diff --git a/src/objects-body-descriptors-inl.h b/src/objects-body-descriptors-inl.h
index 8fe4c0a84a078cebcca999e6f00160699f71984f..eb4af3002353645b8f0a9acd69804440026a25df 100644
--- a/src/objects-body-descriptors-inl.h
+++ b/src/objects-body-descriptors-inl.h
@@ -193,7 +193,8 @@ class JSArrayBuffer::BodyDescriptor final : public BodyDescriptorBase {
class BytecodeArray::BodyDescriptor final : public BodyDescriptorBase {
public:
static bool IsValidSlot(HeapObject* obj, int offset) {
- return offset == kConstantPoolOffset || offset == kHandlerTableOffset;
+ return offset >= kConstantPoolOffset &&
+ offset <= kSourcePositionTableOffset;
}
template <typename ObjectVisitor>
@@ -201,6 +202,7 @@ class BytecodeArray::BodyDescriptor final : public BodyDescriptorBase {
ObjectVisitor* v) {
IteratePointer(obj, kConstantPoolOffset, v);
IteratePointer(obj, kHandlerTableOffset, v);
+ IteratePointer(obj, kSourcePositionTableOffset, v);
}
template <typename StaticVisitor>
@@ -208,6 +210,7 @@ class BytecodeArray::BodyDescriptor final : public BodyDescriptorBase {
Heap* heap = obj->GetHeap();
IteratePointer<StaticVisitor>(heap, obj, kConstantPoolOffset);
IteratePointer<StaticVisitor>(heap, obj, kHandlerTableOffset);
+ IteratePointer<StaticVisitor>(heap, obj, kSourcePositionTableOffset);
}
static inline int SizeOf(Map* map, HeapObject* obj) {
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698