BUILD 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  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/parse_and_execute:__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. deps = [
  55. ":interpreter",
  56. ":resolve_control_flow",
  57. ":resolve_names",
  58. ":resolve_unformed",
  59. ":type_checker",
  60. "//common:check",
  61. "//common:ostream",
  62. "//explorer/ast",
  63. "//explorer/common:arena",
  64. "//explorer/common:trace_stream",
  65. "@llvm-project//llvm:Support",
  66. ],
  67. )
  68. cc_library(
  69. name = "heap",
  70. srcs = ["heap.cpp"],
  71. hdrs = ["heap.h"],
  72. deps = [
  73. ":action",
  74. ":heap_allocation_interface",
  75. "//common:ostream",
  76. "//explorer/ast",
  77. "//explorer/common:error_builders",
  78. "//explorer/common:nonnull",
  79. "//explorer/common:source_location",
  80. "@llvm-project//llvm:Support",
  81. ],
  82. )
  83. cc_library(
  84. name = "heap_allocation_interface",
  85. hdrs = ["heap_allocation_interface.h"],
  86. deps = [
  87. "//explorer/ast",
  88. "//explorer/common:arena",
  89. "//explorer/common:nonnull",
  90. ],
  91. )
  92. cc_library(
  93. name = "interpreter",
  94. srcs = [
  95. "interpreter.cpp",
  96. ],
  97. hdrs = [
  98. "interpreter.h",
  99. ],
  100. deps = [
  101. ":action",
  102. ":action_stack",
  103. ":heap",
  104. ":stack",
  105. "//common:check",
  106. "//common:error",
  107. "//common:ostream",
  108. "//explorer/ast",
  109. "//explorer/common:arena",
  110. "//explorer/common:error_builders",
  111. "//explorer/common:source_location",
  112. "//explorer/common:trace_stream",
  113. "@llvm-project//llvm:Support",
  114. ],
  115. )
  116. cc_library(
  117. name = "resolve_control_flow",
  118. srcs = ["resolve_control_flow.cpp"],
  119. hdrs = ["resolve_control_flow.h"],
  120. deps = [
  121. "//common:check",
  122. "//explorer/ast",
  123. "//explorer/common:error_builders",
  124. "//explorer/common:nonnull",
  125. "@llvm-project//llvm:Support",
  126. ],
  127. )
  128. cc_library(
  129. name = "resolve_names",
  130. srcs = ["resolve_names.cpp"],
  131. hdrs = ["resolve_names.h"],
  132. deps = [
  133. ":stack_space",
  134. "//common:check",
  135. "//explorer/ast",
  136. "//explorer/ast:static_scope",
  137. "//explorer/common:arena",
  138. "@llvm-project//llvm:Support",
  139. ],
  140. )
  141. cc_library(
  142. name = "stack",
  143. hdrs = ["stack.h"],
  144. deps = ["//common:check"],
  145. )
  146. cc_library(
  147. name = "pattern_analysis",
  148. srcs = [
  149. "pattern_analysis.cpp",
  150. ],
  151. hdrs = [
  152. "pattern_analysis.h",
  153. ],
  154. deps = [
  155. ":action",
  156. "//common:error",
  157. "//explorer/ast",
  158. "//explorer/common:nonnull",
  159. "@llvm-project//llvm:Support",
  160. ],
  161. )
  162. cc_library(
  163. name = "type_checker",
  164. srcs = [
  165. "builtins.cpp",
  166. "impl_scope.cpp",
  167. "matching_impl_set.cpp",
  168. "type_checker.cpp",
  169. ],
  170. hdrs = [
  171. "builtins.h",
  172. "impl_scope.h",
  173. "matching_impl_set.h",
  174. "type_checker.h",
  175. ],
  176. textual_hdrs = [
  177. "builtins.def",
  178. ],
  179. deps = [
  180. ":action",
  181. ":dictionary",
  182. ":interpreter",
  183. ":pattern_analysis",
  184. ":stack_space",
  185. ":type_structure",
  186. "//common:check",
  187. "//common:enum_base",
  188. "//common:error",
  189. "//common:ostream",
  190. "//explorer/ast",
  191. "//explorer/common:arena",
  192. "//explorer/common:error_builders",
  193. "//explorer/common:nonnull",
  194. "//explorer/common:source_location",
  195. "//explorer/common:trace_stream",
  196. "@llvm-project//llvm:Support",
  197. ],
  198. )
  199. cc_library(
  200. name = "resolve_unformed",
  201. srcs = [
  202. "resolve_unformed.cpp",
  203. ],
  204. hdrs = [
  205. "resolve_unformed.h",
  206. ],
  207. deps = [
  208. ":stack_space",
  209. "//common:check",
  210. "//explorer/ast",
  211. "//explorer/ast:static_scope",
  212. "//explorer/common:error_builders",
  213. "//explorer/common:nonnull",
  214. "@llvm-project//llvm:Support",
  215. ],
  216. )
  217. cc_library(
  218. name = "stack_space",
  219. srcs = ["stack_space.cpp"],
  220. hdrs = ["stack_space.h"],
  221. deps = [
  222. "//common:check",
  223. "//common:error",
  224. "@llvm-project//llvm:Support",
  225. ],
  226. )
  227. cc_library(
  228. name = "type_structure",
  229. srcs = [
  230. "type_structure.cpp",
  231. ],
  232. hdrs = [
  233. "type_structure.h",
  234. ],
  235. deps = [
  236. "//common:ostream",
  237. "//explorer/ast",
  238. "//explorer/common:nonnull",
  239. "@llvm-project//llvm:Support",
  240. ],
  241. )