Files
sdk/runtime/llvm_codegen/test/bit_test.gni
T
Jake Ehrlich 87b0dbab2d [llvm_codegen] Contrived hello world
This change adds enough functionality to compile hello world
from S-expressions in a contrived way. It fails to handle this input
realistically in several ways.

1) It assumes the existence of dart:core::print
2) It handles all dart values as C strings
3) It assumes only very static calls can be made with no named arguments
4) If a stack overflow is detected it just traps.
5) I'm not sure how the current dart runtime works but the contrived runtime
   used here puts a contrived thread object in `gs`.

This change adds a basic framework for implementing new instructions that
should make it possible to implement new instructions with much smaller
changes however.

Change-Id: Ic167a29908a875bfc234c4e9bf5f4ac2ff52a3a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117222
Commit-Queue: Jake Ehrlich <jakehehrlich@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-10 20:57:02 +00:00

42 lines
1.1 KiB
Plaintext

# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
import("../../../build/executable_suffix.gni")
# This file defines a template for running bit tests.
#
# - bit_test()
# Runs bit on the specified file.
# A template for running bit. This lets bit commands be run as ninja commands.
#
# Parameters:
# tests:
# The list of files to input into bit
template("bit_test") {
assert(defined(invoker.tests), "tests must be defined for $target_name")
action_foreach(target_name) {
script = "//runtime/llvm_codegen/test/run_bit.py"
sources = invoker.tests
deps = [
"../../bit",
]
inputs = [
"${root_out_dir}/bit$executable_suffix",
]
# This output is always dirty so ninja will always run this step when asked to.
outputs = [
"$target_gen_dir/{{source_name_part}}}",
]
args = [
"--bit", rebase_path("${root_out_dir}/bit"),
"--test", "{{source}}",
"--out", rebase_path(target_gen_dir),
]
}
}