]> git.kaiwu.me - njs.git/commitdiff
Removing the requirement of "aligned" attribute support.
authorDmitry Volyntsev <xeioex@nginx.com>
Mon, 31 May 2021 06:55:32 +0000 (06:55 +0000)
committerDmitry Volyntsev <xeioex@nginx.com>
Mon, 31 May 2021 06:55:32 +0000 (06:55 +0000)
Before 0a2a0b5a74f4, the address of values used in runtime had to be the
multiple of 16, because the address of a variable was used as its VM
index. The first 4 bits of an index signified the scope of a varible.

This is no longer the case, after 0a2a0b5a74f4 the address of a variable
is never used as its VM index.

src/njs_value.h

index 28aed7e16e7e749fc30670fab4f4e7070773de44..b3049d2f559ded4bce0e7743d7caa019a3d33bb8 100644 (file)
@@ -105,10 +105,6 @@ typedef struct njs_property_next_s    njs_property_next_t;
 typedef struct njs_object_init_s      njs_object_init_t;
 
 
-#if (!NJS_HAVE_GCC_ATTRIBUTE_ALIGNED)
-#error "aligned attribute is required"
-#endif
-
 union njs_value_s {
     /*
      * The njs_value_t size is 16 bytes and must be aligned to 16 bytes