aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/syntax/BaseFunction.java
Commit message (Collapse)AuthorAge
* Reorder arguments to BuiltinFunction-sGravatar Francois-Rene Rideau2015-03-31
| | | | | | | | | | By popular demand from other implementers, reorder BuiltinFunction arguments so that mandatory named-only arguments come befor optional named-only arguments rather than after. This will make Skylark internals slightly clearer and less surprising, at the cost of eschewing a tiny optimization. -- MOS_MIGRATED_REVID=89978554
* New class hierarchy for Skylark functionsGravatar Francois-Rene Rideau2015-03-20
* New hierarchy BaseFunction > UserModeFunction, BuiltinFunction. The old hierarchy still exists for now, to be deleted after migration: Function > AbstractFunction > MixedModeFunction > (UserModeFunction, SkylarkFunction > SimpleSkylarkFunction) (UserModeFunction is already migrated, and BaseFunction implements Function, for now.) * Function supports *args and **kwargs when calling functions, and mandatory named-only parameters in the style of Python 3. Notable difference with Python: *args binds the variable to a tuple, because a Skylark list would have to be monomorphic. * A better, simpler, safer FFI using reflection with BuiltinFunction. Handles typechecking, passes parameters in a more Java style. (Not used for now, will be used later.) * A new annotation @SkylarkSignature, intended to replace @SkylarkBuiltin, supports the full function call protocol, including default arguments. * Support for annotating function Factory-s rather than functions. -- MOS_MIGRATED_REVID=88958581