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

Unified Diff: src/objects-debug.cc

Issue 1230753004: [Interpreter] Add BytecodeArray class and add to SharedFunctionInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix pedantic build (take2). 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') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index 4587d2e596b680edf08dd25ec7ae770ad82c2919..b68895fbc6d27745e4dd8e1ca6bc71674b772ef9 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -70,6 +70,9 @@ void HeapObject::HeapObjectVerify() {
case BYTE_ARRAY_TYPE:
ByteArray::cast(this)->ByteArrayVerify();
break;
+ case BYTECODE_ARRAY_TYPE:
+ BytecodeArray::cast(this)->BytecodeArrayVerify();
+ break;
case FREE_SPACE_TYPE:
FreeSpace::cast(this)->FreeSpaceVerify();
break;
@@ -222,6 +225,12 @@ void ByteArray::ByteArrayVerify() {
}
+void BytecodeArray::BytecodeArrayVerify() {
+ // TODO(oth): Walk bytecodes and immediate values to validate sanity.
+ CHECK(IsBytecodeArray());
+}
+
+
void FreeSpace::FreeSpaceVerify() {
CHECK(IsFreeSpace());
}
@@ -540,6 +549,8 @@ void SharedFunctionInfo::SharedFunctionInfoVerify() {
VerifyObjectField(kFeedbackVectorOffset);
VerifyObjectField(kScopeInfoOffset);
VerifyObjectField(kInstanceClassNameOffset);
+ CHECK(function_data()->IsUndefined() || IsApiFunction() ||
+ HasBuiltinFunctionId() || HasBytecodeArray());
VerifyObjectField(kFunctionDataOffset);
VerifyObjectField(kScriptOffset);
VerifyObjectField(kDebugInfoOffset);
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698