Overview of Oil Code

category total lines num files
OSH (and common libraries) 37,781 84
Oil Language (and Tea) 5,191 13
Code Borrowed from Python's stdlib 419 5
Spec Tests 37,725 146
Gold Tests 2,725 26
Python Unit Tests 9,346 60
Other Shell Tests 14,112 47
Test Automation 954 8
mycpp Translator 4,521 11
mycpp Test Data 2,717 31
Zephyr ASDL 3,022 11
pgen2 Parser Generator 1,717 8
Other Code Generators 2,211 9
Hand-written C++ Code 2,563 27
Garbage-Collected Runtime 3,521 17
Unit tests in C++ 5,080 23
Incremental C++ Build 2,814 17
Build Automation 5,672 31
Release Automation 2,390 7
Soil: Multi-cloud CI with containers 2,668 19
Benchmarks 7,101 38
Metrics 1,510 8
Generated Python Code 17,131 20
Tools 1,523 4
Doc Tools 2,381 10
Web 1,058 5

Related Documents

The README for oilshell/oil has another overview of the repository.

OSH (and common libraries)

This is the input to the translators, written in statically-typed Python. Note that bash is at least 140K lines of code, and OSH implements a large part of bash and more.

bin/oil.py                                      365
core/alloc.py                                   166
core/ansi.py                                     17
core/completion.py                            1,264
core/comp_ui.py                                 592
core/dev.py                                     598
core/error.py                                   198
core/executor.py                                567
core/main_loop.py                               368
core/NINJA_subgraph.py                           48
core/optview.py                                  57
core/process.py                               1,523
core/pyerror.py                                  71
core/pyos.py                                    355
core/pyutil.py                                  232
core/runtime.asdl                               194
core/shell_native.py                            513
core/shell.py                                   672
core/state.py                                 2,387
core/ui.py                                      396
core/util.py                                     93
core/vm.py                                      213
frontend/args.py                                673
frontend/builtin_def.py                         164
frontend/consts.py                              342
frontend/flag_def.py                            323
frontend/flag_spec.py                           391
frontend/id_kind_def.py                         638
frontend/lexer_def.py                         1,026
frontend/lexer.py                               329
frontend/location.py                             99
frontend/match.py                               265
frontend/NINJA_subgraph.py                      138
frontend/option_def.py                          382
frontend/parse_lib.py                           477
frontend/py_reader.py                            81
frontend/py_readline.py                          93
frontend/reader.py                              143
frontend/signal_def.py                           46
frontend/syntax_abbrev.py                       144
frontend/syntax.asdl                            594
frontend/typed_args.py                           70
frontend/types.asdl                              41
mycpp/mylib.pyi                                  76
osh/arith_parse.py                              184
osh/bool_parse.py                               269
osh/bool_stat.py                                136
osh/braces.py                                   498
osh/builtin_assign.py                           513
osh/builtin_bracket.py                          280
osh/builtin_comp.py                             518
osh/builtin_lib.py                               95
osh/builtin_meta.py                             435
osh/builtin_misc.py                             875
osh/builtin_printf.py                           478
osh/builtin_process2.py                         222
osh/builtin_process.py                          131
osh/builtin_pure.py                             960
osh/builtin_trap.py                             286
osh/cmd_eval.py                               1,864
osh/cmd_parse.py                              2,415
osh/glob_.py                                    488
osh/history.py                                  185
osh/NINJA_subgraph.py                            31
osh/prompt.py                                   300
osh/sh_expr_eval.py                           1,048
osh/split.py                                    307
osh/string_ops.py                               454
osh/tdop.py                                     333
osh/word_compile.py                             263
osh/word_eval.py                              2,253
osh/word_parse.py                             1,838
osh/word_.py                                    821
pyext/fanos.c                                   294
pyext/fastlex.c                                 246
pyext/fastlex.pyi                                15
pyext/libc.c                                    402
pyext/libc.pyi                                   11
pyext/line_input.pyi                             32
pyext/posix_.pyi                                211
pyext/yajl.pyi                                    3
qsn_/qsn_native.py                               75
qsn_/qsn.py                                     588

37,781 lines in 84 files  

Oil Language (and Tea)

