< prev index next >

make/gensrc/GensrcVarHandles.gmk

Print this page




 142     $1_RawType := Long
 143     $1_RawBoxType := Long
 144 
 145     $1_ARGS += -KCAS
 146     $1_ARGS += -KfloatingPoint
 147   endif
 148 
 149   $$($1_FILENAME): $(VARHANDLES_SRC_DIR)/X-VarHandleByteArrayView.java.template $(BUILD_TOOLS_JDK)
 150         $$(call MakeDir, $$(@D))
 151         $(RM) $$@
 152         $(TOOL_SPP) -nel -K$$($1_type) \
 153             -Dtype=$$($1_type) -DType=$$($1_Type) -DBoxType=$$($1_BoxType) \
 154             -DrawType=$$($1_rawType) -DRawType=$$($1_RawType) -DRawBoxType=$$($1_RawBoxType) \
 155             $$($1_ARGS) -i$$< -o$$@
 156 
 157   GENSRC_VARHANDLES += $$($1_FILENAME)
 158 endef
 159 
 160 ################################################################################
 161 






































































































 162 # List the types to generate source for, with capitalized first letter
 163 VARHANDLES_TYPES := Boolean Byte Short Char Int Long Float Double Reference
 164 $(foreach t, $(VARHANDLES_TYPES), \
 165   $(eval $(call GenerateVarHandle,VAR_HANDLE_$t,$t)))
 166 
 167 # List the types to generate source for, with capitalized first letter
 168 VARHANDLES_BYTE_ARRAY_TYPES := Short Char Int Long Float Double
 169 $(foreach t, $(VARHANDLES_BYTE_ARRAY_TYPES), \
 170   $(eval $(call GenerateVarHandleByteArray,VAR_HANDLE_BYTE_ARRAY_$t,$t)))





 171 
 172 GENSRC_JAVA_BASE += $(GENSRC_VARHANDLES)
 173 
 174 # Include custom extension post hook
 175 $(eval $(call IncludeCustomExtension, gensrc/GensrcVarHandles-post.gmk))
 176 


 142     $1_RawType := Long
 143     $1_RawBoxType := Long
 144 
 145     $1_ARGS += -KCAS
 146     $1_ARGS += -KfloatingPoint
 147   endif
 148 
 149   $$($1_FILENAME): $(VARHANDLES_SRC_DIR)/X-VarHandleByteArrayView.java.template $(BUILD_TOOLS_JDK)
 150         $$(call MakeDir, $$(@D))
 151         $(RM) $$@
 152         $(TOOL_SPP) -nel -K$$($1_type) \
 153             -Dtype=$$($1_type) -DType=$$($1_Type) -DBoxType=$$($1_BoxType) \
 154             -DrawType=$$($1_rawType) -DRawType=$$($1_RawType) -DRawBoxType=$$($1_RawBoxType) \
 155             $$($1_ARGS) -i$$< -o$$@
 156 
 157   GENSRC_VARHANDLES += $$($1_FILENAME)
 158 endef
 159 
 160 ################################################################################
 161 
 162 ################################################################################
 163 # Setup a rule for generating a VarHandleMemoryAddress java class
 164 # Param 1 - Variable declaration prefix
 165 # Param 2 - Type with first letter capitalized
 166 define GenerateVarHandleMemoryAddress
 167 
 168   $1_Type := $2
 169 
 170   $1_FILENAME := $(VARHANDLES_GENSRC_DIR)/VarHandleMemoryAddressAs$$($1_Type)s.java
 171 
 172   ifeq ($$($1_Type), Byte)
 173     $1_type := byte
 174     $1_BoxType := $$($1_Type)
 175 
 176     $1_rawType := $$($1_type)
 177     $1_RawType := $$($1_Type)
 178     $1_RawBoxType := $$($1_BoxType)
 179 
 180     $1_ARGS += -Kbyte
 181   endif
 182 
 183   ifeq ($$($1_Type), Short)
 184     $1_type := short
 185     $1_BoxType := $$($1_Type)
 186 
 187     $1_rawType := $$($1_type)
 188     $1_RawType := $$($1_Type)
 189     $1_RawBoxType := $$($1_BoxType)
 190   endif
 191 
 192   ifeq ($$($1_Type), Char)
 193     $1_type := char
 194     $1_BoxType := Character
 195 
 196     $1_rawType := $$($1_type)
 197     $1_RawType := $$($1_Type)
 198     $1_RawBoxType := $$($1_BoxType)
 199   endif
 200 
 201   ifeq ($$($1_Type), Int)
 202     $1_type := int
 203     $1_BoxType := Integer
 204 
 205     $1_rawType := $$($1_type)
 206     $1_RawType := $$($1_Type)
 207     $1_RawBoxType := $$($1_BoxType)
 208 
 209     $1_ARGS += -KCAS
 210     $1_ARGS += -KAtomicAdd
 211     $1_ARGS += -KBitwise
 212   endif
 213 
 214   ifeq ($$($1_Type), Long)
 215     $1_type := long
 216     $1_BoxType := $$($1_Type)
 217 
 218     $1_rawType := $$($1_type)
 219     $1_RawType := $$($1_Type)
 220     $1_RawBoxType := $$($1_BoxType)
 221 
 222     $1_ARGS += -KCAS
 223     $1_ARGS += -KAtomicAdd
 224     $1_ARGS += -KBitwise
 225   endif
 226 
 227   ifeq ($$($1_Type), Float)
 228     $1_type := float
 229     $1_BoxType := $$($1_Type)
 230 
 231     $1_rawType := int
 232     $1_RawType := Int
 233     $1_RawBoxType := Integer
 234 
 235     $1_ARGS += -KCAS
 236     $1_ARGS += -KfloatingPoint
 237   endif
 238 
 239   ifeq ($$($1_Type), Double)
 240     $1_type := double
 241     $1_BoxType := $$($1_Type)
 242 
 243     $1_rawType := long
 244     $1_RawType := Long
 245     $1_RawBoxType := Long
 246 
 247     $1_ARGS += -KCAS
 248     $1_ARGS += -KfloatingPoint
 249   endif
 250 
 251   $$($1_FILENAME): $(VARHANDLES_SRC_DIR)/X-VarHandleMemoryAddressView.java.template $(BUILD_TOOLS_JDK)
 252         $$(call MakeDir, $$(@D))
 253         $(RM) $$@
 254         $(TOOL_SPP) -nel -K$$($1_type) \
 255             -Dtype=$$($1_type) -DType=$$($1_Type) -DBoxType=$$($1_BoxType) \
 256             -DrawType=$$($1_rawType) -DRawType=$$($1_RawType) -DRawBoxType=$$($1_RawBoxType) \
 257             $$($1_ARGS) -i$$< -o$$@
 258 
 259   GENSRC_VARHANDLES += $$($1_FILENAME)
 260 endef
 261 
 262 ################################################################################
 263 
 264 # List the types to generate source for, with capitalized first letter
 265 VARHANDLES_TYPES := Boolean Byte Short Char Int Long Float Double Reference
 266 $(foreach t, $(VARHANDLES_TYPES), \
 267   $(eval $(call GenerateVarHandle,VAR_HANDLE_$t,$t)))
 268 
 269 # List the types to generate source for, with capitalized first letter
 270 VARHANDLES_BYTE_ARRAY_TYPES := Short Char Int Long Float Double
 271 $(foreach t, $(VARHANDLES_BYTE_ARRAY_TYPES), \
 272   $(eval $(call GenerateVarHandleByteArray,VAR_HANDLE_BYTE_ARRAY_$t,$t)))
 273 
 274 # List the types to generate source for, with capitalized first letter
 275 VARHANDLES_MEMORY_ADDRESS_TYPES := Byte Short Char Int Long Float Double
 276 $(foreach t, $(VARHANDLES_MEMORY_ADDRESS_TYPES), \
 277   $(eval $(call GenerateVarHandleMemoryAddress,VAR_HANDLE_BYTE_ARRAY_$t,$t)))
 278 
 279 GENSRC_JAVA_BASE += $(GENSRC_VARHANDLES)
 280 
 281 # Include custom extension post hook
 282 $(eval $(call IncludeCustomExtension, gensrc/GensrcVarHandles-post.gmk))
 283 
< prev index next >