BUILD 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. package(default_visibility = ["//explorer:__pkg__"])
  5. cc_library(
  6. name = "action",
  7. srcs = [
  8. "action.cpp",
  9. ],
  10. hdrs = [
  11. "action.h",
  12. ],
  13. deps = [
  14. ":dictionary",
  15. ":heap_allocation_interface",
  16. ":stack",
  17. "//common:check",
  18. "//common:error",
  19. "//common:ostream",
  20. "//explorer/ast",
  21. "//explorer/common:arena",
  22. "//explorer/common:error_builders",
  23. "//explorer/common:nonnull",
  24. "@llvm-project//llvm:Support",
  25. ],
  26. )
  27. cc_library(
  28. name = "action_stack",
  29. srcs = [
  30. "action_stack.cpp",
  31. ],
  32. hdrs = [
  33. "action_stack.h",
  34. ],
  35. deps = [
  36. ":action",
  37. ":stack",
  38. "//common:check",
  39. "//common:error",
  40. "//common:ostream",
  41. "//explorer/ast",
  42. "@llvm-project//llvm:Support",
  43. ],
  44. )
  45. cc_library(
  46. name = "dictionary",
  47. hdrs = ["dictionary.h"],
  48. deps = ["//explorer/common:arena"],
  49. )
  50. cc_library(
  51. name = "exec_program",
  52. srcs = ["exec_program.cpp"],
  53. hdrs = ["exec_program.h"],
  54. visibility = [
  55. "//explorer:__pkg__",
  56. "//explorer/fuzzing:__pkg__",
  57. ],
  58. deps = [
  59. ":interpreter",
  60. ":resolve_control_flow",
  61. ":resolve_names",
  62. ":resolve_unformed",
  63. ":trace_stream",
  64. ":type_checker",
  65. "//common:check",
  66. "//common:ostream",
  67. "//explorer/ast",
  68. "//explorer/common:arena",
  69. "@llvm-project//llvm:Support",
  70. ],
  71. )
  72. cc_library(
  73. name = "heap",
  74. srcs = ["heap.cpp"],
  75. hdrs = ["heap.h"],
  76. deps = [
  77. ":action",
  78. ":heap_allocation_interface",
  79. "//common:ostream",
  80. "//explorer/ast",
  81. "//explorer/common:error_builders",
  82. "//explorer/common:nonnull",
  83. "//explorer/common:source_location",
  84. "@llvm-project//llvm:Support",
  85. ],
  86. )
  87. cc_library(
  88. name = "heap_allocation_interface",
  89. hdrs = ["heap_allocation_interface.h"],
  90. deps = [
  91. "//explorer/ast",
  92. "//explorer/common:arena",
  93. "//explorer/common:nonnull",
  94. ],
  95. )
  96. cc_library(
  97. name = "interpreter",
  98. srcs = [
  99. "interpreter.cpp",
  100. ],
  101. hdrs = [
  102. "interpreter.h",
  103. ],
  104. deps = [
  105. ":action",
  106. ":action_stack",
  107. ":heap",
  108. ":stack",
  109. ":trace_stream",
  110. "//common:check",
  111. "//common:error",
  112. "//common:ostream",
  113. "//explorer/ast",
  114. "//explorer/common:arena",
  115. "//explorer/common:error_builders",
  116. "//explorer/common:source_location",
  117. "@llvm-project//llvm:Support",
  118. ],
  119. )
  120. cc_library(
  121. name = "resolve_control_flow",
  122. srcs = ["resolve_control_flow.cpp"],
  123. hdrs = ["resolve_control_flow.h"],
  124. deps = [
  125. "//common:check",
  126. "//explorer/ast",
  127. "//explorer/common:error_builders",
  128. "//explorer/common:nonnull",
  129. "@llvm-project//llvm:Support",
  130. ],
  131. )
  132. cc_library(
  133. name = "resolve_names",
  134. srcs = ["resolve_names.cpp"],
  135. hdrs = ["resolve_names.h"],
  136. deps = [
  137. "//common:check",
  138. "//explorer/ast",
  139. "//explorer/ast:static_scope",
  140. "//explorer/common:arena",
  141. "@llvm-project//llvm:Support",
  142. ],
  143. )
  144. cc_library(
  145. name = "stack",
  146. hdrs = ["stack.h"],
  147. deps = ["//common:check"],
  148. )
  149. cc_library(
  150. name = "pattern_analysis",
  151. srcs = [
  152. "pattern_analysis.cpp",
  153. ],
  154. hdrs = [
  155. "pattern_analysis.h",
  156. ],
  157. deps = [
  158. ":action",
  159. "//common:error",
  160. "//explorer/ast",
  161. "//explorer/common:nonnull",
  162. "@llvm-project//llvm:Support",
  163. ],
  164. )
  165. cc_library(
  166. name = "trace_stream",
  167. hdrs = ["trace_stream.h"],
  168. visibility = [
  169. "//explorer:__pkg__",
  170. "//explorer/fuzzing:__pkg__",
  171. ],
  172. deps = [
  173. "//common:check",
  174. "//common:ostream",
  175. "//explorer/common:nonnull",
  176. ],
  177. )
  178. cc_library(
  179. name = "type_checker",
  180. srcs = [
  181. "builtins.cpp",
  182. "impl_scope.cpp",
  183. "matching_impl_set.cpp",
  184. "type_checker.cpp",
  185. ],
  186. hdrs = [
  187. "builtins.h",
  188. "impl_scope.h",
  189. "matching_impl_set.h",
  190. "type_checker.h",
  191. ],
  192. textual_hdrs = [
  193. "builtins.def",
  194. ],
  195. deps = [
  196. ":action",
  197. ":dictionary",
  198. ":interpreter",
  199. ":pattern_analysis",
  200. ":trace_stream",
  201. ":type_structure",
  202. "//common:check",
  203. "//common:enum_base",
  204. "//common:error",
  205. "//common:ostream",
  206. "//explorer/ast",
  207. "//explorer/common:arena",
  208. "//explorer/common:error_builders",
  209. "//explorer/common:nonnull",
  210. "//explorer/common:source_location",
  211. "@llvm-project//llvm:Support",
  212. ],
  213. )
  214. cc_library(
  215. name = "type_structure",
  216. srcs = [
  217. "type_structure.cpp",
  218. ],
  219. hdrs = [
  220. "type_structure.h",
  221. ],
  222. deps = [
  223. "//common:ostream",
  224. "//explorer/ast",
  225. "//explorer/common:nonnull",
  226. "@llvm-project//llvm:Support",
  227. ],
  228. )
  229. cc_library(
  230. name = "resolve_unformed",
  231. srcs = [
  232. "resolve_unformed.cpp",
  233. ],
  234. hdrs = [
  235. "resolve_unformed.h",
  236. ],
  237. deps = [
  238. "//common:check",
  239. "//explorer/ast",
  240. "//explorer/ast:static_scope",
  241. "//explorer/common:error_builders",
  242. "//explorer/common:nonnull",
  243. "@llvm-project//llvm:Support",
  244. ],
  245. )