GCC Wikia
ページの編集
警告: ログインしていません。編集を行うと、あなたの IP アドレスが公開されます。ログインまたはアカウントを作成すれば、あなたの編集はその利用者名とともに表示されるほか、その他の利点もあります。

この編集を取り消せます。 下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を公開して取り消しを完了してください。

最新版 編集中の文章
1行目: 1行目:
  +
{{header}}
 
  +
== このページを編集する際は,[[編集に関する方針]]に従ってください. ==
   
 
== 概要 ==
 
== 概要 ==
 
*[[gcc-4.1.0/gcc/toplev.c]]にて定義
 
*[[gcc-4.1.0/gcc/toplev.c]]にて定義
*言語に固有の初期化.
+
* 言語に固有の初期化.
   
<code>
 
 
1828 /* Language-dependent initialization. Returns nonzero on success. */
 
1828 /* Language-dependent initialization. Returns nonzero on success. */
</code>
 
   
 
== 実装 ==
 
== 実装 ==
 
<code>
 
<code>
  +
 
1829 static int
 
1829 static int
 
1830 lang_dependent_init (const char *name)
 
1830 lang_dependent_init (const char *name)
 
1831 {
 
1831 {
1832 [[location_t]] save_loc = [[input_location]];
+
1832 location_t save_loc = input_location;
1833 if ([[dump_base_name]] == 0)
+
1833 if (dump_base_name == 0)
1834 [[dump_base_name]] = name && name[0] ? name : "gccdump";
+
1834 dump_base_name = name && name[0] ? name : "gccdump";
 
1835
 
1835
1836 /* Other front-end initialization. */
+
1836 /* Other front-end initialization. */
1837 #ifdef [[USE_MAPPED_LOCATION]]
+
1837 #ifdef USE_MAPPED_LOCATION
1838 [[input_location]] = [[BUILTINS_LOCATION]];
+
1838 input_location = BUILTINS_LOCATION;
 
1839 #else
 
1839 #else
1840 [[input_filename]] = "<built-in>";
+
1840 input_filename = "<built-in>";
1841 [[input_line]] = 0;
+
1841 input_line = 0;
 
1842 #endif
 
1842 #endif
</code>
 
* 結局,回りまわって define されているだけで,lang_hooks.init() は、Cでは[[c_objc_common_init]] () を呼び出しているのと同じ.様々な言語に対応するために,非常に抽象的になっていて,まわりくどい.
 
**新しいfrontend たとえばbl(bl language)ではbl_init()をcのコードを触らずによびだせる功罪もある。
 
 
 
 
* 結局,回りまわって define されているだけで,lang_hooks.init() は,c_objc_common_init () を呼び出しているのと同じ.様々な言語に対応するために,非常に抽象的になっていて,まわりくどい.
参考サイト : https://www.codeblog.org/blog/ssato/20060304.html
 
  +
<code>
 
 
参考サイト : https://www.codeblog.org/blog/ssato/20060304.html
1843 if ([[lang_hooks]].init () == 0)
 
  +
 
1843 if (lang_hooks.init () == 0)
 
1844 return 0;
 
1844 return 0;
1845 [[input_location]] = save_loc;
+
1845 input_location = save_loc;
 
1846
 
1846
1847 [[init_asm_output]] (name);
+
1847 init_asm_output (name);
 
1848
 
1848
1849 /* These create various _DECL nodes, so need to be called after the
+
1849 /* These create various _DECL nodes, so need to be called after the
1850 front end is initialized. */
+
1850 front end is initialized. */
1851 [[init_eh]] ();
+
1851 init_eh ();
1852 [[init_optabs]] ();
+
1852 init_optabs ();
 
1853
 
1853
1854 /* The following initialization functions need to generate rtl, so
+
1854 /* The following initialization functions need to generate rtl, so
1855 provide a dummy function context for them. */
+
1855 provide a dummy function context for them. */
1856 [[init_dummy_function_start]] ();
+
1856 init_dummy_function_start ();
1857 [[init_expr_once]] ();
+
1857 init_expr_once ();
1858 [[expand_dummy_function_end]] ();
+
1858 expand_dummy_function_end ();
 
1859
 
1859
1860 /* If dbx symbol table desired, initialize writing it and output the
+
1860 /* If dbx symbol table desired, initialize writing it and output the
1861 predefined types. */
+
1861 predefined types. */
1862 [[timevar_push]] ([[TV_SYMOUT]]);
+
1862 timevar_push (TV_SYMOUT);
 
1863
 
1863
1864 #if defined [[DWARF2_DEBUGGING_INFO]] || defined [[DWARF2_UNWIND_INFO]]
+
1864 #if defined DWARF2_DEBUGGING_INFO || defined DWARF2_UNWIND_INFO
1865 if ([[dwarf2out_do_frame]] ())
+
1865 if (dwarf2out_do_frame ())
1866 [[dwarf2out_frame_init]] ();
+
1866 dwarf2out_frame_init ();
 
1867 #endif
 
1867 #endif
 
1868
 
1868
 
1869 /* Now we have the correct original filename, we can initialize
 
1869 /* Now we have the correct original filename, we can initialize
 
1870 debug output. */
 
1870 debug output. */
1871 (*[[debug_hooks]]->init) (name);
+
1871 (*debug_hooks->init) (name);
 
1872
 
1872
1873 [[timevar_pop]] ([[TV_SYMOUT]]);
+
1873 timevar_pop (TV_SYMOUT);
 
1874
 
1874
 
1875 return 1;
 
1875 return 1;
 
1876 }
 
1876 }
  +
 
</code>
 
</code>
   
  +
{{related}}
 
  +
[[特別:Whatlinkshere/Tree|{{int:Whatlinkshere}}]]
GCC Wikiaへの投稿はすべて、「CC-BY-SA」に従って公開されるものとしてみなされます
キャンセル 編集の仕方 (新しいウィンドウで開きます)

このページで使用されているテンプレート: