Introducing managed pointers classes (ecma_generic_ptr_t, ecma_pointer_t<T>); using ecma_generic_ptr_t to store pointer in ecma_value_t.

This commit is contained in:
Ruben Ayrapetyan
2015-02-03 14:55:14 +03:00
parent 55caaf7a88
commit b0e4d2ece1
4 changed files with 169 additions and 26 deletions
+4 -3
View File
@@ -15,6 +15,7 @@
#include "ecma-compressed-pointers.h"
#include "ecma-globals.h"
#include "ecma-managed-pointer.h"
#include "jrt-bit-fields.h"
#ifndef ECMA_VALUE_H
@@ -112,7 +113,7 @@ class ecma_value_t
|| _type == ECMA_TYPE_STRING
|| _type == ECMA_TYPE_OBJECT);
ECMA_SET_NON_NULL_POINTER (value, _value_p);
_value_p.pack_to (value);
}
return pack (_type, value);
@@ -178,7 +179,7 @@ class ecma_value_t
|| _type == ECMA_TYPE_STRING
|| _type == ECMA_TYPE_OBJECT);
_value_p = ECMA_GET_NON_NULL_POINTER (void, value);
_value_p.unpack_from (value);
}
return *this;
@@ -324,7 +325,7 @@ class ecma_value_t
union
{
ecma_simple_value_t _simple_value;
void* _value_p;
ecma_generic_ptr_t _value_p;
};
};