oil_lang/builtin_oil.py                         374
oil_lang/expr_eval.py                         1,036
oil_lang/expr_parse.py                          335
oil_lang/expr_to_ast.py                       1,547
oil_lang/funcs_builtin.py                       415
oil_lang/funcs.py                               127
oil_lang/grammar.pgen2                          622
oil_lang/NINJA_subgraph.py                       35
oil_lang/objects.py                             146
oil_lang/regex_translate.py                     318
tea/tea_eval.py                                 137
tea/tea_main.py                                  99

5,191 lines in 13 files  

Code Borrowed from Python's stdlib

pylib/cgi.py                                     19
pylib/collections_.py                           204
pylib/os_path.py                                169
pylib/path_stat.py                               27

419 lines in 5 files  

Spec Tests

A comprehensive test suite that compares OSH against other shells. If OSH passes these tests in BOTH Python and C++, it means that the translation works.

spec/alias.test.sh                              536
spec/append.test.sh                             291
spec/arith-context.test.sh                       81
spec/arith.test.sh                              631
spec/array-compat.test.sh                        96
spec/array.test.sh                              637
spec/assign-deferred.test.sh                    105
spec/assign-dialects.test.sh                     59
spec/assign-extended.test.sh                    810
spec/assign.test.sh                             672
spec/assoc.test.sh                              631
spec/assoc-zsh.test.sh                           53
spec/background.test.sh                         182
spec/ble-features.test.sh                       644
spec/ble-idioms.test.sh                         168
spec/blog1.test.sh                               95
spec/blog2.test.sh                               49
spec/blog-other1.test.sh                         55
spec/brace-expansion.test.sh                    441
spec/bugs.test.sh                               169
spec/builtin-bash.test.sh                       346
spec/builtin-bracket.test.sh                    564
spec/builtin-completion.test.sh                 412
spec/builtin-dirs.test.sh                       205
spec/builtin-eval-source.test.sh                249
spec/builtin-getopts.test.sh                    318
spec/builtin-io.test.sh                         751
spec/builtin-printf.test.sh                     900
spec/builtins2.test.sh                          233
spec/builtin-special.test.sh                    111
spec/builtins.test.sh                           420
spec/builtin-times.test.sh                       15
spec/builtin-trap.test.sh                       410
spec/builtin-vars.test.sh                       710
spec/case_.test.sh                              165
spec/command-parsing.test.sh                     63
spec/command-sub.test.sh                        272
spec/command_.test.sh                           192
spec/comments.test.sh                            11
spec/dbracket.test.sh                           436
spec/dparen.test.sh                             202
spec/empty-bodies.test.sh                        24
spec/errexit-oil.test.sh                        755
spec/errexit.test.sh                            393
spec/exit-status.test.sh                        238
spec/explore-parsing.test.sh                     42
spec/extglob-files.test.sh                      391
spec/extglob-match.test.sh                      400
spec/fatal-errors.test.sh                       186
spec/for-expr.test.sh                            92
spec/func-parsing.test.sh                       105
spec/glob.test.sh                               396
spec/hay-isolation.test.sh                      169
spec/hay-meta.test.sh                           200
spec/hay.test.sh                                645
spec/here-doc.test.sh                           365
spec/if_.test.sh                                 56
spec/interactive.test.sh                        216
spec/introspect.test.sh                         237
spec/let.test.sh                                 23
spec/loop.test.sh                               408
spec/nameref.test.sh                            642
spec/nix-idioms.test.sh                         151
spec/nocasematch-match.test.sh                   69
spec/nul-bytes.test.sh                          153
spec/oil-array.test.sh                           38
spec/oil-assign.test.sh                         359
spec/oil-bin.test.sh                             17
spec/oil-blocks.test.sh                         377
spec/oil-bugs.test.sh                            48
spec/oil-builtin-argparse.test.sh                61
spec/oil-builtin-describe.test.sh                38
spec/oil-builtin-error.test.sh                  424
spec/oil-builtin-pp.test.sh                      47
spec/oil-builtin-process.test.sh                 85
spec/oil-builtin-shopt.test.sh                  179
spec/oil-builtins.test.sh                       568
spec/oil-case.test.sh                            27
spec/oil-command-sub.test.sh                    109
spec/oil-demo.test.sh                            59
spec/oil-expr-arith.test.sh                      48
spec/oil-expr-compare.test.sh                   286
spec/oil-expr-sub.test.sh                        40
spec/oil-expr.test.sh                           738
spec/oil-for.test.sh                            173
spec/oil-funcs-builtin.test.sh                  200
spec/oil-funcs-external.test.sh                  87
spec/oil-interactive.test.sh                     15
spec/oil-json.test.sh                           121
spec/oil-keywords.test.sh                        37
spec/oil-multiline.test.sh                      179
spec/oil-options-assign.test.sh                 103
spec/oil-options.test.sh                        781
spec/oil-proc.test.sh                           270
spec/oil-regex.test.sh                          960
spec/oil-reserved.test.sh                        46
spec/oil-scope.test.sh                          764
spec/oil-slice-range.test.sh                    162
spec/oil-special-vars.test.sh                    48
spec/oil-string.test.sh                         344
spec/oil-tuple.test.sh                           26
spec/oil-usage.test.sh                           22
spec/oil-user-feedback.test.sh                  213
spec/oil-var-sub.test.sh                         45
spec/oil-with-sh.test.sh                         77
spec/oil-word-eval.test.sh                      128
spec/oil-xtrace.test.sh                         478
spec/osh-only.test.sh                            78
spec/parse-errors.test.sh                       192
spec/pipeline.test.sh                           166
spec/posix.test.sh                              153
spec/process-sub.test.sh                        213
spec/prompt.test.sh                             253
spec/quote.test.sh                              248
spec/redirect.test.sh                           654
spec/regex.test.sh                              344
spec/serialize.test.sh                          229
spec/shell-grammar.test.sh                      205
spec/sh-func.test.sh                            150
spec/sh-options.test.sh                         694
spec/sh-usage.test.sh                            90
spec/smoke.test.sh                              123
spec/strict-options.test.sh                     249
spec/subshell.test.sh                            23
spec/tea-func.test.sh                           288
spec/tilde.test.sh                              172
spec/TODO-deprecate.test.sh                      14
spec/toysh-posix.test.sh                        347
spec/toysh.test.sh                              144
spec/type-compat.test.sh                        107
spec/var-num.test.sh                             39
spec/var-op-bash.test.sh                        309
spec/var-op-len.test.sh                         219
spec/var-op-patsub.test.sh                      291
spec/var-op-slice.test.sh                       315
spec/var-op-strip.test.sh                       357
spec/var-op-test.test.sh                        339
spec/var-ref.test.sh                            485
spec/vars-bash.test.sh                           27
spec/vars-special.test.sh                       456
spec/var-sub-quote.test.sh                      312
spec/var-sub.test.sh                             74
spec/word-eval.test.sh                           62
spec/word-split.test.sh                         387
spec/xtrace.test.sh                             344

