< prev index next >

make/gensrc/GensrcVarHandles.gmk

Print this page




  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 GENSRC_VARHANDLES :=
  27 
  28 VARHANDLES_GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/invoke
  29 VARHANDLES_SRC_DIR := $(JDK_TOPDIR)/src/java.base/share/classes/java/lang/invoke
  30 
  31 ################################################################################
  32 # Setup a rule for generating a VarHandle java class
  33 # Param 1 - Variable declaration prefix
  34 # Param 2 - Type with first letter capitalized
  35 define GenerateVarHandle
  36 
  37   $1_Type := $2
  38 
  39   $1_FILENAME := $(VARHANDLES_GENSRC_DIR)/VarHandle$$($1_Type)s.java
  40 
  41   ifneq ($$(findstring $$($1_Type), Object Int Long), )
  42     $1_ARGS += -KCAS
  43   endif
  44 
  45   ifneq ($$(findstring $$($1_Type), Int Long), )
  46     $1_ARGS += -KAtomicAdd




  47   endif
  48 
  49   $$($1_FILENAME): $(VARHANDLES_SRC_DIR)/X-VarHandle.java.template $(BUILD_TOOLS_JDK)
  50         ifeq ($$($1_Type), Object)
  51           $$(eval $1_type := $$($1_Type))
  52         else
  53           $$(eval $1_type := $$$$(shell $(TR) '[:upper:]' '[:lower:]' <<< $$$$($1_Type)))
  54         endif
  55         $$(call MakeDir, $$(@D))
  56         $(TOOL_SPP) -nel -K$$($1_type) -Dtype=$$($1_type) -DType=$$($1_Type) \
  57             $$($1_ARGS) < $$< > $$@
  58 
  59   GENSRC_VARHANDLES += $$($1_FILENAME)
  60 endef
  61 
  62 ################################################################################
  63 
  64 ################################################################################
  65 # Setup a rule for generating a VarHandleByteArray java class
  66 # Param 1 - Variable declaration prefix




  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 GENSRC_VARHANDLES :=
  27 
  28 VARHANDLES_GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/invoke
  29 VARHANDLES_SRC_DIR := $(JDK_TOPDIR)/src/java.base/share/classes/java/lang/invoke
  30 
  31 ################################################################################
  32 # Setup a rule for generating a VarHandle java class
  33 # Param 1 - Variable declaration prefix
  34 # Param 2 - Type with first letter capitalized
  35 define GenerateVarHandle
  36 
  37   $1_Type := $2
  38 
  39   $1_FILENAME := $(VARHANDLES_GENSRC_DIR)/VarHandle$$($1_Type)s.java
  40 
  41   ifneq ($$(findstring $$($1_Type), Object Boolean Byte Short Char Int Long), )
  42     $1_ARGS += -KCAS
  43   endif
  44 
  45   ifneq ($$(findstring $$($1_Type), Byte Short Char Int Long), )
  46     $1_ARGS += -KAtomicAdd
  47   endif
  48 
  49   ifneq ($$(findstring $$($1_Type), Byte Short Char), )
  50     $1_ARGS += -KShorterThanInt
  51   endif
  52 
  53   $$($1_FILENAME): $(VARHANDLES_SRC_DIR)/X-VarHandle.java.template $(BUILD_TOOLS_JDK)
  54         ifeq ($$($1_Type), Object)
  55           $$(eval $1_type := $$($1_Type))
  56         else
  57           $$(eval $1_type := $$$$(shell $(TR) '[:upper:]' '[:lower:]' <<< $$$$($1_Type)))
  58         endif
  59         $$(call MakeDir, $$(@D))
  60         $(TOOL_SPP) -nel -K$$($1_type) -Dtype=$$($1_type) -DType=$$($1_Type) \
  61             $$($1_ARGS) < $$< > $$@
  62 
  63   GENSRC_VARHANDLES += $$($1_FILENAME)
  64 endef
  65 
  66 ################################################################################
  67 
  68 ################################################################################
  69 # Setup a rule for generating a VarHandleByteArray java class
  70 # Param 1 - Variable declaration prefix


< prev index next >