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

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: Don't use extra memory for BytecodeArray in SharedFunctionInfo and add a BytecodeArray test. 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
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index a3d96b9d034228462a36c559c43a4bcdc21645ba..5dd8ec4a856dcb52685535a138425c98ee297048 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());
}

Powered by Google App Engine
This is Rietveld 408576698