BUILD 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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 = ["//executable_semantics:__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. ":stack",
  22. "//common:ostream",
  23. "//executable_semantics/ast:declaration",
  24. "//executable_semantics/ast:expression",
  25. "//executable_semantics/ast:statement",
  26. "//executable_semantics/common:arena",
  27. "//executable_semantics/common:error",
  28. "@llvm-project//llvm:Support",
  29. ],
  30. )
  31. cc_library(
  32. name = "address",
  33. hdrs = ["address.h"],
  34. deps = [
  35. ":field_path",
  36. "//common:ostream",
  37. "@llvm-project//llvm:Support",
  38. ],
  39. )
  40. cc_library(
  41. name = "dictionary",
  42. hdrs = ["dictionary.h"],
  43. deps = ["//executable_semantics/common:arena"],
  44. )
  45. cc_library(
  46. name = "exec_program",
  47. srcs = ["exec_program.cpp"],
  48. hdrs = ["exec_program.h"],
  49. deps = [
  50. ":interpreter",
  51. ":resolve_control_flow",
  52. ":resolve_names",
  53. ":type_checker",
  54. "//executable_semantics/ast",
  55. ],
  56. )
  57. cc_library(
  58. name = "field_path",
  59. hdrs = ["field_path.h"],
  60. deps = [
  61. "//common:ostream",
  62. "@llvm-project//llvm:Support",
  63. ],
  64. )
  65. cc_library(
  66. name = "heap",
  67. srcs = ["heap.cpp"],
  68. hdrs = ["heap.h"],
  69. deps = [
  70. ":action_and_value",
  71. ":address",
  72. ":heap_allocation_interface",
  73. "//common:ostream",
  74. "//executable_semantics/ast:source_location",
  75. "//executable_semantics/common:nonnull",
  76. "@llvm-project//llvm:Support",
  77. ],
  78. )
  79. cc_library(
  80. name = "heap_allocation_interface",
  81. hdrs = ["heap_allocation_interface.h"],
  82. deps = [
  83. ":address",
  84. "//executable_semantics/common:nonnull",
  85. ],
  86. )
  87. cc_library(
  88. name = "interpreter",
  89. srcs = [
  90. "interpreter.cpp",
  91. ],
  92. hdrs = [
  93. "interpreter.h",
  94. ],
  95. deps = [
  96. ":action_and_value",
  97. ":address",
  98. ":heap",
  99. "//common:check",
  100. "//common:ostream",
  101. "//executable_semantics/ast:declaration",
  102. "//executable_semantics/ast:expression",
  103. "//executable_semantics/common:arena",
  104. "@llvm-project//llvm:Support",
  105. ],
  106. )
  107. cc_library(
  108. name = "resolve_control_flow",
  109. srcs = ["resolve_control_flow.cpp"],
  110. hdrs = ["resolve_control_flow.h"],
  111. deps = [
  112. "//common:check",
  113. "//executable_semantics/ast",
  114. "//executable_semantics/ast:declaration",
  115. "//executable_semantics/ast:statement",
  116. "@llvm-project//llvm:Support",
  117. ],
  118. )
  119. cc_library(
  120. name = "resolve_names",
  121. srcs = ["resolve_names.cpp"],
  122. hdrs = ["resolve_names.h"],
  123. deps = [
  124. "//common:check",
  125. "//executable_semantics/ast",
  126. "@llvm-project//llvm:Support",
  127. ],
  128. )
  129. cc_library(
  130. name = "stack",
  131. hdrs = ["stack.h"],
  132. deps = ["//common:check"],
  133. )
  134. cc_library(
  135. name = "type_checker",
  136. srcs = ["type_checker.cpp"],
  137. hdrs = ["type_checker.h"],
  138. deps = [
  139. ":dictionary",
  140. ":interpreter",
  141. "//common:ostream",
  142. "//executable_semantics/ast",
  143. "//executable_semantics/ast:declaration",
  144. "//executable_semantics/ast:expression",
  145. "//executable_semantics/ast:statement",
  146. "//executable_semantics/common:arena",
  147. "@llvm-project//llvm:Support",
  148. ],
  149. )