Skip to content

Commit 6dd9033

Browse files
committed
all: remove v.eval (replaced by more complete v2.eval)
1 parent 2902933 commit 6dd9033

38 files changed

Lines changed: 155 additions & 4973 deletions

cmd/tools/builders/interpret_builder.v

Lines changed: 0 additions & 7 deletions
This file was deleted.

cmd/tools/check_os_api_parity.v

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const skip_modules = [
2424
'os.bare',
2525
'os2',
2626
'szip',
27-
'v.eval',
2827
]
2928
const is_verbose = os.getenv('VERBOSE') != ''
3029

cmd/tools/vcomplete.v

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ const auto_complete_flags = [
244244
'-no-parallel',
245245
'-parallel-cc',
246246
'-native',
247-
'-interpret',
248247
'-W',
249248
'-w',
250249
'-N',

cmd/tools/vtest-all.v

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -165,20 +165,6 @@ fn get_all_commands() []Command {
165165
}
166166
}
167167
}
168-
res << Command{
169-
line: '${vexe} interpret examples/hello_world.v'
170-
okmsg: 'V can interpret hello world.'
171-
runcmd: .execute
172-
expect: 'Hello, World!\n'
173-
}
174-
res << Command{
175-
line: '${vexe} interpret examples/hanoi.v'
176-
okmsg: 'V can interpret hanoi.v'
177-
runcmd: .execute
178-
starts_with: 'Disc 1 from A to C...\n'
179-
ends_with: 'Disc 1 from A to C...\n'
180-
contains: 'Disc 7 from A to C...\n'
181-
}
182168
res << Command{
183169
line: '${vexe} -o - examples/hello_world.v | grep "#define V_COMMIT_HASH" > /dev/null'
184170
okmsg: 'V prints the generated source code to stdout with `-o -` .'

cmd/tools/vtest-self.v

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ const essential_list = [
8585
'vlib/time/time_test.v',
8686
'vlib/toml/tests/toml_test.v',
8787
'vlib/v/compiler_errors_test.v',
88-
'vlib/v/eval/interpret_test.v',
8988
'vlib/v/fmt/fmt_keep_test.v',
9089
'vlib/v/fmt/fmt_test.v',
9190
'vlib/v/gen/c/coutput_test.v',

cmd/v/v.v

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ fn main() {
157157
util.launch_tool(prefs.is_verbose, 'vdoc', ['doc', 'vlib'])
158158
}
159159
'interpret' {
160-
util.launch_tool(prefs.is_verbose, 'builders/interpret_builder', os.args[1..])
160+
eprintln('use v -v2 -eval file.v')
161+
exit(1)
161162
}
162163
'get' {
163164
eprintln('V Error: Use `v install` to install modules from vpm.vlang.io')
@@ -184,7 +185,7 @@ fn main() {
184185

185186
other_commands := ['run', 'crun', 'build', 'build-module', 'help', 'version', 'new', 'init',
186187
'install', 'link', 'list', 'outdated', 'remove', 'search', 'show', 'unlink', 'update',
187-
'upgrade', 'vlib-docs', 'interpret', 'translate']
188+
'upgrade', 'vlib-docs', 'translate']
188189
mut all_commands := []string{}
189190
all_commands << external_tools
190191
all_commands << other_commands
@@ -291,7 +292,8 @@ fn rebuild(prefs &pref.Preferences) {
291292
util.launch_tool(prefs.is_verbose, 'builders/js_builder', os.args[1..])
292293
}
293294
.interpret {
294-
util.launch_tool(prefs.is_verbose, 'builders/interpret_builder', os.args[1..])
295+
eprintln('use v -v2 -eval file.v')
296+
exit(1)
295297
}
296298
.wasm {
297299
util.launch_tool(prefs.is_verbose, 'builders/wasm_builder', os.args[1..])

cmd/v2/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@
3636
# Eval backend
3737
```
3838
# Execute a small V program directly from the v2 AST:
39-
./v2 -backend eval file.v
39+
./v2 -eval file.v
4040
4141
# Pass runtime args to the interpreted program:
42-
./v2 -backend eval file.v -- arg1 arg2
42+
./v2 -eval file.v -- arg1 arg2
4343
4444
# Self-host under eval without recursively reusing the outer compiler flags:
45-
./v2 -backend eval cmd/v2/v2.v -- -o /tmp/v2self cmd/v2/v2.v
45+
./v2 -eval cmd/v2/v2.v -- -o /tmp/v2self cmd/v2/v2.v
4646
4747
# Current scope: literals, locals/consts, plain fn calls, if/for/range,
4848
# arrays, indexing, len, println/print, and basic string interpolation.

vlib/v/builder/interpreterbuilder/ibuilder.v

Lines changed: 0 additions & 23 deletions
This file was deleted.

vlib/v/builder/interpreterbuilder/v_interpret_test.v

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)