37,725 lines in 146 files  

Gold Tests

Another suite that tests shells "from the outside". Instead of making explicit assertions, we verify that OSH behaves like bash.

test/gold/abuild.sh                               9
test/gold/and-or.sh                              27
test/gold/big-here-doc.sh                     1,531
test/gold/case-in-subshell.sh                    37
test/gold/char-class.sh                          33
test/gold/command-sub-2.sh                       12
test/gold/command-sub.sh                         39
test/gold/comments.sh                            22
test/gold/complex-here-docs.sh                  192
test/gold/configure-bug.sh                       13
test/gold/de1.sh                                 24
test/gold/declare.sh                             28
test/gold/dollar-sq.sh                           42
test/gold/echo-e.sh                              36
test/gold/errexit-confusion.sh                  139
test/gold/errexit.sh                            121
test/gold/export.sh                              65
test/gold/glob.sh                                26
test/gold/lineno.sh                              23
test/gold/nix.sh                                 32
test/gold/readlink.sh                            61
test/gold/readonly.sh                            24
test/gold/scope.sh                              126
test/gold/strip-op-char-class.sh                  6
test/gold/word-eval.sh                           57

2,725 lines in 26 files  

Python Unit Tests

asdl/format_test.py                              47
asdl/front_end_test.py                          141
asdl/gen_python_test.py                         153
asdl/examples/typed_arith_parse_test.py         227
build/dynamic_deps_test.py                       27
build/ninja_lib_test.py                         253
core/alloc_test.py                               60
core/completion_test.py                         798
core/comp_ui_test.py                            179
core/process_test.py                            196
core/pyutil_test.py                              19
core/state_test.py                              316
core/ui_test.py                                  32
core/util_test.py                                25
doctools/cmark_test.py                          211
doctools/make_help_test.py                       53
doctools/oil_doc_test.py                         70
doctools/spelling_test.py                        50
doctools/split_doc_test.py                      102
frontend/args_test.py                           232
frontend/id_kind_def_test.py                     97
frontend/lexer_def_test.py                      436
frontend/lexer_gen_test.py                       51
frontend/lexer_test.py                           77
frontend/match_test.py                           87
frontend/reader_test.py                          49
lazylex/html_test.py                             90
oil_lang/builtin_oil_test.py                    157
oil_lang/expr_parse_test.py                     144
oil_lang/objects_test.py                         19
osh/arith_parse_test.py                         179
osh/bool_parse_test.py                          122
osh/braces_test.py                              187
osh/builtin_bracket_test.py                      29
osh/builtin_comp_test.py                         19
osh/builtin_lib_test.py                          93
osh/builtin_misc_test.py                         48
osh/cmd_eval_test.py                             74
osh/cmd_parse_test.py                         1,263
osh/glob_test.py                                163
osh/history_test.py                             124
osh/prompt_test.py                               54
osh/split_test.py                               169
osh/string_ops_test.py                          133
osh/word_compile_test.py                         16
osh/word_eval_test.py                           144
osh/word_parse_test.py                          561
osh/word_test.py                                101
pyext/fanos_test.py                             246
pyext/fastlex_test.py                            83
pyext/libc_test.py                              304
pyext/line_input_test.py                         27
pyext/posix_test.py                             184
pylib/os_path_test.py                            59
pylib/path_stat_test.py                          24
qsn_/qsn_test.py                                296
test/sh_spec_test.py                            138
test/wild_report_test.py                         29
tools/osh2oil_test.py                            79

