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

Unified Diff: tools/gen-postmortem-metadata.py

Issue 2051563003: Move post-mortem constants from accessors table to constants table (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Remove unintended change from previous patchset Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gen-postmortem-metadata.py
diff --git a/tools/gen-postmortem-metadata.py b/tools/gen-postmortem-metadata.py
index 55f915d3ce7542671e8d61c2c8976da19c4c339c..a9e5b5604150d0e3e214f2d726adfc2e84752aa9 100644
--- a/tools/gen-postmortem-metadata.py
+++ b/tools/gen-postmortem-metadata.py
@@ -50,7 +50,8 @@ import re
import sys
#
-# Miscellaneous constants, tags, and masks used for object identification.
+# Miscellaneous constants such as tags and masks used for object identification,
+# enumeration values used as indexes in internal tables, etc..
#
consts_misc = [
{ 'name': 'FirstNonstringType', 'value': 'FIRST_NONSTRING_TYPE' },
@@ -181,17 +182,46 @@ consts_misc = [
'value': 'JSArrayBuffer::WasNeutered::kMask' },
{ 'name': 'jsarray_buffer_was_neutered_shift',
'value': 'JSArrayBuffer::WasNeutered::kShift' },
+
+ { 'name': 'context_idx_closure',
+ 'value': 'Context::CLOSURE_INDEX' },
+ { 'name': 'context_idx_native',
+ 'value': 'Context::NATIVE_CONTEXT_INDEX' },
+ { 'name': 'context_idx_prev',
+ 'value': 'Context::PREVIOUS_INDEX' },
+ { 'name': 'context_idx_ext',
+ 'value': 'Context::EXTENSION_INDEX' },
+ { 'name': 'context_min_slots',
+ 'value': 'Context::MIN_CONTEXT_SLOTS' },
+
+ { 'name': 'namedictionaryshape_prefix_size',
+ 'value': 'NameDictionaryShape::kPrefixSize' },
+ { 'name': 'namedictionaryshape_entry_size',
+ 'value': 'NameDictionaryShape::kEntrySize' },
+
+ { 'name': 'namedictionary_prefix_start_index',
+ 'value': 'NameDictionary::kPrefixStartIndex' },
+
+ { 'name': 'seedednumberdictionaryshape_prefix_size',
+ 'value': 'SeededNumberDictionaryShape::kPrefixSize' },
+
+ { 'name': 'unseedednumberdictionaryshape_prefix_size',
+ 'value': 'UnseededNumberDictionaryShape::kPrefixSize' },
+
+ { 'name': 'numberdictionaryshape_entry_size',
+ 'value': 'NumberDictionaryShape::kEntrySize' }
];
#
# The following useful fields are missing accessors, so we define fake ones.
+# Please note that extra accessors should _only_ be added to expose offsets that
+# can be used to access actual V8 objects' properties. They should not be added
+# for exposing other values. For instance, enumeration values or class'
+# constants should be exposed by adding an entry in the "consts_misc" table, not
+# in this "extras_accessors" table.
#
extras_accessors = [
'JSFunction, context, Context, kContextOffset',
- 'Context, closure_index, int, CLOSURE_INDEX',
- 'Context, native_context_index, int, NATIVE_CONTEXT_INDEX',
- 'Context, previous_index, int, PREVIOUS_INDEX',
- 'Context, min_context_slots, int, MIN_CONTEXT_SLOTS',
'HeapObject, map, Map, kMapOffset',
'JSObject, elements, Object, kElementsOffset',
'FixedArray, data, uintptr_t, kHeaderSize',
@@ -205,12 +235,6 @@ extras_accessors = [
'Map, bit_field2, char, kBitField2Offset',
'Map, bit_field3, int, kBitField3Offset',
'Map, prototype, Object, kPrototypeOffset',
- 'NameDictionaryShape, prefix_size, int, kPrefixSize',
- 'NameDictionaryShape, entry_size, int, kEntrySize',
- 'NameDictionary, prefix_start_index, int, kPrefixStartIndex',
- 'SeededNumberDictionaryShape, prefix_size, int, kPrefixSize',
- 'UnseededNumberDictionaryShape, prefix_size, int, kPrefixSize',
- 'NumberDictionaryShape, entry_size, int, kEntrySize',
'Oddball, kind_offset, int, kKindOffset',
'HeapNumber, value, double, kValueOffset',
'ConsString, first, String, kFirstOffset',
@@ -254,6 +278,7 @@ header = '''
#include "src/v8.h"
#include "src/frames.h"
#include "src/frames-inl.h" /* for architecture-specific frame constants */
+#include "src/contexts.h"
using namespace v8::internal;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698