BUILD 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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. ":type_checker",
  53. "//executable_semantics/ast",
  54. ],
  55. )
  56. cc_library(
  57. name = "field_path",
  58. hdrs = ["field_path.h"],
  59. deps = [
  60. "//common:ostream",
  61. "@llvm-project//llvm:Support",
  62. ],
  63. )
  64. cc_library(
  65. name = "heap",
  66. srcs = ["heap.cpp"],
  67. hdrs = ["heap.h"],
  68. deps = [
  69. ":action_and_value",
  70. ":address",
  71. ":heap_allocation_interface",
  72. "//common:ostream",
  73. "//executable_semantics/ast:source_location",
  74. "//executable_semantics/common:nonnull",
  75. "@llvm-project//llvm:Support",
  76. ],
  77. )
  78. cc_library(
  79. name = "heap_allocation_interface",
  80. hdrs = ["heap_allocation_interface.h"],
  81. deps = [
  82. ":address",
  83. "//executable_semantics/common:nonnull",
  84. ],
  85. )
  86. cc_library(
  87. name = "interpreter",
  88. srcs = [
  89. "interpreter.cpp",
  90. ],
  91. hdrs = [
  92. "interpreter.h",
  93. ],
  94. deps = [
  95. ":action_and_value",
  96. ":address",
  97. ":heap",
  98. "//common:check",
  99. "//common:ostream",
  100. "//executable_semantics/ast:declaration",
  101. "//executable_semantics/ast:expression",
  102. "//executable_semantics/common:arena",
  103. "@llvm-project//llvm:Support",
  104. ],
  105. )
  106. cc_library(
  107. name = "resolve_control_flow",
  108. srcs = ["resolve_control_flow.cpp"],
  109. hdrs = ["resolve_control_flow.h"],
  110. deps = [
  111. "//common:check",
  112. "//executable_semantics/ast",
  113. "//executable_semantics/ast:declaration",
  114. "//executable_semantics/ast:statement",
  115. "@llvm-project//llvm:Support",
  116. ],
  117. )
  118. cc_library(
  119. name = "stack",
  120. hdrs = ["stack.h"],
  121. deps = ["//common:check"],
  122. )
  123. cc_library(
  124. name = "type_checker",
  125. srcs = ["type_checker.cpp"],
  126. hdrs = ["type_checker.h"],
  127. deps = [
  128. ":dictionary",
  129. ":interpreter",
  130. "//common:ostream",
  131. "//executable_semantics/ast:declaration",
  132. "//executable_semantics/ast:expression",
  133. "//executable_semantics/ast:statement",
  134. "//executable_semantics/common:arena",
  135. "@llvm-project//llvm:Support",
  136. ],
  137. )