9,346 lines in 60 files  

Other Shell Tests

test/alpine.sh                                  277
test/arena.sh                                    60
test/baseline.spec-cpp.sh                        60
test/ble.sh                                      51
test/common.sh                                  228
test/common-test.sh                              22
test/coverage.sh                                183
test/cpp-unit.sh                                 46
test/gentoo.sh                                   83
test/gold.sh                                    163
test/group-session.sh                           127
test/lint.sh                                    341
test/nix.sh                                      24
test/oil-runtime-errors.sh                      321
test/opyc.sh                                    120
test/osh2oil.sh                               1,370
test/oshc-deps.sh                               104
test/osh-usage.sh                               213
test/other.sh                                    34
test/parse-errors.sh                          1,513
test/py_stdlib.sh                                32
test/report.R                                    54
test/runtime-errors.sh                        1,111
test/shebang.sh                                  26
test/shell-vs-shell.sh                          314
test/sh_spec.py                               1,270
test/signal-state.sh                             96
test/smoosh_import.py                            31
test/smoosh.sh                                  213
test/spec-alpine.sh                             154
test/spec-bin.sh                                244
test/spec-common.sh                              48
test/spec-cpp.sh                                389
test/spec_lib.py                                188
test/spec-runner.sh                             437
test/spec.sh                                  1,159
test/stateful.sh                                214
test/syscall.py                                 219
test/syscall.sh                                 415
test/tsv-lib.sh                                  78
test/tsv-lib-test.sh                             59
test/unit.sh                                    247
test/vagrant.sh                                  54
test/wild_report.py                             802
test/wild-runner.sh                             194
test/wild.sh                                    724

14,112 lines in 47 files  

Test Automation

asdl/TEST.sh                                     87
core/TEST.sh                                     22
cpp/TEST.sh                                     133
frontend/TEST.sh                                 21
mycpp/TEST.sh                                   326
opy/TEST.sh                                     270
pea/TEST.sh                                      95

954 lines in 8 files  

mycpp Translator

This prototype uses the MyPy frontend to translate statically-typed Python to C++. The generated code calls a small runtime which implements things like List[T], Dict[K, V], and Python's len().

