BUILD 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  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. "//common:check",
  134. "//explorer/ast",
  135. "//explorer/ast:static_scope",
  136. "//explorer/common:arena",
  137. "@llvm-project//llvm:Support",
  138. ],
  139. )
  140. cc_library(
  141. name = "stack",
  142. hdrs = ["stack.h"],
  143. deps = ["//common:check"],
  144. )
  145. cc_library(
  146. name = "pattern_analysis",
  147. srcs = [
  148. "pattern_analysis.cpp",
  149. ],
  150. hdrs = [
  151. "pattern_analysis.h",
  152. ],
  153. deps = [
  154. ":action",
  155. "//common:error",
  156. "//explorer/ast",
  157. "//explorer/common:nonnull",
  158. "@llvm-project//llvm:Support",
  159. ],
  160. )
  161. cc_library(
  162. name = "type_checker",
  163. srcs = [
  164. "builtins.cpp",
  165. "impl_scope.cpp",
  166. "matching_impl_set.cpp",
  167. "type_checker.cpp",
  168. ],
  169. hdrs = [
  170. "builtins.h",
  171. "impl_scope.h",
  172. "matching_impl_set.h",
  173. "type_checker.h",
  174. ],
  175. textual_hdrs = [
  176. "builtins.def",
  177. ],
  178. deps = [
  179. ":action",
  180. ":dictionary",
  181. ":interpreter",
  182. ":pattern_analysis",
  183. ":type_structure",
  184. "//common:check",
  185. "//common:enum_base",
  186. "//common:error",
  187. "//common:ostream",
  188. "//explorer/ast",
  189. "//explorer/common:arena",
  190. "//explorer/common:error_builders",
  191. "//explorer/common:nonnull",
  192. "//explorer/common:source_location",
  193. "//explorer/common:trace_stream",
  194. "@llvm-project//llvm:Support",
  195. ],
  196. )
  197. cc_library(
  198. name = "resolve_unformed",
  199. srcs = [
  200. "resolve_unformed.cpp",
  201. ],
  202. hdrs = [
  203. "resolve_unformed.h",
  204. ],
  205. deps = [
  206. "//common:check",
  207. "//explorer/ast",
  208. "//explorer/ast:static_scope",
  209. "//explorer/common:error_builders",
  210. "//explorer/common:nonnull",
  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. )