mirror of https://gitee.com/bigwinds/arangodb
removed unused attribute
This commit is contained in:
parent
9000a6c83e
commit
55d03dd8fd
|
@ -53,43 +53,37 @@ TRI_shape_pid_t const BasicShapes::TRI_SHAPE_SID_LIST = 6;
|
|||
TRI_shape_t const BasicShapes::_shapeNull = {
|
||||
BasicShapes::TRI_SHAPE_SID_NULL,
|
||||
TRI_SHAPE_NULL,
|
||||
sizeof(TRI_null_shape_t),
|
||||
0
|
||||
sizeof(TRI_null_shape_t)
|
||||
};
|
||||
|
||||
TRI_shape_t const BasicShapes::_shapeBoolean = {
|
||||
BasicShapes::TRI_SHAPE_SID_BOOLEAN,
|
||||
TRI_SHAPE_BOOLEAN,
|
||||
sizeof(TRI_boolean_shape_t),
|
||||
sizeof(TRI_shape_boolean_t)
|
||||
sizeof(TRI_boolean_shape_t)
|
||||
};
|
||||
|
||||
TRI_shape_t const BasicShapes::_shapeNumber = {
|
||||
BasicShapes::TRI_SHAPE_SID_NUMBER,
|
||||
TRI_SHAPE_NUMBER,
|
||||
sizeof(TRI_number_shape_t),
|
||||
sizeof(TRI_shape_number_t)
|
||||
sizeof(TRI_number_shape_t)
|
||||
};
|
||||
|
||||
TRI_shape_t const BasicShapes::_shapeShortString = {
|
||||
BasicShapes::TRI_SHAPE_SID_SHORT_STRING,
|
||||
TRI_SHAPE_SHORT_STRING,
|
||||
sizeof(TRI_short_string_shape_t),
|
||||
sizeof(TRI_shape_length_short_string_t) + TRI_SHAPE_SHORT_STRING_CUT
|
||||
sizeof(TRI_short_string_shape_t)
|
||||
};
|
||||
|
||||
TRI_shape_t const BasicShapes::_shapeLongString = {
|
||||
BasicShapes::TRI_SHAPE_SID_LONG_STRING,
|
||||
TRI_SHAPE_LONG_STRING,
|
||||
sizeof(TRI_long_string_shape_t),
|
||||
TRI_SHAPE_SIZE_VARIABLE
|
||||
sizeof(TRI_long_string_shape_t)
|
||||
};
|
||||
|
||||
TRI_shape_t const BasicShapes::_shapeList = {
|
||||
BasicShapes::TRI_SHAPE_SID_LIST,
|
||||
TRI_SHAPE_LIST,
|
||||
sizeof(TRI_list_shape_t),
|
||||
TRI_SHAPE_SIZE_VARIABLE
|
||||
sizeof(TRI_list_shape_t)
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
@ -88,44 +88,38 @@ void TRI_PrintShape (TRI_shaper_t* shaper, TRI_shape_t const* shape, int indent)
|
|||
|
||||
switch (shape->_type) {
|
||||
case TRI_SHAPE_NULL:
|
||||
printf("%*sNULL sid: %u, data size: %u\n", indent, "",
|
||||
(unsigned int) shape->_sid,
|
||||
(unsigned int) shape->_dataSize);
|
||||
printf("%*sNULL sid: %u\n", indent, "",
|
||||
(unsigned int) shape->_sid);
|
||||
break;
|
||||
|
||||
case TRI_SHAPE_BOOLEAN:
|
||||
printf("%*sBOOLEAN sid: %u, data size: %u\n", indent, "",
|
||||
(unsigned int) shape->_sid,
|
||||
(unsigned int) shape->_dataSize);
|
||||
printf("%*sBOOLEAN sid: %u\n", indent, "",
|
||||
(unsigned int) shape->_sid);
|
||||
break;
|
||||
|
||||
case TRI_SHAPE_NUMBER:
|
||||
printf("%*sNUMBER sid: %u, data size: %u\n", indent, "",
|
||||
(unsigned int) shape->_sid,
|
||||
(unsigned int) shape->_dataSize);
|
||||
printf("%*sNUMBER sid: %u\n", indent, "",
|
||||
(unsigned int) shape->_sid);
|
||||
break;
|
||||
|
||||
case TRI_SHAPE_SHORT_STRING:
|
||||
printf("%*sSHORT STRING sid: %u, data size: %u\n", indent, "",
|
||||
(unsigned int) shape->_sid,
|
||||
(unsigned int) shape->_dataSize);
|
||||
printf("%*sSHORT STRING sid: %u\n", indent, "",
|
||||
(unsigned int) shape->_sid);
|
||||
break;
|
||||
|
||||
case TRI_SHAPE_LONG_STRING:
|
||||
printf("%*sLONG STRING sid: %u, data size: %u\n", indent, "",
|
||||
(unsigned int) shape->_sid,
|
||||
(unsigned int) shape->_dataSize);
|
||||
printf("%*sLONG STRING sid: %u\n", indent, "",
|
||||
(unsigned int) shape->_sid);
|
||||
break;
|
||||
|
||||
case TRI_SHAPE_ARRAY:
|
||||
array = (TRI_array_shape_t const*) shape;
|
||||
n = array->_fixedEntries + array->_variableEntries;
|
||||
|
||||
printf("%*sARRAY sid: %u, fixed: %u, variable: %u, data size: %u\n", indent, "",
|
||||
printf("%*sARRAY sid: %u, fixed: %u, variable: %u\n", indent, "",
|
||||
(unsigned int) shape->_sid,
|
||||
(unsigned int) array->_fixedEntries,
|
||||
(unsigned int) array->_variableEntries,
|
||||
(unsigned int) shape->_dataSize);
|
||||
(unsigned int) array->_variableEntries);
|
||||
|
||||
ptr = (char const*) shape;
|
||||
ptr += sizeof(TRI_array_shape_t);
|
||||
|
@ -175,28 +169,25 @@ void TRI_PrintShape (TRI_shaper_t* shaper, TRI_shape_t const* shape, int indent)
|
|||
break;
|
||||
|
||||
case TRI_SHAPE_LIST:
|
||||
printf("%*sLIST sid: %u, data size: %u\n", indent, "",
|
||||
(unsigned int) shape->_sid,
|
||||
(unsigned int) shape->_dataSize);
|
||||
printf("%*sLIST sid: %u\n", indent, "",
|
||||
(unsigned int) shape->_sid);
|
||||
break;
|
||||
|
||||
case TRI_SHAPE_HOMOGENEOUS_LIST:
|
||||
homList = (TRI_homogeneous_list_shape_t const*) shape;
|
||||
|
||||
printf("%*sHOMOGENEOUS LIST sid: %u, entry sid: %u, data size: %u\n", indent, "",
|
||||
printf("%*sHOMOGENEOUS LIST sid: %u, entry sid: %u\n", indent, "",
|
||||
(unsigned int) shape->_sid,
|
||||
(unsigned int) homList->_sidEntry,
|
||||
(unsigned int) shape->_dataSize);
|
||||
(unsigned int) homList->_sidEntry);
|
||||
break;
|
||||
|
||||
case TRI_SHAPE_HOMOGENEOUS_SIZED_LIST:
|
||||
homSizedList = (TRI_homogeneous_sized_list_shape_t const*) shape;
|
||||
|
||||
printf("%*sHOMOGENEOUS SIZED LIST sid: %u, entry sid: %u, entry size: %u, data size: %u\n", indent, "",
|
||||
printf("%*sHOMOGENEOUS SIZED LIST sid: %u, entry sid: %u, entry size: %u\n", indent, "",
|
||||
(unsigned int) shape->_sid,
|
||||
(unsigned int) homSizedList->_sidEntry,
|
||||
(unsigned int) homSizedList->_sizeEntry,
|
||||
(unsigned int) shape->_dataSize);
|
||||
(unsigned int) homSizedList->_sizeEntry);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -571,7 +562,6 @@ static bool FillShapeValueList (TRI_shaper_t* shaper,
|
|||
|
||||
shape->base._size = sizeof(TRI_homogeneous_sized_list_shape_t);
|
||||
shape->base._type = TRI_SHAPE_HOMOGENEOUS_SIZED_LIST;
|
||||
shape->base._dataSize = TRI_SHAPE_SIZE_VARIABLE;
|
||||
shape->_sidEntry = s;
|
||||
shape->_sizeEntry = l;
|
||||
|
||||
|
@ -640,7 +630,6 @@ static bool FillShapeValueList (TRI_shaper_t* shaper,
|
|||
|
||||
shape->base._size = sizeof(TRI_homogeneous_list_shape_t);
|
||||
shape->base._type = TRI_SHAPE_HOMOGENEOUS_LIST;
|
||||
shape->base._dataSize = TRI_SHAPE_SIZE_VARIABLE;
|
||||
shape->_sidEntry = s;
|
||||
|
||||
// note: if 'found' is not a nullptr, the shaper will have freed variable 'shape'!
|
||||
|
@ -917,8 +906,6 @@ static bool FillShapeValueArray (TRI_shaper_t* shaper,
|
|||
|
||||
a->base._type = TRI_SHAPE_ARRAY;
|
||||
a->base._size = i;
|
||||
a->base._dataSize = (v == 0) ? total : TRI_SHAPE_SIZE_VARIABLE;
|
||||
|
||||
a->_fixedEntries = f;
|
||||
a->_variableEntries = v;
|
||||
|
||||
|
|
|
@ -276,7 +276,6 @@ typedef struct TRI_shape_s {
|
|||
TRI_shape_sid_t _sid;
|
||||
TRI_shape_type_t _type;
|
||||
TRI_shape_size_t _size; // total size of the shape
|
||||
TRI_shape_size_t _dataSize; // in case of fixed sized shaped or TRI_SHAPE_SIZE_VARIABLE
|
||||
}
|
||||
TRI_shape_t;
|
||||
|
||||
|
@ -317,11 +316,6 @@ TRI_shape_value_t;
|
|||
/// <td>_size</td>
|
||||
/// <td>total size of the shape, always sizeof(TRI_null_shape_t)</td>
|
||||
/// </tr>
|
||||
/// <tr>
|
||||
/// <td>@c TRI_shape_size_t</td>
|
||||
/// <td>_dataSize</td>
|
||||
/// <td>always 0</td>
|
||||
/// </tr>
|
||||
/// </table>
|
||||
///
|
||||
/// There is no corresponding shaped JSON object.
|
||||
|
@ -354,11 +348,6 @@ TRI_null_shape_t;
|
|||
/// <td>_size</td>
|
||||
/// <td>total size of the shape, always sizeof(TRI_boolean_shape_t)</td>
|
||||
/// </tr>
|
||||
/// <tr>
|
||||
/// <td>@c TRI_shape_size_t</td>
|
||||
/// <td>_dataSize</td>
|
||||
/// <td>always sizeof(TRI_shape_boolean_t)</td>
|
||||
/// </tr>
|
||||
/// </table>
|
||||
///
|
||||
/// The memory layout of the corresponding shaped JSON is as follows
|
||||
|
@ -399,11 +388,6 @@ TRI_boolean_shape_t;
|
|||
/// <td>_size</td>
|
||||
/// <td>total size of the shape, always sizeof(TRI_number_shape_t)</td>
|
||||
/// </tr>
|
||||
/// <tr>
|
||||
/// <td>@c TRI_shape_size_t</td>
|
||||
/// <td>_dataSize</td>
|
||||
/// <td>always sizeof(TRI_shape_number_t)</td>
|
||||
/// </tr>
|
||||
/// </table>
|
||||
///
|
||||
/// The memory layout of the corresponding shaped JSON is as follows
|
||||
|
@ -444,11 +428,6 @@ TRI_number_shape_t;
|
|||
/// <td>_size</td>
|
||||
/// <td>total size of the shape, always sizeof(TRI_short_string_shape_t)</td>
|
||||
/// </tr>
|
||||
/// <tr>
|
||||
/// <td>@c TRI_shape_size_t</td>
|
||||
/// <td>_dataSize</td>
|
||||
/// <td>always sizeof(TRI_shape_length_short_string_t) + @c TRI_SHAPE_SHORT_STRING_CUT</td>
|
||||
/// </tr>
|
||||
/// </table>
|
||||
///
|
||||
/// The memory layout of the corresponding shaped JSON is as follows
|
||||
|
@ -494,11 +473,6 @@ TRI_short_string_shape_t;
|
|||
/// <td>_size</td>
|
||||
/// <td>total size of the shape, always sizeof(TRI_long_string_shape_t)</td>
|
||||
/// </tr>
|
||||
/// <tr>
|
||||
/// <td>@c TRI_shape_size_t</td>
|
||||
/// <td>_dataSize</td>
|
||||
/// <td>always @c TRI_SHAPE_SIZE_VARIABLE</td>
|
||||
/// </tr>
|
||||
/// </table>
|
||||
///
|
||||
/// The memory layout of the corresponding shaped JSON is as follows
|
||||
|
@ -553,11 +527,6 @@ TRI_long_string_shape_t;
|
|||
/// </tr>
|
||||
/// <tr>
|
||||
/// <td>@c TRI_shape_size_t</td>
|
||||
/// <td>_dataSize</td>
|
||||
/// <td>eitder @c TRI_SHAPE_SIZE_VARIABLE or tde size of tde data for fixed sized arrays</td>
|
||||
/// </tr>
|
||||
/// <tr>
|
||||
/// <td>@c TRI_shape_size_t</td>
|
||||
/// <td>_fixedEntries</td>
|
||||
/// <td>number of fixed attributes</td>
|
||||
/// </tr>
|
||||
|
@ -649,11 +618,6 @@ TRI_array_shape_t;
|
|||
/// <td>_size</td>
|
||||
/// <td>total size of the shape, always sizeof(TRI_list_shape_t)</td>
|
||||
/// </tr>
|
||||
/// <tr>
|
||||
/// <td>@c TRI_shape_size_t</td>
|
||||
/// <td>_dataSize</td>
|
||||
/// <td>always @c TRI_SHAPE_SIZE_VARIABLE</td>
|
||||
/// </tr>
|
||||
/// </table>
|
||||
///
|
||||
/// The memory layout of the corresponding shaped JSON is as follows
|
||||
|
@ -724,11 +688,6 @@ TRI_list_shape_t;
|
|||
/// <td>total size of the shape, always sizeof(TRI_list_shape_t)</td>
|
||||
/// </tr>
|
||||
/// <tr>
|
||||
/// <td>@c TRI_shape_size_t</td>
|
||||
/// <td>_dataSize</td>
|
||||
/// <td>always @c TRI_SHAPE_SIZE_VARIABLE</td>
|
||||
/// </tr>
|
||||
/// <tr>
|
||||
/// <td>@c TRI_shape_sid_t</td>
|
||||
/// <td>_sidEntry</td>
|
||||
/// <td>the shape identifier of all list entries</td>
|
||||
|
@ -800,11 +759,6 @@ TRI_homogeneous_list_shape_t;
|
|||
/// <td>total size of the shape, always sizeof(TRI_list_shape_t)</td>
|
||||
/// </tr>
|
||||
/// <tr>
|
||||
/// <td>@c TRI_shape_size_t</td>
|
||||
/// <td>_dataSize</td>
|
||||
/// <td>always @c TRI_SHAPE_SIZE_VARIABLE</td>
|
||||
/// </tr>
|
||||
/// <tr>
|
||||
/// <td>@c TRI_shape_sid_t</td>
|
||||
/// <td>_sidEntry</td>
|
||||
/// <td>the shape identifier of all list entries</td>
|
||||
|
|
|
@ -378,7 +378,6 @@ static int FillShapeValueList (v8::Isolate* isolate,
|
|||
|
||||
shape->base._size = sizeof(TRI_homogeneous_sized_list_shape_t);
|
||||
shape->base._type = TRI_SHAPE_HOMOGENEOUS_SIZED_LIST;
|
||||
shape->base._dataSize = TRI_SHAPE_SIZE_VARIABLE;
|
||||
shape->_sidEntry = s;
|
||||
shape->_sizeEntry = l;
|
||||
|
||||
|
@ -452,7 +451,6 @@ static int FillShapeValueList (v8::Isolate* isolate,
|
|||
|
||||
shape->base._size = sizeof(TRI_homogeneous_list_shape_t);
|
||||
shape->base._type = TRI_SHAPE_HOMOGENEOUS_LIST;
|
||||
shape->base._dataSize = TRI_SHAPE_SIZE_VARIABLE;
|
||||
shape->_sidEntry = s;
|
||||
|
||||
// if found returns non-NULL, it will free the shape!!
|
||||
|
@ -737,7 +735,6 @@ static int FillShapeValueArray (v8::Isolate* isolate,
|
|||
|
||||
a->base._type = TRI_SHAPE_ARRAY;
|
||||
a->base._size = (TRI_shape_size_t) totalSize;
|
||||
a->base._dataSize = (v == 0) ? total : TRI_SHAPE_SIZE_VARIABLE;
|
||||
|
||||
a->_fixedEntries = f;
|
||||
a->_variableEntries = v;
|
||||
|
|
Loading…
Reference in New Issue