mycpp/compare_pairs.py                           58
mycpp/const_pass.py                             524
mycpp/cppgen_pass.py                          2,734
mycpp/crash.py                                   35
mycpp/debug_pass.py                             459
mycpp/format_strings.py                         110
mycpp/mycpp_main.py                             331
mycpp/mylib.py                                  162
mycpp/pass_state.py                              94
mycpp/util.py                                    14

4,521 lines in 11 files  

mycpp Test Data

Small Python examples that translate to C++, compile, and run.

mycpp/examples/arith_ops.py                      45
mycpp/examples/asdl_generated.py                 64
mycpp/examples/cartesian.py                      75
mycpp/examples/cgi.py                            62
mycpp/examples/classes_gc.py                    209
mycpp/examples/classes.py                       283
mycpp/examples/containers.py                    170
mycpp/examples/control_flow.py                  110
mycpp/examples/escape.py                         70
mycpp/examples/fib_iter.py                       54
mycpp/examples/fib_recursive.py                  49
mycpp/examples/files.py                          62
mycpp/examples/__init__.py                        0
mycpp/examples/invalid_format_strings.py         20
mycpp/examples/invalid_types_2.py                32
mycpp/examples/invalid_types.py                  32
mycpp/examples/length.py                        110
mycpp/examples/lexer_main.py                     47
mycpp/examples/loops.py                         177
mycpp/examples/modules.py                        80
mycpp/examples/parse.py                         232
mycpp/examples/pgen2_demo.py                    106
mycpp/examples/scoped_resource.py               176
mycpp/examples/strings.py                        81
mycpp/examples/test_cast.py                      59
mycpp/examples/test_conditional.py               67
mycpp/examples/test_hoist.py                     61
mycpp/examples/test_switch.py                    42
mycpp/examples/tuple_return_value.py             55
mycpp/examples/varargs.py                        87

2,717 lines in 31 files  

Zephyr ASDL

A DSL for algebraic data types, borrowed from Python. Oil is the most strongly typed Bourne shell implementation!

asdl/asdl_main.py                               287
asdl/ast.py                                     253
asdl/format.py                                  492
asdl/front_end.py                               497
asdl/gen_cpp.py                                 674
asdl/gen_python.py                              530
asdl/NINJA_subgraph.py                           54
asdl/pybase.py                                   63
asdl/runtime.py                                  41
asdl/visitor.py                                 131

3,022 lines in 11 files  

pgen2 Parser Generator

An LL(1) parser generator used to parse Oil expressions. Also borrowed from CPython.

pgen2/driver.py                                 101
pgen2/grammar.py                                222
pgen2/parse.py                                  209
pgen2/pgen.py                                   428
pgen2/pnode.py                                   29
pgen2/tokenize.py                               579
pgen2/token.py                                  149

1,717 lines in 8 files  

Other Code Generators

In order to make Oil statically typed, we had to abandon Python reflection and use C++ source code generation instead. The lexer, flag definitions, and constants can be easily compiled to C++.

core/optview_gen.py                              95
frontend/consts_gen.py                          564
frontend/flag_gen.py                            512
frontend/lexer_gen.py                           490
frontend/option_gen.py                          101
frontend/signal_gen.py                          110
oil_lang/grammar_gen.py                         239
osh/arith_parse_gen.py                          100

2,211 lines in 9 files  

Hand-written C++ Code

Includes OS bindings. Small C++ files like cpp/osh_arith_parse.{cc,h} correspond to larger Python files like osh/arith_parse.py.

cpp/core.cc                                     308
cpp/core_error.h                                195
cpp/core.h                                      122
cpp/core_pyerror.h                               90
cpp/frontend_flag_spec.cc                       293
cpp/frontend_flag_spec.h                        156
cpp/frontend_match.cc                           100
cpp/frontend_match.h                             75
cpp/frontend_pyreadline.cc                       79
cpp/frontend_pyreadline.h                        41
cpp/libc.cc                                     191
cpp/libc.h                                       37
cpp/osh.cc                                      153
cpp/osh.h                                        50
cpp/osh_tdop.cc                                  16
cpp/osh_tdop.h                                   50
cpp/pgen2.cc                                     15
cpp/pgen2.h                                      53
cpp/preamble.h                                   31
cpp/pylib.cc                                     50
cpp/pylib.h                                      20
cpp/qsn.h                                        56
cpp/segfault_handler.h                           27
cpp/stdlib.cc                                   174
cpp/stdlib.h                                    134
cpp/translation_stubs.h                          47

