Age | Commit message (Collapse) | Author |
|
See https://github.com/bazelbuild/starlark/pull/145
for spec changes.
Updates https://github.com/bazelbuild/starlark/issues/20
|
|
This change makes go.starlark.net's floating-point implementation
match the proposed spec (see https://github.com/bazelbuild/starlark/pull/119),
and thus much more closely match the behavior of the Java implementation.
The major changes are:
- Float values are totally ordered; NaN compares greater than +Inf.
- The string form of a finite float value always contains an exponent
or a decimal point, so they are self-evidently not int values.
- Operations that would cause a large integer to become rounded to
an infinite float are now an error.
The resolve.AllowFloat boolean, and the corresponding -float command-line
flag, now have no effect. Floating point support is always enabled.
|
|
This change defines a standard Starlark module for JSON encoding and decoding.
See json.go for documentation.
It is intended to subsume, generalize, and eventually
replace Bazel's ill-conceived struct.to_json method.
The json module is predeclared in the Starlark REPL environment.
See related issues:
https://github.com/bazelbuild/bazel/issues/7896
https://buganizer.corp.google.com/issues/23962735
https://buganizer.corp.google.com/issues/70210417
https://github.com/bazelbuild/bazel/issues/7879#issuecomment-477713954
https://github.com/bazelbuild/bazel/issues/5542
https://github.com/bazelbuild/bazel/issues/10176
https://github.com/bazelbuild/starlark/pull/83
https://github.com/bazelbuild/bazel/issues/3732
|
|
Also, print file:line:column in disassembly output.
|
|
* cmd/starlark: add Go memory profiling support
For #184
* cmd/starlark: check errors in profiling code
|
|
See profile.go for design.
|
|
See https://github.com/bazelbuild/starlark/issues/20#issuecomment-456647994
|
|
Change-Id: I87611167fd3a03a87b1cd98127ca5de2fd38b73c
|
|
...and remove three ad-hoc implementations.
Also, don't preallocate slice argument to writeValue, as it does not escape to the heap.
|
|
starlark: permit if/for/while at toplevel if -globalreassign
|
|
Also:
- make the option handling work the same across all tests
- be explicit about which options are needed in each test chunk
- improve documentation of options
- rename fp option to float consistently
- rename global_reassign option to globalreassign consistently
Fixes #36
Change-Id: I8fdf5725ce47c2f4a87aac9d5c24583e503d0f74
|
|
This change adds a number of small features to improve debugging.
The actual debugger API will come in a later change.
- Thread.Name : an optional string field that describes the purpose of
the thread, for use in debugging.
- (*Program).Filename: a method that reports the file of the program.
Also, a String method that returns the same thing.
Also, a test that it reports the correct location even for
an empty file (a special case of the previous implementation).
- (*Frame).Local(i int): a method to return the value of a local
variable of an active frame, such as one might use in debugger's
stack trace.
- ExprFunc: creates a starlark.Function from a given expression,
such as one might use in a debugger REPL.
|
|
-c was chosen to match Python. Sample:
$ starlark -c "print(max(range(10)))"
9
$ starlark -c "a = 'hi'" -showenv
a = "hi"
|
|
Adds a flag, AllowRecursion, that enables while statements and
recursive functions.
|
|
Change-Id: I84d6a9d8426ff869997e8dce17bda9a30bccef71
|
|
|
|
|
|
Change-Id: Iebd0e040ff674b2f9da39bf5242c8afaa7f4ddc8
|