Ignore:
Timestamp:
Apr 5, 2019, 9:26:53 PM (5 years ago)
Author:
coas-nagasima
Message:

mbed関連を更新
シリアルドライバをmbedのHALを使うよう変更
ファイルディスクリプタの処理を更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asp3_tinet_ecnl_arm/trunk/asp3_dcre/tecsgen/tecslib/core/componentobj.rb

    r352 r374  
    44#      Generator for TOPPERS Embedded Component System
    55
    6 #   Copyright (C) 2008-2017 by TOPPERS Project
     6#   Copyright (C) 2008-2019 by TOPPERS Project
    77#--
    88#   上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    149149    end
    150150
    151     set_descriptor_list
     151    # set_descriptor_list ##
    152152
    153153    if @generate then
     
    364364  end
    365365
     366  @@set_descriptor_list = {}
     367  def self.set_descriptor_list
     368    Namespace.get_root.travers_all_signature{ |sig|
     369      if @@set_descriptor_list[ sig ] == nil then
     370        @@set_descriptor_list[ sig ] = true
     371        sig.set_descriptor_list
     372      end
     373    }
     374  end
     375
    366376  #== Signature# 引数で参照されている Descriptor 型のリストを作成する
    367377  def set_descriptor_list
     
    538548# @ct_factory_list::    Factory[] :    celltype factory
    539549# @cell_list:: Cell[] : 定義のみ (V1.0.0.2 以降)
     550# @ordered_cell_list:: Cell[] : ID 順に順序付けされたセルリスト、最適化以降有効 (リンク単位ごとに生成されなおす)
    540551# @singleton:: bool
    541552# @idx_is_id:: bool
    542553# @idx_is_id_act:: bool: actual value
     554# @b_need_ptab:: bool: true if having cells in multi-domain
    543555# @active:: bool
    544556# @b_reuse:: bool :  reuse 指定されて import された(template 不要)
     
    654666    if $idx_is_id then
    655667      @idx_is_id = true
     668      @idx_is_id_act = true
     669      @b_need_ptab = true
    656670    else
    657671      @idx_is_id = false
    658     end
    659     @idx_is_id_act = @idx_is_id
     672      @idx_is_id_act = false
     673      @b_need_ptab = false
     674    end
    660675
    661676    Namespace.new_celltype( self )
     
    700715    end
    701716
    702     check_dynamic_join
     717    # check_dynamic_join ##
    703718
    704719    @@current_object = nil
     
    886901        @idx_is_id = true
    887902        @idx_is_id_act = true
     903        @b_need_ptab = true
    888904      when :ACTIVE
    889905        @active = true
     
    899915    if @singleton then
    900916      @idx_is_id_act = false
     917      @b_need_ptab = false
    901918    end
    902919  end
     
    9991016  end
    10001017
     1018  @@dynamic_join_checked_list = {}
     1019  def self.check_dynamic_join
     1020    Namespace.get_root.travers_all_celltype{ |ct|
     1021      if @@dynamic_join_checked_list[ ct ] == nil then
     1022        @@dynamic_join_checked_list[ ct ] = true
     1023        ct.check_dynamic_join
     1024      end
     1025    }
     1026  end
     1027
    10011028  #=== Celltype#dynamic の適合性チェック
    10021029  def check_dynamic_join
     1030    return if ! $verbose
    10031031    @port.each{ |port|
    10041032      signature = port.get_signature
     
    10381066              end
    10391067            end
    1040             cdl_warning( 'W9999 "$1" cannot handle Descriptor "$2" infromation for port "$3"', @name, param.get_name, port.get_name )
     1068            cdl_warning( 'W9999 "$1" cannot handle Descriptor "$2" information for port "$3"', @name, param.get_name, port.get_name )
    10411069          }
    10421070        end
     
    11431171  #     呼び口(ただし、最適化で不要となるものは除く)
    11441172  def has_INIB?
    1145 #    print "name=#{@name} @n_attribute_ro=#{@n_attribute_ro}  @n_var_size_is=#{@n_var_size_is} @n_call_port=#{@n_call_port} @n_call_port_omitted_in_CB=#{@n_call_port_omitted_in_CB} @n_entry_port_array_ns=#{@n_entry_port_array_ns}\n"
    1146     return $rom &&
    1147       (@n_attribute_ro > 0 ||
    1148        @n_var_size_is > 0 ||
    1149        ( @n_call_port - @n_call_port_omitted_in_CB - (@n_call_port_dynamic-@n_call_port_array_dynamic) ) > 0 ||
    1150        $ram_initializer && @n_call_port_dynamic ||
    1151        @n_entry_port_array_ns > 0)
    1152 #    return $rom && (@n_attribute_ro > 0 || ( @n_call_port - @n_call_port_omitted_in_CB ) > 0)
     1173
     1174    result = $rom &&
     1175             (@n_attribute_ro > 0 ||
     1176              @n_var_size_is > 0 ||
     1177              ( @n_call_port - @n_call_port_omitted_in_CB - (@n_call_port_dynamic-@n_call_port_array_dynamic) ) > 0 ||
     1178              $ram_initializer && @n_call_port_dynamic > 0 ||
     1179              @n_entry_port_array_ns > 0)
     1180    # print "name=#{@name} n_attribute_ro=#{@n_attribute_ro}  n_var_size_is=#{@n_var_size_is} n_call_port=#{@n_call_port} n_call_port_omitted_in_CB=#{@n_call_port_omitted_in_CB} n_call_port_dynamic=#{@n_call_port_dynamic} n_call_port_array_dynamic=#{@n_call_port_array_dynamic} n_entry_port_array_ns=#{@n_entry_port_array_ns} has_INIB?=#{result}\n"
     1181
     1182    return result
    11531183  end
    11541184
     
    12311261  def idx_is_id_act?
    12321262    @idx_is_id_act
     1263  end
     1264
     1265  def multi_domain?
     1266    @b_need_ptab
    12331267  end
    12341268
     
    13531387#                                               逆require ポートに対して複数の結合がないかチェックする
    13541388# @generate:: [ Symbol, String, Plugin ]  = [ PluginName, option, Plugin ] Plugin は生成後に追加される
     1389# @b_post_code_generated:: Bool: true if generated in tmp_plugin_post_code.cdl
    13551390#
    13561391# composite のためインスタンス変数
     
    13751410# @id:: Integer : コード生成直前に設定  (プロトタイプ宣言の場合は -1 のまま放置)
    13761411# @id_specified::Integer : 指定された id
    1377 # @restrict_list::{ entry_name => { func_name, [ region_name, ... ] } }
     1412# @restrict_list::{ entry_name => { func_name, [ region_path_str, ... ] } }
     1413# @restrict_list2::{ entry_name => { func_name, [ domain_root_region, ... ] } }
     1414# @b_restrict_referenced::Bool: restrict_list が参照れた
    13781415
    13791416=begin
     
    14591496    @referenced_port_list = {}
    14601497    @restrict_list = {}
     1498    @restrict_list2 = {}
     1499    @b_restrict_referenced = false
     1500    @b_post_code_generated = false
    14611501
    14621502    @cell_list = {}
     
    18021842      # f_def == true の場合 new_def で、呼出される
    18031843      set_specifier_list( Generator.get_statement_specifier )
     1844    end
     1845    if TECSGEN.post_coded?
     1846      @b_post_code_generated = true
    18041847    end
    18051848    set_f_def f_def
     
    21332176  end
    21342177
     2178  #=== Cell# composite のセルか?
     2179  def is_of_composite?
     2180    if @celltype.kind_of? CompositeCelltype
     2181      return true
     2182    else
     2183      return false
     2184    end
     2185  end
     2186
     2187  #=== Cell# tmp_plugin_post_code.cdl で生成されたセルか?
     2188  def post_code_generated?
     2189    @b_post_code_generated
     2190  end
     2191
    21352192  # composite cell の port に対応する内部の cell の port の名前(リンク時に必要な名前)
    21362193  def get_real_global_name port_name
     
    22202277
    22212278      # セルタイプ内で port_name の CompositeCelltypeJoin を探す(コード生成段階では必ず見つかる)
     2279      # print "get_real_cell: cell=#{@name} port=#{port_name}\n"
     2280      # pp @cell_list
    22222281      cj = @celltype.find_export( port_name )
    22232282
     
    22312290  end
    22322291
     2292  #=== Cell#get_real_celltype
     2293  #
     2294  def get_real_celltype( port_name )
     2295    if @celltype.instance_of?( CompositeCelltype ) then
     2296      return @celltype.get_real_celltype port_name
     2297    else
     2298      return @celltype
     2299    end
     2300  end
    22332301
    22342302  #=== Cell# 受け口のport の参照カウントをアップする
     
    22712339      return "#{@global_name}_#{port_name}"
    22722340    end
     2341  end
     2342
     2343  #Cell#属性の初期値を得る
     2344  #attr_name::Symbol  必ず初期化されていないと Ruby 例外となる
     2345  def get_attr_initializer attr_name
     2346    val = @join_list.get_item( attr_name )
     2347    if val == nil then
     2348      val = (@celltype.find  attr_name).get_initializer
     2349    else
     2350      val = val.get_rhs
     2351    end
     2352    return val
    22732353  end
    22742354
     
    25212601        else
    25222602          cell = j.get_rhs_cell2
    2523           next if cell == nil     # 右辺が見つからなかった.既にエラー
     2603          next if cell == nil || cell.get_celltype == nil     # 右辺が見つからなかった.既にエラー
    25242604          port = cell.get_celltype.find( j.get_rhs_port2 )
     2605          if port == nil then
     2606            dbgPrint "set_port_ref: #{@name}.#{j.get_name} = #{cell.get_name}.#{j.get_rhs_port2}\n"
     2607            # through プラグインで生成されたセルの受け口が見つからないケース (のハズ)
     2608            cdl_error( "entry '$1' not found in '$2' refered from $3.$4", j.get_rhs_port2, cell.get_name, @name, j.get_name )
     2609            next
     2610          end
    25252611          dbgPrint( "set_port_reference_count: #{@name}.#{j.get_name} => #{cell.get_name}.#{port.get_name}\n")
    25262612          cell.port_referenced port
     
    29673053  #=== Cell#restrict を追加
    29683054  def add_restrict( entry_name, func_name, region_name_list )
    2969     if @restrict_list[ entry_name ] then
    2970       if @restrict_list[ entry_name ][ func_name ] then
    2971         @restrict_list[ entry_name ][ func_name ].each{ |rn|
    2972           if region_name_list.include? rn then
    2973             # p func_name
    2974             name = func_name ? entry_name : entry_name+"."+func_name
    2975             cdl_warning( "W9999 $1 restrict region duplicate $2", name, rn )
     3055    if @restrict_list[ entry_name ] == nil then
     3056      @restrict_list[ entry_name ] = {}
     3057      @restrict_list2[ entry_name ] = {}
     3058    end
     3059    if @restrict_list[ entry_name ][ func_name ] == nil then
     3060      @restrict_list[ entry_name ][ func_name ] = []
     3061      @restrict_list2[ entry_name ][ func_name ] = []
     3062    end
     3063    region_name_list.each { |rp|
     3064      @restrict_list[ entry_name ][ func_name ] << rp
     3065      # p "Class: " + rp.to_s
     3066      obj = Namespace.find rp
     3067      if ( obj.kind_of? Region ) then
     3068        @restrict_list2[ entry_name ][ func_name ] << obj.get_domain_root
     3069      else
     3070        cdl_error( "S9999 $1 not found or not region", rp.to_s )
     3071      end
     3072    }
     3073  end
     3074
     3075  #=== Cell#check_restrict_list
     3076  def check_restrict_list
     3077    # p "check_restrict_list"
     3078    @restrict_list.each{ |entry_name, func_hash|
     3079      func_hash.each{ |func_name, region_list|
     3080        region_list.each{ |rp|
     3081          obj = Namespace.find rp
     3082          if ( obj.kind_of? Region ) then
     3083            if obj.get_domain_root != @region.get_domain_root then
     3084            else
     3085              cdl_info( "I9999 $1: restrict calling domain to $2, which is same domain as the cell locates", @name, rp.to_s )
     3086              # restrict を同じドメインを指定してもよいこととする (HRP3)
     3087              # KernelDoamin 内のセルに対し、KernelDomain に restrict している場合、
     3088              # 無所属経由で結合されているが、KernelDomain から呼出すことを想定した許可
     3089            end
     3090          else
     3091            cdl_error( "S9999 $1 not region", rp.to_s )
     3092          end
     3093        }
     3094      }
     3095    }
     3096  end
     3097
     3098  #=== Cell#callable?
     3099  def callable?( callee_cell, entry_name, func_name )
     3100    # p "callable? #{@name}"
     3101    res = callee_cell.callable_from?( entry_name, func_name, self )
     3102    dbgPrint "callable? #{callee_cell.get_namespace_path}.#{entry_name}.#{func_name} from #{@NamespacePath} is #{res}\n"
     3103    return res
     3104  end
     3105
     3106  #=== Cell#callable_from? (private)
     3107  def callable_from?( entry_name, func_name, caller_cell )
     3108    @b_restrict_referenced = true
     3109    if @restrict_list.length == 0 then
     3110      return true
     3111    end
     3112
     3113    dr = caller_cell.get_region.get_domain_root
     3114    if @restrict_list[entry_name] then
     3115      if @restrict_list[entry_name][func_name] then
     3116        @restrict_list2[entry_name][func_name].each{ |region|
     3117          if dr == region then
     3118            return true
     3119          end
     3120        }
     3121      elsif @restrict_list[entry_name][nil] then
     3122        @restrict_list2[entry_name][nil].each{ |region|
     3123          if dr == region then
     3124            return true
    29763125          end
    29773126        }
    29783127      else
    2979         @restrict_list[ entry_name ][ func_name ] = region_name_list
    2980       end
    2981     else
    2982       func_list = { }
    2983       func_list[ func_name ] = region_name_list
    2984       @restrict_list[ entry_name ] = func_list
    2985     end
    2986     # pp @restrict_list
    2987   end
    2988 
    2989   #=== Cell#check_restrict_list
    2990   def check_restrict_list
    2991     @restrict_list.each{ |entry_name, func_hash|
    2992       func_hash.each{ |func_name, region_list|
    2993         region_list.each{ |rn|
    2994           obj = Namespace.find [ rn ]
    2995           if ( obj.kind_of? Region ) then
    2996             if obj.get_domain_root != @region.get_domain_root then
    2997             else
    2998               cdl_warning( "W9999 $1 in same domain", rn )
    2999             end
    3000           else
    3001             cdl_error( "S9999 $1 not region", region )
    3002           end
    3003         }
    3004       }
    3005     }
    3006   end
    3007 
    3008   #=== Cell#callable?
    3009   def callable?( callee_cell, entry_name, func_name )
    3010     res = callee_cell.callable_from?( entry_name, func_name, self )
    3011     dbgPrint "callable? #{callee_cell.get_namespace_path}.#{entry_name}.#{func_name} from #{@NamespacePath} is #{res}\n"
    3012     return res
    3013   end
    3014 
    3015   #=== Cell#callable_from? (private)
    3016   def callable_from?( entry_name, func_name, caller_cell )
    3017     if @restrict_list.length == 0 then
     3128        return false
     3129      end
     3130    else
     3131      return false
     3132    end
     3133  end
     3134
     3135  #=== Cell#get_callable_regions( entry_name, func_name )
     3136  # func_name=nil の場合、entry_name の可否をチェック数る
     3137  # nil が返る場合、制限されていないことを意味する
     3138  def get_restricted_regions( entry_name, func_name )
     3139    # p "get_restricted_regions #{@name}"
     3140    @b_restrict_referenced = true
     3141    if @restrict_list[entry_name] then
     3142      if @restrict_list[entry_name][func_name] then
     3143        return @restrict_list2[entry_name][func_name]
     3144      else
     3145        return @restrict_list2[entry_name][nil]
     3146      end
     3147    end
     3148    return nil
     3149  end
     3150
     3151  #=== Cell#has_ineffective_restrict_specifier
     3152  # restrict 指定子が指定されていて、参照されていない場合 true
     3153  # 参照は、HRPSVCPlugin のみ
     3154  def has_ineffective_restrict_specifier
     3155    if @restrict_list.length != 0 && @b_restrict_referenced == false then
    30183156      return true
    3019     end
    3020 
    3021     if @restrict_list[entry_name] then
    3022       if @restrict_list[entry_name][nil] &&
    3023          @restrict_list[entry_name][nil].include?( caller_cell.get_region.get_domain_root.get_name )then
    3024         return true
    3025       end
    3026       if @restrict_list[entry_name][func_name] &&
    3027          @restrict_list[entry_name][func_name].include?( caller_cell.get_region.get_domain_root.get_name )then
    3028         return true
    3029       else
    3030         return false
    3031       end
    3032     else
    3033       return true
    3034     end
    3035   end
    3036  
     3157    else
     3158      return false
     3159    end
     3160  end
     3161
    30373162  def show_tree( indent )
    30383163    indent.times { print "  " }
     
    37103835  end
    37113836
     3837  def get_global_name
     3838    @global_name
     3839  end
     3840
    37123841  def get_port_list
    37133842    @port_list
     
    37243853  def get_internal_allocator_list
    37253854    @internal_allocator_list
     3855  end
     3856
     3857  #== CompositeCelltype#get_real_celltype
     3858  # port_name に接続されている内部のセルタイプを得る
     3859  def get_real_celltype( port_name )
     3860    cj = find_export port_name
     3861    inner_celltype = cj.get_cell.get_celltype
     3862    if inner_celltype.instance_of? CompositeCelltype then
     3863      return inner_celltype.get_real_celltype
     3864    else
     3865      return inner_celltype
     3866    end
    37263867  end
    37273868
     
    39374078    else
    39384079      # entry port optimize
    3939       if $unopt then
     4080      if $unopt || $unopt_entry then
    39404081        # 最適化なし
    39414082        @b_VMT_useless = false                     # VMT 不要 (true の時 VMT を介することなく呼出す)
     
    42614402
    42624403  def is_VMT_useless?                     # VMT 関数テーブルを使用しない
    4263    @b_VMT_useless
     4404    if @port_type == :ENTRY && $unopt_entry == true then
     4405      # プラグインから $unopt_entry を設定するケースのため
     4406      # ここで読み出すときに、false を返す (reset_optimize での設定変更は速すぎる)
     4407      return false
     4408    else
     4409      return @b_VMT_useless
     4410    end
    42644411  end
    42654412
    42664413  def is_skelton_useless?                 # スケルトン関数不要   (true の時、受け口関数を呼出す)
    4267     @b_skelton_useless
     4414    if @port_type == :ENTRY && $unopt_entry == true then
     4415      # プラグインから $unopt_entry を設定するケースのため
     4416      # ここで読み出すときに、false を返す (reset_optimize での設定変更は速すぎる)
     4417      return false
     4418    else
     4419      return @b_skelton_useless
     4420    end
    42684421  end
    42694422
     
    48024955      if ! c.get_f_def then   # Namespace の @cell_list にはプロトタイプが含まれるケースあり
    48034956        if c.get_f_ref then
    4804           cdl_error( "S1093 $1 : undefined cell" , c.get_namespace_path.get_path_str )
     4957          c.cdl_error( "S1093 $1 : undefined cell" , c.get_namespace_path.get_path_str )
    48054958        elsif $verbose then
    4806           cdl_warning( "W1006 $1 : only prototype, unused and undefined cell" , c.get_namespace_path.get_path_str )
     4959          c.cdl_warning( "W1006 $1 : only prototype, unused and undefined cell" , c.get_namespace_path.get_path_str )
    48074960        end
    48084961      else
     
    48114964        # if c.get_f_ref == false && c.is_generate? && ct && ct.is_inactive? then
    48124965        if c.get_f_ref == false && ct && ct.is_inactive? then
    4813           cdl_warning( "W1007 $1 : non-active cell has no entry join and no factory" , c.get_namespace_path.get_path_str )
     4966          c.cdl_warning( "W1007 $1 : non-active cell has no entry join and no factory" , c.get_namespace_path.get_path_str )
     4967        end
     4968        if c.has_ineffective_restrict_specifier then
     4969          c.cdl_warning( "W9999: $1 has ineffective restrict specifier", c.get_namespace_path.get_path_str )
    48144970        end
    48154971      end
     
    50065162  end
    50075163
     5164  #== Namespace (Region) に属するセルのリスト
     5165  def get_cell_list
     5166    @cell_list
     5167  end
     5168
     5169  #== Namespace (Region)# 子リージョンのリスト
     5170  #
     5171  # リージョンは Namespace クラスで namespace として記憶されている
     5172  def get_region_list
     5173    @namespace_list
     5174  end
     5175 
    50085176  def show_tree( indent )
    50095177    indent.times { print "  " }
     
    56025770          next_cell_nsp       = @through_generated_list[ i + 1 ].get_cell_namespace_path
    56035771          next_port_name      = @through_generated_list[ i + 1 ].get_through_entry_port_name
     5772          next_port_subscript = @through_generated_list[ i + 1 ].get_through_entry_port_subscript
    56045773        rescue Exception => evar
    56055774          cdl_error( "S1124 $1: plugin function failed: \'get_through_entry_port_name\'" , plugin_name )
     
    56205789        next_cell      = @cell
    56215790        next_port_name = @port_name
     5791        next_port_subscript = @rhs_subscript
    56225792
    56235793        if next_cell == nil then
     
    56315801        # region から @cell_name.@port_name への through がないか探す
    56325802        # rp = @through_list[i][3].find_cell_port_through_plugin( @cell_name, @port_name ) #762
    5633         rp = @through_list[i][3].find_cell_port_through_plugin( @cell.get_global_name, @port_name )
     5803        rp = @through_list[i][3].find_cell_port_through_plugin( @cell.get_global_name, @port_name, @rhs_subscript )
    56345804           # @through_list[i] と @region_through_list[i-cp_len] は同じ
    56355805        # 共用しないようにするには、見つからなかったことにすればよい
     
    56445814        plClass = load_plugin( plugin_name, ThroughPlugin )
    56455815        if( plClass ) then
    5646           gen_through_cell_code_and_parse( plugin_name, i, next_cell, next_port_name, plClass )
     5816          gen_through_cell_code_and_parse( plugin_name, i, next_cell, next_port_name, next_port_subscript, plClass )
    56475817        end
    56485818      else
     
    56575827          # 生成したものを region(@through_list[i][3]) のリストに追加
    56585828          # @through_list[i][3].add_cell_port_through_plugin( @cell_name, @port_name, @through_generated_list[i] ) #762
    5659           @through_list[i][3].add_cell_port_through_plugin( @cell.get_global_name, @port_name, @through_generated_list[i] )
     5829          @through_list[i][3].add_cell_port_through_plugin( @cell.get_global_name, @port_name, @rhs_subscript, @through_generated_list[i] )
    56605830        end
    56615831      end
     
    56915861
    56925862  #=== Join# through プラグインを呼び出して CDL 生成させるとともに、import する
    5693   def gen_through_cell_code_and_parse( plugin_name, i, next_cell, next_port_name, plClass )
     5863  def gen_through_cell_code_and_parse( plugin_name, i, next_cell, next_port_name, next_port_subscript, plClass )
    56945864
    56955865    through = @through_list[ i ]
     
    57185888
    57195889    begin
    5720       plugin_object = plClass.new( "#{generating_cell_name}".to_sym, plugin_arg.to_s, next_cell, "#{next_port_name}".to_sym, @definition.get_signature, @celltype, caller_cell )
     5890      plugin_object = plClass.new( generating_cell_name.to_sym, plugin_arg.to_s,
     5891                                   next_cell, next_port_name.to_sym, next_port_subscript,
     5892                                   @definition.get_signature, @celltype, caller_cell )
    57215893      plugin_object.set_locale @locale
    57225894    rescue Exception => evar
     
    59136085  end
    59146086
    5915   def get_rhs_subscript
     6087  # 末尾数字1 : CDL で指定された、右辺のセルを返す
     6088  def get_rhs_cell1   # get_cell と同じ
     6089    @cell
     6090  end
     6091  def get_rhs_port1   # get_port_name 同じ
     6092    @port_name
     6093  end
     6094  def get_rhs_subscript1
    59166095    @rhs_subscript
    59176096  end
     
    59236102    # through 指定あり?
    59246103    if @through_list[0] then
    5925       # mikan through で生成したものが root namespace 限定
    59266104      # through で生成されたセルを探す
    5927 #      cell = Namespace.find( [ "::", @through_generated_list[0].get_cell_name.to_sym ] )    #1
    59286105      cell = Namespace.find( @through_generated_list[0].get_cell_namespace_path )    #1
    59296106      # cell のプラグインで生成されたポート名のポートを探す (composite なら内部の繋がるポート)
     
    59326109      # ポートを返す(composite なら内部の繋がるポートを返す)
    59336110      return @cell.get_real_port( @port_name )
     6111    end
     6112  end
     6113
     6114  #=== Join# 右辺の配列添数を得る
     6115  #    右辺が through の場合は挿入されたセルの添数
     6116  #    右辺が composite の場合は、内部の繋がるセルのポートの添数 (composite では変わらない)
     6117  #    このメソッドは get_rhs_cell,  と対になっている
     6118  def get_rhs_subscript
     6119    if @through_list[0] then
     6120      return @through_generated_list[0].get_through_entry_port_subscript
     6121    else
     6122      return @rhs_subscript
    59346123    end
    59356124  end
     
    65696758end
    65706759
    6571 #== Domain
     6760#== DomainType
    65726761#
    65736762# region の domain を記憶するクラス
     
    66086797      return if pluginClass == nil
    66096798      @plugin = pluginClass.new( @region, @name, @option )
     6799      @plugin.set_locale @locale
    66106800    end
    66116801  end
     
    66256815  end
    66266816
    6627   #== Domain リージョンの Hash を得る
     6817  #== DomainType リージョンの Hash を得る
    66286818  # @@domain_regions の説明参照
    66296819  def self.get_domain_regions
     
    66376827  def get_option
    66386828    @option
     6829  end
     6830
     6831  #== DomainType#ドメイン種別を得る
     6832  #return::Symbol :kernel, :user, :OutOfDomain
     6833  def get_kind
     6834    @plugin.get_kind
    66396835  end
    66406836
     
    66986894
    66996895    if @@domain_name then
     6896      dbgPrint "Region=#{name} domain_type=#{@@domain_name} option=#{@@domain_option}\n"
    67006897      domain_option = CDLString.remove_dquote @@domain_option.to_s
    67016898      @domain_type = DomainType.new( self, @@domain_name, domain_option )
     
    69467143  end
    69477144
     7145  #== Region# ルートリージョン
     7146  # ルートリージョンは、namespace のルートと同じインスタンス
     7147  def selfget_root
     7148    Namespace.get_root
     7149  end
     7150
    69487151  def next_in_through_count
    69497152    @in_through_count += 1
     
    69797182  #=== Region# through プラグインで、この region から cell_name.port_name へのプラグインオブジェクトを登録
    69807183  # mikan namesppace 対応 (cell_name)
    6981   def add_cell_port_through_plugin( cell_name, port_name, through_plugin_object )
    6982     @cell_port_throug_plugin_list[ "#{cell_name}.#{port_name}" ] = through_plugin_object
    6983   end
    6984 
    6985   def find_cell_port_through_plugin( cell_name, port_name )
    6986     return @cell_port_throug_plugin_list[ "#{cell_name}.#{port_name}" ]
     7184  def add_cell_port_through_plugin( cell_name, port_name, subscript, through_plugin_object )
     7185    if subscript then
     7186      subscript = '[' + subscript.to_s + ']'
     7187    end
     7188    @cell_port_throug_plugin_list[ "#{cell_name}.#{port_name}#{subscript}" ] = through_plugin_object
     7189  end
     7190
     7191  def find_cell_port_through_plugin( cell_name, port_name, subscript )
     7192    if subscript then
     7193      subscript = '[' + subscript.to_s + ']'
     7194    end
     7195    return @cell_port_throug_plugin_list[ "#{cell_name}.#{port_name}#{subscript}" ]
    69877196  end
    69887197
Note: See TracChangeset for help on using the changeset viewer.