2,563 lines in 27 files  

Garbage-Collected Runtime

Uses a simple Cheney / semi-space collector.

mycpp/common.h                                   70
mycpp/comparators.h                              27
mycpp/gc_builtins.cc                            303
mycpp/gc_builtins.h                             139
mycpp/gc_dict.h                                 338
mycpp/gc_list.h                                 462
mycpp/gc_mylib.cc                               328
mycpp/gc_mylib.h                                247
mycpp/gc_obj.h                                  152
mycpp/gc_slab.h                                  65
mycpp/gc_str.cc                                 572
mycpp/gc_str.h                                  204
mycpp/gc_tuple.h                                108
mycpp/mark_sweep_heap.cc                        336
mycpp/mark_sweep_heap.h                         149
mycpp/runtime.h                                  21

3,521 lines in 17 files  

Unit tests in C++

The goal is to make the spec tests pass, but unit tests are helpful too.

cpp/core_test.cc                                263
cpp/data_race_test.cc                            85
cpp/frontend_flag_spec_test.cc                  139
cpp/frontend_match_test.cc                       80
cpp/libc_test.cc                                 87
cpp/obj_layout_test.cc                          119
cpp/osh_test.cc                                  49
cpp/pylib_test.cc                                42
cpp/qsn_test.cc                                  44
cpp/stdlib_test.cc                               83
mycpp/bump_leak_heap_test.cc                     60
mycpp/cheney_heap_test.cc                        30
mycpp/gc_builtins_test.cc                       960
mycpp/gc_dict_test.cc                           245
mycpp/gc_heap_test.cc                           425
mycpp/gc_list_test.cc                           312
mycpp/gc_mylib_test.cc                          259
mycpp/gc_stress_test.cc                         222
mycpp/gc_str_test.cc                          1,131
mycpp/gc_tuple_test.cc                          134
mycpp/mark_sweep_heap_test.cc                   168
mycpp/smartptr_test.cc                          143

5,080 lines in 23 files  

Incremental C++ Build

asdl/NINJA_subgraph.py                           54
bin/NINJA_subgraph.py                            66
build/ninja_lib.py                              459
build/ninja_lib_test.py                         253
build/ninja_main.py                             339
build/ninja-rules-cpp.sh                        293
build/ninja-rules-py.sh                         360
core/NINJA_subgraph.py                           48
cpp/NINJA_subgraph.py                           173
frontend/NINJA_subgraph.py                      138
mycpp/NINJA_subgraph.py                         437
NINJA-config.sh                                  82
oil_lang/NINJA_subgraph.py                       35
osh/NINJA_subgraph.py                            31
pea/NINJA_subgraph.py                            20
prebuilt/NINJA_subgraph.py                       26

2,814 lines in 17 files  

Build Automation

build/clean.sh                                   60
build/c_module_srcs.py                           90
build/c_module_toc.py                            51
build/common.sh                                  67
build/cpp.sh                                     40
build/cpython_defs.py                           515
build/cpython-defs.sh                           354
build/detect-cc.c                                 4
build/detect-readline.c                          19
build/dev.sh                                      5
build/dev-shell.sh                               49
build/doc.sh                                    416
build/dynamic_deps.py                           155
build/dynamic-deps.sh                           198
build/hello.mk                                   51
build/make_zip.py                                53
build/native.sh                                  83
build/ninja_lib.py                              459
build/ninja_main.py                             339
build/ninja-rules-cpp.sh                        293
build/ninja-rules-py.sh                         360
build/oil.mk                                     60
build/old-ovm-test.sh                            42
build/ovm-actions.sh                            191
build/ovm-compile.sh                            436
build/portable-rules.mk                          91
build/py.sh                                     484
configure                                       425
install                                          87
Makefile                                        195

5,672 lines in 31 files  

Release Automation

devtools/release-history.sh                     207
devtools/release-native.sh                       80
devtools/release-note.sh                        229
devtools/release-patch.sh                        26
devtools/release.sh                             913
devtools/release-version.sh                     935

2,390 lines in 7 files  

Soil: Multi-cloud CI with containers

