BUILD 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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. # These currently have to be a single build rule because of a dependency cycle
  6. # in printing.
  7. cc_library(
  8. name = "action_and_value",
  9. srcs = [
  10. "action.cpp",
  11. "value.cpp",
  12. ],
  13. hdrs = [
  14. "action.h",
  15. "value.h",
  16. ],
  17. deps = [
  18. ":address",
  19. ":dictionary",
  20. ":field_path",
  21. ":heap_allocation_interface",
  22. ":stack",
  23. "//common:check",
  24. "//common:ostream",
  25. "//explorer/ast",
  26. "//explorer/ast:bindings",
  27. "//explorer/common:arena",
  28. "//explorer/common:error_builders",
  29. "//explorer/common:nonnull",
  30. "@llvm-project//llvm:Support",
  31. ],
  32. )
  33. cc_library(
  34. name = "action_stack",
  35. srcs = ["action_stack.cpp"],
  36. hdrs = ["action_stack.h"],
  37. deps = [
  38. ":action_and_value",
  39. ":stack",
  40. "//common:ostream",
  41. "//explorer/ast",
  42. "@llvm-project//llvm:Support",
  43. ],
  44. )
  45. cc_library(
  46. name = "address",
  47. hdrs = ["address.h"],
  48. deps = [
  49. ":field_path",
  50. "//common:ostream",
  51. "@llvm-project//llvm:Support",
  52. ],
  53. )
  54. cc_library(
  55. name = "dictionary",
  56. hdrs = ["dictionary.h"],
  57. deps = ["//explorer/common:arena"],
  58. )
  59. cc_library(
  60. name = "exec_program",
  61. srcs = ["exec_program.cpp"],
  62. hdrs = ["exec_program.h"],
  63. visibility = [
  64. "//explorer:__pkg__",
  65. "//explorer/fuzzing:__pkg__",
  66. ],
  67. deps = [
  68. ":interpreter",
  69. ":resolve_control_flow",
  70. ":resolve_names",
  71. ":resolve_unformed",
  72. ":type_checker",
  73. "//common:check",
  74. "//common:ostream",
  75. "//explorer/ast",
  76. "//explorer/common:arena",
  77. "@llvm-project//llvm:Support",
  78. ],
  79. )
  80. cc_library(
  81. name = "field_path",
  82. hdrs = ["field_path.h"],
  83. deps = [
  84. "//common:ostream",
  85. "//explorer/ast",
  86. "//explorer/ast:static_scope",
  87. "@llvm-project//llvm:Support",
  88. ],
  89. )
  90. cc_library(
  91. name = "heap",
  92. srcs = ["heap.cpp"],
  93. hdrs = ["heap.h"],
  94. deps = [
  95. ":action_and_value",
  96. ":address",
  97. ":heap_allocation_interface",
  98. "//common:ostream",
  99. "//explorer/common:error_builders",
  100. "//explorer/common:nonnull",
  101. "//explorer/common:source_location",
  102. "@llvm-project//llvm:Support",
  103. ],
  104. )
  105. cc_library(
  106. name = "heap_allocation_interface",
  107. hdrs = ["heap_allocation_interface.h"],
  108. deps = [
  109. ":address",
  110. "//explorer/common:arena",
  111. "//explorer/common:nonnull",
  112. ],
  113. )
  114. cc_library(
  115. name = "interpreter",
  116. srcs = [
  117. "interpreter.cpp",
  118. ],
  119. hdrs = [
  120. "interpreter.h",
  121. ],
  122. deps = [
  123. ":action_and_value",
  124. ":action_stack",
  125. ":address",
  126. ":heap",
  127. ":stack",
  128. "//common:check",
  129. "//common:ostream",
  130. "//explorer/ast",
  131. "//explorer/common:arena",
  132. "//explorer/common:error_builders",
  133. "@llvm-project//llvm:Support",
  134. ],
  135. )
  136. cc_library(
  137. name = "resolve_control_flow",
  138. srcs = ["resolve_control_flow.cpp"],
  139. hdrs = ["resolve_control_flow.h"],
  140. deps = [
  141. "//common:check",
  142. "//explorer/ast",
  143. "//explorer/common:error_builders",
  144. "//explorer/common:nonnull",
  145. "@llvm-project//llvm:Support",
  146. ],
  147. )
  148. cc_library(
  149. name = "resolve_names",
  150. srcs = ["resolve_names.cpp"],
  151. hdrs = ["resolve_names.h"],
  152. deps = [
  153. ":action_and_value",
  154. "//common:check",
  155. "//explorer/ast",
  156. "//explorer/ast:static_scope",
  157. "//explorer/common:arena",
  158. "@llvm-project//llvm:Support",
  159. ],
  160. )
  161. cc_library(
  162. name = "stack",
  163. hdrs = ["stack.h"],
  164. deps = ["//common:check"],
  165. )
  166. cc_library(
  167. name = "type_checker",
  168. srcs = [
  169. "builtins.cpp",
  170. "impl_scope.cpp",
  171. "type_checker.cpp",
  172. ],
  173. hdrs = [
  174. "builtins.h",
  175. "impl_scope.h",
  176. "type_checker.h",
  177. ],
  178. deps = [
  179. ":action_and_value",
  180. ":dictionary",
  181. ":interpreter",
  182. "//common:error",
  183. "//common:ostream",
  184. "//explorer/ast",
  185. "//explorer/common:arena",
  186. "//explorer/common:error_builders",
  187. "//explorer/common:nonnull",
  188. "//explorer/common:source_location",
  189. "@llvm-project//llvm:Support",
  190. ],
  191. )
  192. cc_library(
  193. name = "resolve_unformed",
  194. srcs = [
  195. "resolve_unformed.cpp",
  196. ],
  197. hdrs = [
  198. "resolve_unformed.h",
  199. ],
  200. deps = [
  201. "//common:check",
  202. "//explorer/ast",
  203. "//explorer/ast:static_scope",
  204. "//explorer/common:error_builders",
  205. "//explorer/common:nonnull",
  206. "@llvm-project//llvm:Support",
  207. ],
  208. )