soil/collect_json.py                             35
soil/common.sh                                   72
soil/github-actions.sh                          134
soil/github-tool.sh                              43
soil/host-shim.sh                               355
soil/__init__.py                                  0
soil/maybe-merge.sh                             151
soil/sourcehut.sh                                77
soil/tests.sh                                    20
soil/timeout-test.sh                             50
soil/travis.sh                                  125
soil/web-init.sh                                161
soil/web.py                                     420
soil/web-remote.sh                              365
soil/web-remote-test.sh                          43
soil/web.sh                                     131
soil/web_test.py                                 25
soil/worker.sh                                  461

2,668 lines in 19 files  

Benchmarks

benchmarks/alloclog.py                           41
benchmarks/alloclog.sh                           93
benchmarks/auto.sh                              109
benchmarks/awk-python.sh                         97
benchmarks/builtin-io.sh                         60
benchmarks/common.R                              89
benchmarks/common.sh                             95
benchmarks/compute.sh                           581
benchmarks/fake_libc.py                          13
benchmarks/gc.sh                                527
benchmarks/gc_stats_to_tsv.py                    51
benchmarks/gperftools.sh                         60
benchmarks/id.sh                                432
benchmarks/id-test.sh                            41
benchmarks/__init__.py                            0
benchmarks/micro.sh                              45
benchmarks/mycpp.sh                             125
benchmarks/osh-parser.sh                        519
benchmarks/osh-runtime.sh                       374
benchmarks/ovm-build.sh                         479
benchmarks/parse-help.sh                         65
benchmarks/perf.sh                              308
benchmarks/pypy.sh                               42
benchmarks/pytrace.py                            92
benchmarks/pytrace.sh                           184
benchmarks/report.R                             991
benchmarks/report.sh                            111
benchmarks/report_test.R                         32
benchmarks/startup.sh                           165
benchmarks/systemtap.sh                          75
benchmarks/time_.py                             196
benchmarks/time-test.sh                         295
benchmarks/uftrace_allocs.py                    126
benchmarks/uftrace_plugin.py                     97
benchmarks/uftrace.sh                           277
benchmarks/virtual_memory.py                     50
benchmarks/vm-baseline.sh                       164

7,101 lines in 38 files  

Metrics

metrics/bytecode.R                              388
metrics/bytecode.sh                             142
metrics/cpython-defs.R                           72
metrics/native-code.R                            88
metrics/native-code.sh                          196
metrics/source-code.sh                          492
metrics/tarball.sh                              132

1,510 lines in 8 files  

Generated Python Code

For the Python App Bundle.

_devbuild/gen/arg_types.py                      262
_devbuild/gen/arith_nt.py                         4
_devbuild/gen/demo_lib_asdl.py                  202
_devbuild/gen/expr_asdl.py                      172
_devbuild/gen/find_asdl.py                      936
_devbuild/gen/find_nt.py                         10
_devbuild/gen/grammar_nt.py                      90
_devbuild/gen/help_.py                          225
_devbuild/gen/hnode_asdl.py                     103
_devbuild/gen/id_kind_asdl.py                   864
_devbuild/gen/id_kind.py                        492
_devbuild/gen/__init__.py                         0
_devbuild/gen/option_asdl.py                    372
_devbuild/gen/runtime_asdl.py                 2,211
_devbuild/gen/shared_variant_asdl.py            327
_devbuild/gen/syntax_asdl.py                  9,207
_devbuild/gen/typed_arith_asdl.py               577
_devbuild/gen/typed_demo_asdl.py                956
_devbuild/gen/types_asdl.py                     121

17,131 lines in 20 files  

Tools

tools/deps.py                                   152
tools/osh2oil.py                              1,343
tools/readlink.py                                28

1,523 lines in 4 files  

Doc Tools

doctools/cmark.py                               376
doctools/doc_html.py                            107
doctools/html_head.py                            85
doctools/html_lib.py                             20
doctools/make_help.py                           465
doctools/oil_doc.py                             619
doctools/spelling.py                            142
doctools/split_doc.py                           151
lazylex/html.py                                 416

2,381 lines in 10 files  

Web

web/ajax.js                                     149
web/osh-to-oil.js                                79
web/table/csv2html.py                           397
web/table/table-sort.js                         433

1,058 lines in 5 files