Compiler: Added some doc.
Compiler: Add format attribute to yywarning() and my_yyerror().
Compiler: Changed API for index_node(). index_node() now uses the name of the indexed node to describe the node and to detect indexing of predef::. Also adds a few calls of set_node_name().
{safe_,}pike_fprintf: Add format attribute
Compiler [AST]: Set the name of nodes in some common cases. Preparation for changing the index_node() API.
Build: Fix lots of string_builder_sprintf() formatting strings. Also fixes a bug in string_builder_append_comment().
Build [Compiler]: Inhibit erroneous warning from gcc 7.3.0. Fixes "warning: offset '7' outside bounds of constant string".
Work in progress: Sakura master
Compiler [Typechecker]: Strip scope from lfun types. Fixes too hard matching against some (eg `[]=()) lfuns.
Compiler: Adjust approach to lfun::create() fallback. Instead of having a fallback at lookup time, the compiler now adds lfun::create() as an alias for lfun::__create__() if there is no explicitly defined lfun::create(). This should be (much) more robust and backward-compatible. Fixes some fall-out from the #10086 changes.
Compiler: Look up of ::create() now falls back to ::__create__(). Fixes various calls of ::create() and similar in classes where there only is an implicit create() (ie only __create__()). Fixes multiple testsuite failures.
Compiler: Add lfun::__create__(). This lfun is intended to hold the code previously inlined in lfun::create() for the implicit create syntax. Preparation for implementing the implicit create case(s) of #10086.
Compiler: __weak__ now implies zero in the type for variables. Fixes #10083.
Iterators: Improve robustness of backward compatibility. Move backward compat detection code from compiler to predef::get_iterator(). Backward compatibility is now handled by wrapping old iterators with CompatIterator.
Iterators: Changed iterator API. Runtime: * Iterators now start at the position before the first element. * foreach() calls lfun::_iterator_next() on entry. This means that the loop will skip the element the iterator was on (if any). * Removed lfun::`+(), lfun::`+=() and lfun::`!() from the builtin iterators to simplify the semantics. * Implementing just lfun::_iterator_next() is now sufficient to make a working iterator. Compiler: * The Pike compiler will add a wrapper lfun::_iterator_next() for code that uses the original API. TODO: * There are more iterators that need to be adjusted to the new API. Fixes some of #10085.
Compiler: Skip iterator compat if one of the "lfuns" is actually a variable
Compiler [Typechecker]: Add function name field to call_state.
Compiler [Typechecker]: Update some more calls of new_get_return_type().
Compiler: Adjust type requirements for LFUNs.
Compiler [Typechecker]: Use new APIs when checking LFUN types.
Compiler: Adjust LFUN type requirements to use __unknown__. Fixes multiple warnings.
Compiler: Fix complaints about missing definition for local function __INIT().
Compiler: Improved type for __INIT().
Compiler [bytecode]: Move add_relocated_int_to_program into code/bytecode.c
Compiler [Typechecker]: Fix checking of overloading of variants.
Compiler [Typechecker]: Relax type for lfun::_sprintf(). It is common to have _sprintf()'s that do not care about their arguments, so allow _sprintf()'s without arguments. Fixes a few testsuite failures.
Compiler [Typechecker]: Improved type for setters. Fixes some warnings.
Compiler [Typechecker]: Adjust types for assignment lfuns. The values returned from lfun::`[]=() and lfun::`->=() are currently ignored, so allow returning void. Fixes a few more warnings.
Compiler [Typechecker]: Improved types for assignment lfuns. Fixes some warnings.
Compiler [Typechecker]: Missed a line in previous commit.
Compiler [Typechecker]: Reduce complaints about lfuns. Do not complain about optional arguments missing in prototypes for lfuns implemented in Pike.
Runtime: Removed the old LFUN lookup code.
decode_value: Fix "Calling undefined function __INIT()" The autogenerated __INIT calling through to inherited __INITs should not be generated on decode_value, because it has already been recovered from the dump.
Compiler [Typechecker]: Fix type for lfun::`[]=() to match documentation.
decode_value: Alloc parent_info_storage for PROGRAM_USES_PARENT. end_first_pass(0) does not allocate parent_info_storage. This sometimes caused programs returned by decode_value() to have both PROGRAM_USES_PARENT and PROGRAM_PASS_1_DONE set but have a NULL parent_info_storage. This some code (eg low_clone()) to dereference NULL.
Compiler: Fix generation of nested __INIT() calls. Fixes bug triggered by Calendar.Time when generating __INIT() call to Calendar.TimeRanges::__INIT().
Compiler: Add TRACE_POINTS when the linenumber changes.
Compiler [Typechecker]: Fix warning about overloading classes with create(). Do not check the types for overloaded constants before the last pass.
Compiler [Typechecker]: Added flags to pike_types_le().
LFUNs: Update the types for lfun::`+(), lfun::``+() and lfun::`+=(). These lfuns are no longer called with multiple arguments, so update the types and documentation accordingly.
Compiler [Typechecker]: Fix typo in diagnostic.
Compiler [Typechecker]: Fix argument order in diagnostic message.
Compiler [PIKE_DEBUG]: Verify the identifier reference table.
Compiler: Adjusted encoding of compat lfun names. lfun_names entries with compat names are now preceeded with a NUL and are NUL-separated. This makes the debug checks in stralloc.c happier, as the resulting static strings now are NUL-terminated.
Documentation [LFUNs]: Added some compat notes.
Documentation [LFUNs]: Added some doc for the _iterator_*() lfuns.
Fixed typo.
Fix machine code on macOS 11 macOS 11 adds two JIT hardening features: * Memory can only be mmapped as both PROT_WRITE and PROT_EXEC if MAP_JIT is also specified. * Memory mapped with MAP_JIT is never writeable and executable at the same time. It is necessary to call a function before writing, and then again after writing to make it executable again.
DMalloc: Register programs with dmalloc.
Runtime: Fix NULL-deref --with-cleanup-onexit.
Compiler: Fix indexing with compat lfun names. Fixes broken constant indexing with eg strings like "value" or "index", where the compiler generated code to index via the lfun lookup table regardless of whether the symbol actually was present in the table. Fixes eg the expression Standards.ASN1.Types.String("")->value.
Compiler [LFUNs]: Fix memory leak.
Compiler: Fixed a few typos. Fixes some compilation errors.
Compiler: Do not warn about compat iterator lfuns when not iterator.
LFUNs: Only fallback to the old iterator lfuns if they are all implemented. Fixes lots of warnings from Calendar.TimeRanges.TimeRange et al.
LFUNs: Remove some more obsolete code.
LFUNs: Rename iterator lfuns to lfun::_iterator_{next,index,value}(). The names "next", "index" and "value" are too generic to be reserved. Also adds generic backward compatibility for renamed lfuns.
LFUNs: Support atomic get and set with lfun::`->=() and lfun::`[]=(). `->=() and `[]=() should now return the previous value. Also alters ::`->=() accordingly.
Documentatation: Document lfun::_atomic_get_set(). Also adds FIXMEs for some undocumented lfuns.
LFUNs: Add lfun::_atomic_get_set().
Compiler: Added some missing types when --without-new-lfun-lookup. The types for lfun::next(), lfun::index() and lfun::value() were missing when compiling --without-new-lfun-lookup.
Compiler: Fix LFUN lookup table. The lfun_names table was not in sync with the LFUN enum. This caused eg some operations on bignum objects to behave in unexpected ways. Fixes build issues on 32-bit architectures.
Runtime: Have the same set of lfuns regardless of lookup method. Add the missing iterator lfuns to the old-style lfun lookup method.
Compiler: Stop filtering lfun prototypes from the lfun table. Fixes warnings in Tools.Standalone.test_pike (which has an abstract base class with prototypes for lfuns).
Compiler: Added string_builder_append_{file,line}_directive().
Compiler: Added string_builder_append_comment().
Compiler: Implemented an alternative lfun lookup table.
Runtime: More use of QUICK_FIND_LFUN().
Compiler: Added convenience function find_identifier_inh().
LFUNs: Added lfun::_reverse(). This is a function that is called by reverse() to generate a reversed object.
Compiler: Move node_allocator to struct compilation. Allocated nodes may need to live during an entire translation unit. This moves the allocator from struct Pike_compiler (ie compilation.h) to struct compilation (aka CompilationEnvironment.PikeCompiler). Fixes use of already freed nodes after certain syntax errors.
Compiler: Make sure that Pike_compiler->compiler is initialized.
Compiler: do not make function names static strings It is not safe to create static strings for constant C strings when used from shared modules. When modules are unloaded the shared string may then point into unmapped memory which will lead so segmentation faults. This is a partial revert of commit f1b636b7822d862a1a7958ddeff5e82f555acf68.
Debugger: add basic breakpoint struct and line offset counting function.
Profiling: zero-initialize program's identifier profiling fields. This is a follow-up to ac77f9767aaa, where the 'fun' member has been removed from the program. Also moved the code to the point after 'funp' initialization.
Compiler: Fix template type for _destruct().
Merge branch 'patches/pike221' into 8.0 * patches/pike221: Compiler: object->program_id only exists --with-debug.
Compiler: object->program_id only exists --with-debug.
Merge branch 'patches/pike221' into 8.0 * patches/pike221: Compiler: Make get_name_of_function() survive destructed functions. Compiler: Improved robustness of placeholder activation.
Compiler: Improved robustness of placeholder activation. Make program_id match prog->id in activated placeholder objects (previously it stayed as null_program->id). Fixes some of PIKE-221 (#8221).
Thread.ResourceCountKey: Make destruct immediate
[debugger] Add WIP code for the debugger. This commit contains changes in the language core necessary for enabling the debugger's breakpoint and stepping feature. It also contains a work-in-progress pmod, Debug/Debugger, that is an interface between the interpreter and debugging client. The debugger needs Pike to be compiled '--with-debug'. The core's behavior remains unchanged in case of this flag's absence. Co-authored-by: Henrik Grubbström (Grubba) <grubba@grubba.org> Co-authored-by: William Welliver <william@welliver.org>
Move string_builder_append_disassembly() to string_builder.cmod. Some minor API-changes to string_builder_append_disassembly() to make it architecture-independant, and suitable for more use-cases than just byte-code disassembly. The displayed address is now independant of the actual address of the memory dump. Also adds some documentation.
Runtime: Added find_inherited_{fun,prog}().
Compiler: Increase paranoia of the implements and is_compatible caches. implements() and is_compatible() should now survive if their low-level implementations release the interpreter lock. Fixes PIKE-192 (#8192).
Merge branch 'patches/pike192' * patches/pike192: Compiler: Increase paranoia of the implements and is_compatible caches.
Compiler: Survive new_program being NULL. Fixes [LysLysKOM 23386221] some more.
Compiler: Remove some redundant code. Disambiguation of multiple inherit ::-references is now done by low_program_from_svalue().
Merge remote-tracking branch 'origin/master' into new_utf8
Compiler: Adjusted some error messages.
EFUNs: get_iterator() now passes extra args to lfun::_get_iterator().
Compiler: Warn about lfuns that are not declared protected.
Fixed typo in lfun::destroy() compat code.
Runtime: Support arrays in program_from_svalue() et al. They now handle arrays in the same manner as inherit.
Compiler: Added compat entries for destroy().
Compiler: Added low-level function is_lfun_name().
Compiler [debug]: Updated yet another linenumber parser.
Compiler: Reuse inherited references that are already inline. There is no need to create a new ID_INLINE reference if there already exists one from the inherit.
Compiler [debug]: Updated a few more linenumber parsers.
Merge commit '722771973bd' into patches/lyslyskom22891031 * commit '722771973bd': (6177 commits) Verify that callablep responses are aligned with reality. ...
Compiler: Silence compiler warnings GCC 8 got more picky about function pointer signatures, but there is really no need to let those warnings bother us.
Merge commit '2470270f500c728d10b8895314d8d8b07016e37b' into grubba/typechecker-automap * commit '2470270f500c728d10b8895314d8d8b07016e37b': (18681 commits) Removed the old typechecker. ...
Compiler: Call end_pass_identifier() for identifier annotations.
Compiler: Missed one place in store_linenumber_* rename.
Compiler: Renamed store_linenumber_frame_* to store_linenumber_local_*. This naming should be somewhat clearer.
Compiler: Removed some dead and obsolete code.
Compiler: Make add_{,program_}annotation() PMOD_EXPORT. This makes it possible to add annotations to programs implemented in C.
Compiler: Added store_linenumber_frame_end(). This reduces leaking of local variable info between blocks of code.
Debugger: correctly compute line offsets with variable info present.
Merge branch 'grubba/wop-local-variables-debug-info' into bill/debugger-concept
WIP: Local variables debug info.
Compiler: Added pseudo opcodes F_FRAME_*. These are intended to be used for propagating information about local variables in the current frame.
Documentation: Fixed markup typo.
LFUNs: Added magic lfun ::_annotations().
Compiler: Fixed some COMPILER_DEBUG bugs.
Debug: dump_program_{tables,desc}() are now annotations-aware.
Annotations: Only register annotations in the first pass. Annotations are now created in the first pass, and kept as is for later passes. This makes it possible to store pass-persistent state in the annotations.
Annotations: Missed adjusting one place in previous commit. Fixes duplicate annotations for inherits.
Compiler: Removed some now dead code.
EFUNs: Return an array(multiset) from predef::annotations(). A multiset is a more natural datatype for the set of annotations. NB: The low-level code still uses arrays; this will most likely be changed later.
Compiler: Inherit annotations are now stored in a multiset. This is a more natural representation of a set of annotations.
Compiler: Fixed typos in previous commit.
Compiler: Use multisets for annotations on identifiers.
EFUNs: m_clear() now supports multisets and objects. Adds LFUN _m_clear().
EFUNs: Added m_add(). This function adds (as opposed to inserts) an element to a multiset. Also adds corresponding (fake) lfun::_m_add().
Runtime: Adjusted API for lfun::_annotations(). The API for lfun::_annotations() now aligns better with the APIs for lfun::_indices(), lfun::_values() and lfun::_types(). Also adds some minimal documentation for some undocumented lfuns.
EFUNs: Fixed leak of arrays in annotations() on programs.
WOP: Local variables debug info.
Runtime: Extended low_get_line() with local variable info.
Compiler: Extended linenumber info table with local variable info. Adds store_linenumber_frame_{name,type}().
Compiler: Fix autodoc typo
debugger: a little debug, and keeping the local names from being freed.
debugger: track stepping mode by thread, remove some debugging output
EFUNs: Added predef::annotations(). This function returns the annotations (if any) corresponding to the symbols returned by indices() on the same value. Also adds lfun::_annotations().
debugger: allow creation of breakpoints on programs that haven't been created yet. warning: this code almost certainly has a number of crashers. it works in the most basic of situations but don't expect much more from it yet.
debugger: multiple breakpoint support, enable/disable support.
debugger: finding offsets in a program composed of multiple files works more reliably.
Compiler: Added support for Pike.Annotations.Inherited. This attribute has the same semantics as the attribute of the same name in Java.
Compiler: Moved class annotations to the inherits. This adds semantics to having annotations on inherits.
Compiler: Added Pike.Annotation. The compiler now calls end_pass() in any annotations on the program being compiled once each compiler pass.
Compiler: Make Coverity happy. Coverity doesn't like ending a do-while(0) loop with continue. Fixes [CID 1441424].
Runtime: Fix file name in backtraces. The file name for code where the next line number entry switches to a different file was activated prematurely. Fixes the rest of [LysLysKOM 22997909].
Merge branch 'patches/lyslyskom22997909' into 8.0 * patches/lyslyskom22997909: Testsuite: Test low_get_line() some more. Runtime: Fix file name in backtraces. Compiler: Keep track of the file name...
Merge branch 'patches/lyslyskom22997909' * patches/lyslyskom22997909: Testsuite: Test low_get_line() some more. Runtime: Fix file name in backtraces. Compiler: Keep track of the file name...
preliminary proof of concept debugger. single breakpoint, single stepping, continue, local viewing but no local names.
Compiler: Fixed multi-counting of annotations. Annotations were added in every pass of the compiler. They are now cleared at the start of each pass.
GC: Make the GC aware about annotations.
Compiler: The 'implement'-keyword is no more. This functionality will be provided via the annotation syntax instead.
PikeCompiler: Move high-level classes to _static_modules.Builtin. Top-level CMOD symbols in pike_compiler.cmod were previously lost to the void unless explicitly handled. They now instead show up in _static_modules.Builtin (as with similar symbols elsewhere).
Compiler: First go at storing annotations.
Merge remote-tracking branch 'origin/8.1' into gobject-introspection
Compiler: Improved support for defining no-ref variables.
Compiler: Renamed keyword implements to implement. This is to avoid the name clash with Program.implements().
Compiler: Added new keyword and syntax: implements. This keyword is intended to be used to inform the compiler that the current class intends to implement an api.
Compiler: Fix off-by-one indexing in string_builder_append_pike_opcode()
Compiler: Support inherit of CompilerEnvironment. Fix some bugs triggered in the supporter subsystem when executing in an inherited CompilerEnviroment.
Compiler: Cleaned up the resolv() calling conventions. CompilerEnvironment()->PikeCompiler()->resolv() now takes a single argument, and looks up the current file and handlers from the PikeCompiler object, and then calls CompilerEnvironment()->resolv(). The actual calling of resolv() in the handlers is now performed by CompilerEnvironment()->resolv().
GC: Inline GC marker struct into memory object structs This avoids unnecessary padding while keeping mostly compatible to most other users of these structs and markers.
Merge branch 'tobij/inline_gc_markers' into 8.1
Remove redundant includes.
Compiler: Added string_builder_append_pike_opcode().
Merge commit '75c9d1806f1a69ca21c27a2c2fe1b4a6ea38e77e' into patches/pike63 * commit '75c9d1806f1a69ca21c27a2c2fe1b4a6ea38e77e': (19587 commits) ...
Fix spelling of FALLTHRU directive The non-standard spelling "FALL_THROUGH" is not recognized by gcc 7.3. Also, the comment must not contain any other text, or be placed inside braces.
Merge remote-tracking branch 'origin/8.1' into peter/travis
Runtime: Fix duplicate entries from indices() et al on programs.
Merge branch '8.1' into peter/travis
Equvivalent and equivalent are not equivalent.
Compiler: Fixed string_builder_append_disassembly(). Support appending disassembly without corresponding memory dump.
Compiler: Improved handling of inherit in extra pass. Don't complain about unfinished programs in the extra pass.
Compiler: Fixed variant lookup bug in extra pass.
Compiler: Fixed typo from COMPILER_PASS_* conversion. Fixes handling of local/inline variables that got broken when COMPILER_PASS_* were added. Fixes multiple testsuite failures.
Compiler: Added even more COMPILER_PASS_*. The compiler now seems to survive renumbering of COMPILER_PASS_*. Also fixes a few (disabled) debug statements in language.yacc.
Compiler: Add symbolic constants COMPILER_PASS_*. This is in preparation for adding more passes.
Compiler: Warn if variant type changes in second pass.
Compiler: Improved variant robustness. Perform a more lenient scan for the previous definition of a variant in the second pass. Should fix issues with not finding variants in the second pass, causing the fatal "Internal error: Not allowed to add more identifiers during second compiler pass."
Compiler: fix compile error with profiling These profiling initialization was moved to low_add_identifier.
Interpreter: merge low_return variants
Compiler: Fixed typo in previous commit.
Compiler: Only check LFUN types in second pass.
GC: Inline markers into datastructures Initial work is done. This may have worse performance characteristics for now. Futher work will use the block allocator provided iterator instead of linked lists to visit all objects and potentially optimize the memory layout of the marker struct.
Compiler: Let #pragma no_deprecation_warnings inhibit some more. falling back to destroy() if _detruct() doesn't exist.
Merge branch 'grubba/rename_lfun_destroy' into 8.1 * grubba/rename_lfun_destroy: Modules: Fixed logts of warnings. Testsuite: Updated for LFUN::_destruct(). Compiler: Don't complain about LFUN::destroy() in compat mode. Fix multiple warnings. Runtime: LFUN::destroy() has been renamed to _destruct(). Compiler: Rename LFUN::destroy() to LFUN::_destruct().
Compiler: Don't complain about LFUN::destroy() in compat mode.
Compiler: Rename LFUN::destroy() to LFUN::_destruct(). As decided at Pike Conference 2017.
Remove computed goto interpreter mode By descision of the Pike conference, computed goto mode was removed.
Remove !SHARED_NODES Pike with SHARED_NODES disabled did not work. By descision of the Pike Conference it is removed.
Compiler: Added convenience function lexical_inherit(). This function looks up a symbol in the specified lexical scope and inherits it.
Added some const
ID_STATIC -> ID_PROTECTED
Compiler: Fixed prototype for _size_object().
Use Pike_sp instead of sp
Compiler: instr_prologue_* are only available with machine code
Compiler: Use low_resolve_identifier() in resolve_program(). This reduces the overhead somewhat.
Compiler: Cleaned up resolve_identifier() somewhat. Adds low_resolve_identifier().
Compiler: Fixed warning.
Compiler: More code simplifications. Rename add_identifier() to low_add_identifier(), to make place for a new add_identifier() that also updates the references table. Make use of the new higher-level add_identifier().
Compiler: Reduce the amount of code duplication somewhat. Adds internal function add_identifier(), to help set up the argument and call debug_add_to_identifiers().
Compiler: Moved yyreport() et al to pike_compiler.cmod. More code cleanup.
Compiler: Moved {null,placeholder}_program to pikecompiler.cmod. Use the CMOD preprocessor for these programs.
Compiler: Moved definition of trampoline class to builtin.cmod. NB: Moved declaration of struct and program to svalue.h due to use by macros there.
Compiler: Survive add_program_constant() without active compilation. This is needed to be able to use CMODs at the top level.
Compiler: Move some more stuff from program.c to pike_compiler.c.
Break out compiler stuff from program.c to pike_compiler.c. Code layout cleanup. Work in progress; there's still quite a bit of stuff left in program.c that ought to be in pike_compiler.c.
Compiler: Added internal function find_predef_identifier().
Documentation: Updated syntax in doc for lfun::create().
Compiler: Added reverse_symbol_lookup() et al. This is an API intended for use by the disassemblers.
Compiler: Some layout adjustments of string_builder_append_disassembly().
Compiler: Fixed indentation of PROGRAM_BUILD_DEBUG.
Compiler: Adjusted warning message for masked variants.
Compiler: Added INHERIT_LOCAL. Move handling of local:: to find_inherited_identifier().
Break out sprintf-related stuff from stralloc.h to sprintf.h. Minor header file cleanup.
Compiler: Added API function string_builder_append_disassembly(). This is a function intended to be used to simplify formatting of disassembly output.
Compiler: __ARGS__ is now a macro expanding to __args__. This ensures that the symbol was reserved in prior versions of Pike, and also makes it possible to check support via #ifdef.
Compiler: Added support for arguments to implicit lambdas.
Replace dynamic_buffer API everywhere This change should be purely cosmetic. It replaces the old dynamic_buffer API by the corresponding byte_buffer API everywhere. The wrapper definitions in dynamic_buffer.h will remain for now.
dynamic_buffer: use new buffer internally The API of dynamic_buffer is now a slim swapper around the new buffer API. This changes many places where the dynamic_buffer internals were directly used.
describe_svalue: do not use global buffer This commit removes the dynamic buffer from describe_svalue and related funtions.
Documentation: The DefaultCompilerEnvironment is a CompilerEnvironment.
Identifiers can no longer contain non-ascii whitespaces. wide_isidchar can now also easily be upgraded to disallow other special characters.
Documentation [LFUNs]: Improved doc for lfun::`->=() et al.
Build [NT]: Fixed C99-ism. Fixes compilation issue on NT.
Compiler [resolver]: Protect id_to_program() against circularities.
Compiler: Added ID_WEAK. Variables with the modifier flag ID_WEAK now become IDENTIFIER_WEAK.
program.c: autodoc fix
Compiler: Warn about unreachable variant functions.
Documentation: Documented optional further args to search(). Also fixes the types for search() and lfun::_search().
Compiler: Object variables declared as mixed may contain this... Don't reference count direct cyclic references via mixed variables. Fixes [LysLysKOM 21860701]/[Pike mailinglist 14570].
Compiler: Added CompilerEnvironment()->lock(). This is a class that exposes the compiler internal lock. Fixes some of [bug 7783 (#7783)].
No need of calling findstring on __INIT. We have a reference in lfun_strings.
Interpreter: simplify struct pike_frame - expendibles and save_sp are usually only used during setup and frame deallocation. It is enough to store them as offsets from 'locals' - reordered the struct entries to avoid some padding
Documentation [Compiler]: Added some notes about supporters.
hashtable.h isn't used here.
Interpreter: remove mark_sp_base mark_sp_base in struct pike_frame was unused
It's tedious to write trim_all_whites. Make trim the canonical name.
Use enums for lfun:s for more convenient debug
Interpreter: seperate apply functions into several steps
Interpreter: remove mark_sp_base from frame mark_sp_base was always identical to save_mark_sp and never used.
Interpreter: store save_sp and expandibles as offsets
Compiler [Variables]: Fixed integer range check for complex integer types. Fixes eg the Filesystem.Zip (which uses typedefed integers) tests on 32-bit systems.
int(range) is now stored in a native integer if the range will fit. Since "large" is stored as INT32 max/min it tends to always fit if the range is not unbound. This means that a variable set as int(0..255) will no longer be able to store values bigger than or smaller than the size of the native integer, which is an incomatible change, albeit a fairly logical one.
make _sqrt a "fake" lfun
Renamed pow lfun from pow to `**. This is somewhat incompatible, previously pow(X,3) called X->pow, now it will call X->`**.
Added ** as the exponentiation operator.
Compiler: Added INHERIT_{SELF,GLOBAL,ALL}. Clean up find_inherited_identifier() somewhat by using symbolic constants.
Compiler: Got rid of test that was always true. This was a remnant of the Pike 7.6 compat layer.
Compiler: this_function now obeys the inherit specifier.
Compiler: Improved handling of inherit ::this_program.
Compiler: Use find_inherited_identifier() for ::this_program.
Compiler: Fixed some bugs in find_inherited_identifier().
Compiler: Added helper function find_inherited_identifier(). This function is intended to be used to reduce some of the duplicated code in language.yacc.
Compiler [auto]: Fixed multiple issues. The PIKE_T_AUTO type node now always has a child type. gc_check_type() now knows about PIKE_T_AUTO. {debug_,}push_auto_typed_type() is no more. Fixed issue with low_describe_type() appending to the wrong buffer when describing the auto type. Fixes some related type reference counting errors.
Removed PTRDIFF_T_TO_LONG
Compiler: Survive alias getting replaced by constant in second pass.
No need to include stuff.
Random: Updated some types and AutoDoc.
Change the _random interface to provide rnadom_string and random from the called random object.
Removed map_variable.
Removed simple_add_variable as it isn't used and has the old type of type argument.
Remove the fatal shorthand for Pike_fatal.
Remove pike_add_function2.
SIMPLE_BAD_ARG_ERROR is only kept for compatibility, but we still had 500+ uses of it.
Use variadic macros.
Documentation: Fixed typo in documentation comment.
Merge branch 'per/auto_type_81' into 8.1
First stage of the 'auto' type. Works, but for now only for variable declarations, not return types (entirely, most of the plumbing is done) or for variables declared in foreach and sscanf. Since the loop variables in foreach is really the most important location, this is of somewhat limited use so far. Commited for safekeeping. Conflicts: src/language.yacc src/lexer.h src/pike_types.c src/svalue.h
Somewhat better handling of global auto variables
Compiler: Rename debug_find_shared_string(). Rename debug_find_shared_string() to debug_findstring(), since it does what debug_findstring() has done historically, and remove the old (new?) implementation of debug_findstring().
Compiler: Use debug_find_shared_string() instead of debug_findstring(). These calls all are to check that the string has been properly added to the string hash table (ie "finished"), so it is safe to just perform a straight hash table lookup. Fixes the performance issue caused when using debug_findstring().
Compiler: added compile and program unload events
Removed some 8-bit characters that grep doesn't like (I should probably fix grep).
Build: Fixed typo in --with-debug code.
Mark some more code as unreachable.
Obsess less about if size_shift is 3.
Removed Intel IA64 compiler specific DO_NOT_WARN.
Merge branch '8.1' into grubba/typechecker-mk3 * 8.1: (51 commits) Compiler [Types]: Got rid of my_describe_type(). Compiler [Types]: Fixed wide strings in nested types. Compiler [Types]: low_describe_type() now uses string_builder. string_builder_sprintf: Fixed '+' for floats. string_builder_sprintf: Added support for %T. Calendar.mkrules: Improved backward compat. Auth.OAuth.Client: Fixed AutoDoc markup issue. New modules for communicating with different (RESTful) web apis (including OAuth and OAuth2 client modules) . Documentation [%]: Added some clarifications and improved markup. Inotify: Minor code cleanup. Potential fix for [CID 1325796]. Inotify: Removed some debug output. Filesystem.Monitor [Inotify]: Improved support for blocking mode. Inotify: Don't reference count immediate circular references. Inotify: Removed some dead code. System.Inotify, Filesystem.Monitor: Updates to use new Inotify API. Inotify: Use fd_callback_boxes, internal event parsing. Search.Database.MySQL: Censor the SQL-url. Sql: Added censor_sql_url(). Search.Database.MySQL: Avoid long lived database connections. Inotify: Don't throw errors in rm_watch() on invalid watch descriptor. ...
Compiler: Fixed invalid pointer dereference in error message.
Optimized store_prog_string and store_constant somewhat. They are now O(n) instead of O(n^2) for common cases. For strings, when the number of references to the string is 1, and for constants when equal is not true (using == instead of equal) and refs==1 and the whatever is not an object but has references.
Merge remote-tracking branch 'origin/8.1' into per/substrings
GTK1 is deprecated
Build: Fixed some warnings. The first argument to low_quick_add_function() can't be const, since it will have references added...
Strings: generate more static strings quick_add_function and make_shared_string will now create static strings when the argument is a compile time constant
Merge branch 'arne/string_alloc' into 8.1 Conflicts: src/backend.cmod src/builtin.cmod src/builtin_functions.c src/stralloc.c
Compiler: LFUN prototypes are not useful... Reenable the code that hid prototypes from the LFUN lookup table.
count_memory: avoid visiting refs at all in negative lookahead mode.
Compiler: Improved cycle detection in implements() and is_compatible(). Under some circumstances the new cache entries could be overwritten before the functions had completed, leading to infinite recursion. Fixes [InfoKOM 775534]. Compiler: Added some missing END_CYCLIC(). All execution branches from a BEGIN_CYCLIC() must either END_CYCLIC() or throw an error before DECLARE_CYCLIC() falls out of scope. Potential fix for [LysLysKOM 20940558] (Pike developer list).
Removed trailing spaces.
Allocation failure fixes.
Compiler: Improved stack robustness against compiler errors. Some syntax errors leave droppings on the stack, and this could confuse other code. Fixes fatal "yyparse() left 2 droppings on the stack!" for a testsuite test.
Compiler: Added some error handling for aliases. Fixes [CID 1298215].
Compiler: Fixed typo in prototype reference fix. Fixes various compilation issues with the Crypto modules.
Compiler: Don't reference inherited prototypes. Having local references to inherited prototype functions is not useful, as they can never become anything else than a prototype. It also confuses code that uses mixins and attempts to use the anonymous inherit specifier to access the base implementation in one inherited class when there's a corresponding prototype in another inherited class, in which case both functions were returned. This typically caused "Calling undefined function.". As a bonus this also improves code generation somewhat.
Fixed decode_value() for GTK1-related objects. The base module for GTK1 has been renamed from ___GTK to ___GTK1... Fixes "Decode failed: Decode error: Failed to get program from ID 1035.".
Program: Disabled some code when not PIKE_DEBUG. Fixes [CID 742547].
Program: Removed some dead code. Fixes [CID 1294593].
Silence more compiler warnings by restoring the UNUSED() family of macros. If this change exposes any invalid attributes, please remove them specifically instead.
Runtime: Always validate the linenumber information. Fixes [CID 1294660].
Misc: Added some missing fall-through markers and breaks.
Remove deprecated security system.
Doc: Clarified the difference between LFUNs `==() and _equal().
Compiler: Clear local variables on pop. Local variables may get reused after pop, and such code expects getting clean variables. This also reduces the lifetime for various locks and similar to the expected range. Note that this reduces the quality of the generated code somewhat.
check_type_string is a noop. Remove it.
Compiler: Added low_is_variant_dispatcher(). This function is useful when you have an identifier that might be a variant dispatcher, but you don't know of a corresponding reference.
Removed F_IDENTIFIER: It was never generated. This lessens the confusion and code-duplication somewhat.
Added a note about the lfun list in the autodoc parser
Only set IDENTIFIER_NO_THIS_REF for object and function variables
Compiler: Improved cycle detection in implements() and is_compatible(). Under some circumstances the new cache entries could be overwritten before the functions had completed, leading to infinite recursion. Fixes [InfoKOM 775534].
GC: Clean up some of the visit_* API. All the visit_*() functions now have all arguments.
GC: Propagate the extra parameter everywhere. All the visit_*() functions and macros should now propagate the argument extra.
GC: Added visit_{enter,leave}() API. Make it easier to keep track of state in the visit_*() API by tracking when we start and stop visiting things.
Runtime: Added PROGRAM_CLEAR_STORAGE. Adds a flag indicating that the storage held by objects of the class should be cleared prior to being freed. This is mainly to avoid having secrets around longer than necessary. FIXME: Consider adding a corresponding flag for objects to mark eg some bignums for clearing.
Runtime: Added convenience function get_inherited_storage(). This function returns the storage in the current object belonging to a specific inherit.
Changed return type of get_{inherit_,}storae to void* This makes it possible to remove quite a lot of casts.
Moved implements_cache and friend to power of two. Also shrunk it by a factor of four, we really should have dynamic sizes here.
Compiler: Fixed thread context conflict. co_wait_interpreter() doesn't swap out and in the active thread... Fixes [LysLysKOM 20811527] (and probably [LysLysKOM 20811537] as well).
Compiler: Improved type checking for program references. Inherits and type declarations now complain about use of deprecated symbols.
Compiler: Avoid threads_disable(). The Pike compiler now uses a dedicated reentrant lock instead of the brute-force approach of using threads_disable(). This should improve concurrency with other threads.
realloc takes void* and doesn't need any cast.
Runtime: Improved robustness of parent_storage(). Under some circumstances parent_storage() could return a storage pointer to a class that had inherited the parent program. Fix this by making sure that we get the storage for the program that we expect to find as parent.
Compiler: Support __INIT with C programs. When a C program inherits Pike code, it may need to have an __INIT. This would previously cause fatal errors as end_program() transited to compiler pass #2 before the __INIT symbol had been added. end_first_pass() now transits from pass #1 to pass #2 if finish has been set, and ensures that __INIT (if needed) exists.
Compiler: __INIT() has side effects... Make sure that __INIT gets marked as having side effects, or calls to it may get optimized away... Also renames an internal variable.
Compiler: Fixed variant zapping of reference #0. The variant dispatcher collector was missing an offset, and always zapped the modifier bits for identifier reference #0. This has the effect that identifier reference #0 got the modifier bits intended for the last variant dispatcher in the class.
Runtime: Improve diagnostics from the variant dispatcher. The variant dispatcher now informs about all potential alternatives when there's an argument mismatch.
Revert "Runtime: Improve diagnostics from the variant dispatcher." This reverts commit a0b635a537e32c03c6e95afd7e42dd8021efc406. Now Process.popen(string) works again.
Reinstate "Runtime: Improve diagnostics from the variant dispatcher." Process.popen(string) should now work with it enabled. This reverts commit 50348d848ec84753a198290cf5be9425a5b69f8e, and reinstates commit a0b635a537e32c03c6e95afd7e42dd8021efc406 + patch.
Inline find_object_type() to fix const warning.
Hide stub function f_compilation_env_filter_exception.
Compiler: Support modifier-style attributes in more places. The syntaxes __attribute__("foo", mixed) x; and __attribute__("foo") mixed x; are now equivalent.
Runtime: program_from_type() now uses find_object_type(). This fixes a bug where program_from_type could return eg the program for a function object argument and similar. It now only recurses meta types and not value types.
Runtime: Added support for casting types to program. Casting an object type value to program will now result in the corresponding program. eg: program p = (program)_typeof(o); is approximately the same as program p = object_program(o);
Runtime: Improved variant dispatcher diagnostics. The variant dispatcher now attempts to generate a more informational error than "Invalid arguments to x()!" when the actual arguments don't match any of the variants.
Compiler: Fix scope name for inherit ::this_program. The scope name for inherits using ::this_program used to be "this_program", which caused the "this_program::"-scope to refer to the inherit rather than to the current class. The scope now instead gets its name from the name of the current class. Also fixes Crypto.CTR.State, which triggered the problem.
Runtime: Using FIND_LFUN() with non-LFUNS is an error. Make sure to fatal if FIND_LFUN() is used with a fake LFUN.
optimization: use new unaligned helpers
mostly harmless overflows, fixed
program: check lfun number before accesing array this led to out of bounds reads when accessing lfuns like _random
Compiler: Migrate OPT_* flags to the variant dispatcher. Variant dispatchers need to have the same set of OPT_* flags as the functions they dispatch to, to avoid over optimization. Fixes [Pike Mailinglist 13786]/[LysLysKOM 20594561].
Document some previously undocumented symbols. Most builtin stuff should now be documented.
Debug.size_object: Added some doc for lfun::_size_object(). All lfuns should now be documented.
Documentation: Moved some lfun documentation around.
random: lfun::_random() now actually is a (fake) lfun. lfun::_random() now behaves like a proper lfun. Moved some documentation around accordingly.
AutoDoc: Improved documentation of some LFUNs.
Language: Support referring directly to inherited scopes. find_inherit() now falls back to the most recent scope if it is not present among the direct scopes. This is useful when having deeply nested inherits, and allows for eg: container::m_obj::base_obj::m_name::create(); to possibly be replaced with just m_name::create();
decode_value: id_to_program() now knows about Nettle.
Compiler: Git rid of some symbol mangling. Fixes lookup of deep inherits.
Compiler: Fixed inherits of deep mixins. Fixes the long standing [bug 6063 (#6063)].
fixed count_memory_in_programs
Debug: Fixed bug in dump_program_tables(). The filename for inherited references was looked up in the wrong program.
Compiler: Rename the arguments to really_low_reference_inherited_identifier(). The arguments were confusing in that 'e' was the inherit number and 'i' was the reference number. They are now named 'i' for the inherit number, and 'f' for the reference number.
Compiler: Make more stuff available to cmods. {really_,}low_reference_inherited_identifier() are needed to be able to access overloaded identifiers from C-modules.
Runtime: Added get_inherit_storage(). Adds easy access to the storage belonging to a specific inherit in an object. This function should be used in preference to get_storage() when the inherit graph is known, to improve support for multiple inherit of programs implemented in C.
Runtime: Fixed typo in FIND_PROGRAM_LINE(). Fixes a segfault in call_backtraces()
compiler: use new block allocator for node_s
Compiler: Fixed bug in ext_store_program_line(). The filename was leaked, could be lost and triggered the "Invalid file entry in linenumber info." fatal when used in a pike compiled --with-debug.
Runtime: Fixed typo in FIND_PROGRAM_LINE(). Fixes SIGSEGV when rendering some backtraces in PIKE_DEBUG mode.
Modules: Export some more functions to the module API. These functions are needed to find inherited symbols.
Objects: Exit event handlers may need the parent. Make sure that parent_storage() also works from exit event handlers. Fixes fatal "Shouldn't get an exception in destruct()." Also propagates the PROGRAM_HAS_C_METHODS flag on inherit.
Added support for an _object_size method in objects. If defined the return value from that function will be added to the size calculated by _object_size. This is mainly useful to get more correct debug information about memory usage, as an example when using Debug.pp_object_usage. Callbacks have currently only been added to Image.Image and System.Memory. Currently the normal memory_usge() function does not include these sizes, it should probably do so, however.
Compiler: Changed line number file name representation. The program line number table now contains indices into the program string table to keep track of file names, instead of having a binary dump of the file name directly in the line number table. This makes for a somewhat cleaner line number code. Fixes old FIXME.
Save one realloc for wide string file names and moved trivial code into make_plain_file.
Runtime: Fix references to threads_disabled if no threads
uninitialized memory access
initialize pike_frame->num_args even in special cases
Compiler: More __INIT() related fixes. Avoid calling __INIT() when it is just a prototype.
Compiler: Fixed __INIT() prototype detection. The __INIT() prototype detection in the decode_value() case was off by one in the previous commit. With this fix all of the known issues introduced by the __INIT() changes seem to be fixed.
Compiler: Inhibit warnings for creating deprecated lfuns. Fixes [LysLysKOM 20354456].
Removed auto bignum checks.
encode_value: Support variant functions. Note: No changes were needed to decode_value().
fixed pike_type leak
decode_value: Fix handling of inherits. Use program.c:lower_inherit() in decode_value(). The new parent flags handling in low_inherit() isn't safe to use from decode_value(), since the program_state stack isn't necessarily the same as when the encoded program was initially compiled. Fixes various dumping errors.
Added new block allocator. It dramatically speeds up free, when allocating many blocks and deallocation happens non linearly.
[performance] Use the hashtable more when indexing objects Now it is used even if there is only one identifier in the object. That helps more than it should, really
Compiler: Fixed overriding of variant functions. Overriding of variant functions now seems to work as intended. Also adds testsuite test that checks some of the cases.
Removed the experimental facets implementation.
Compiler: Improved handling of variant functions. The idea here is that a non-variant function restarts the function definition for the symbol (ie overrides all earlier variants), and a variant function adds another case to the existing definition for the symbol (if any). Also added detection of variant getters and setters.
Small compile fix.
Compiler: Minor code cleanup. Store Pike_compiler->new_program in a local variable in define_function().
Compiler: Improved overriding of variant functions. Overriding a variant function with a non variant now causes later variant function overrides to not reinstate the function.
Added get_lax_type_of_svalue. Used for constant:s. int(0..0) -> zero int(X..Y) -> int string(X..Y) -> string This was done to remove some code duplication, and as an added feature constant x = "foo"; now allows you to assign "f\xfff" when inheriting.
Compiler: Improved variant dispatcher. Inherited dispatchers and the ::-operator now work in some cases.
Compiler: Added dispatcher for variant functions. (EXPERIMENTAL!) This is the first attempt at a generic dispatcher for variant functions. It seems to work for the trivial cases: | Pike v7.9 release 5 running Hilfe v3.5 (Incremental Pike Frontend) | > class foo { | >> variant int bar(int a) { return a*2; } | >> variant string bar(string s) { return "FOO" + s + "FOO"; } | >> variant string bar() { return "FOO"; } | >> } | > typeof(foo()->bar); | (1) Result: function( : string) | function(int : int) | function(string : string) | > foo()->bar(17); | (2) Result: 34 | > foo()->bar("BAR"); | (3) Result: "FOOBARFOO" | > foo()->bar(); | (4) Result: "FOO" | > foo()->bar(1.2); | Compiler Error: 1: Bad argument 1 to bar. | Compiler Error: 1: Expected: string | int. | Compiler Error: 1: Got : float. | > foo()->bar((mixed)1.2); | Invalid arguments to bar()! | HilfeInput:1: HilfeInput()->foo()->bar(1.2) | HilfeInput:1: HilfeInput()->___HilfeWrapper() Note that it is probably broken for more complicated cases. Such cases include when the variants have differing modifiers (including when one of the variants lack the variant modifier).
Compiler: Removed some obsolete variant code. Changed approach to implementing variant functions. This removes the remnants of the old approach.
Compiler: Hide variant functions from the normal lookup functions. The idea here is to hide the variant functions from normal lookup, and then to add a dispatcher function, which calls the appropriate variant function later.
Compiler: Added new lookup functions for variants. Added new lookup function really_low_find_variant_identifier() that looks up based on both name and type.
Compiler: Fixed updating of PROGRAM_{NEEDS,USES}_PARENT. low_inherit() may get called with a parent offset of 24 (OBJECT_PARENT + 42) or 25 (INHERIT_PARENT + 42) when called from decode_value(). Make sure we don't start zapping flags in random programs on the compiler stack when this happens. Fixes [LysLysKOM 20258894] and [LysLysKOM 20273476]/[Pike 13584].
Compiler: Repurposed reference_inherited_identifier(). The previously unused function reference_inherited_identifier() is now analogous to the low_* and really_low_* variants, and exported.
Compiler: Fixed a few bugs in reference_inherited_identifier().
Compiler: Added resolve_program(). Added helper function resolve_program() to simplify resolving of program symbols during compile-time for C-modules. This function is used from precompiled code when inheriting strings (API level 5).
Compiler: Added support for ::this_program. This syntax refers to the previous definition of the current class in its parent, and is typically used with inherit like: inherit Foo; // Override the Bar inherited from Foo. class Bar { // Bar is based on the implementation from Foo. inherit ::this_program; // ... } Note that this change is slightly incompatible with Pike 7.8.
Compiler: Fixed low_inherit() updating parent flags. The PROGRAM_{NEEDS,USES}_PARENT flags could be lost in pass 2 of the compiler. Also fixes a related issue when low_inherit() is called by decode_value().
Compiler: low_inherit() now updates parent flags. Moved update of parent flags (PROGRAM_{NEEDS,USES}_PARENT) from compiler_do_inherit() to low_inherit(), to help out C-modules that inherit programs needing parent pointers, since they typically use low_inherit() directly.
Fixes compilation on Kubuntu 12.10. According to the bison manual, yydebug is only available if YYDEBUG is defined and equals 1. Also the yyparse prototype was wrong.
Runtime: Reduced verbosity for softcast errors.
PMOD_EXPORT some more symbols, which are being used by dynamic modules in case of PIKE_DEBUG
Runtime: Improved diagnostics in -rt mode. Also adds the string_builder_explain_*() functions, that mirror the corresponding yyexplain_*() functions.
Compiler: Make sure private implies both local and protected. The typechecker and other stuff got confused when symbols were private but not protected. Fixes [LysLysKOM 20106812]: | 20106812 idag 12:54 /12 rader/ Mattias Wingstedt (Firefruit) | Mottagare: Pike (-) erfarenhetsutbyte <12765> | Ärende: Felarv | ------------------------------------------------------------ | Jag får "type mismatch in argument" där argumentet som förväntas är en | Error.Generic. Den klagar på "Missing identifier error_name". | | Det jag skickar in är ett objekt från en klass som ärver | Error.Generic. Fast den verkar ha rätt, när jag instansierar en | Error.Generic får den en error_name, som saknas när jag instansierar | min klass som ärver Error.Generic. I övrigt verkar de båda objekten | innehålla samma medlemsvariabler. | | Pike version 7.8 release 700. | | Vad kan det vara för fin finess mitt program har råkat ut för? | (20106812) /Mattias Wingstedt (Firefruit)/----------
Wrap unused parameters in UNUSED(), and debug-only parameters in DEBUGUSED(), to cut down on compiler warnings. The macro also renames parameters to catch accidental use. (There are more places to clean up but I don't want to modify code that isn't compiling on my machine.)
Compiler: Added low_program_from_svalue(). This allows for passing the parent object and identifier when needed. This is needed for [bug 6573 (#6573)].
Compiler: Use cast to program instead of object_program() for inherits. This is needed to be able to simulate inheritable programs with objects. Fixes [bug 6573 (#6573)].
Build: Support Bison 3.
Remove superfluous legacy compat support prior to 7.8.
ins_short isn't used.
Added some consts.
Fix -Wglobbered warnings. One of them was actually legitimate.
Doc: Added some Doxygen markup for C-level APIs.
Revert "Do not consider a function to be implemented if it's just a prototype." This reverts commit 1881b02893eb681b6b18b9363410364509abb2ec. It did not really work, since the 'implements' function is used in other places where the prototype checking should not really be done. As an example, defining a variable that was of type A to be type B. It would not work if B had prototypes that were in A.
Do not consider a function to be implemented if it's just a prototype. This changes typechecking in an incompatible manner. Currently the SSL code does not compile.
Remove remaining explicit 7.6 compat.
Removed security system (on this branch)
Fix warnings
Support this::x for variables in this object. This is equivalent to this_program::x, but shorter to write. And, incidentally, more logical and more like other languages.
Compiler: Improved diagnostics. The fatal "Internal error: Not allowed to add more identifiers during second compiler pass" now informs about what the identifier was.
Silence warnings.
strings: make simple constants static
strings: create static strings in more places
Merge remote-tracking branch 'origin/8.0' into string_alloc Conflicts: src/stralloc.c
Fixed a few warnings.
strchr is C89 and 4.3BSD
memcpy is C89 and 4.3BSD
memset is C89 and 4.3BSD
Compiler: Added some missing END_CYCLIC(). All execution branches from a BEGIN_CYCLIC() must either END_CYCLIC() or throw an error before DECLARE_CYCLIC() falls out of scope. Potential fix for [LysLysKOM 20940558] (Pike developer list).
Pike 7.2 was released 2002. Stop supporting compat for it.
Merge remote-tracking branch 'origin/8.0' into string_alloc
Improved type checking.
Added void to zero argument functions.
Merge branch '8.0' into gobject-introspection
Get rid of some harmless valgrind warnings
Merge remote-tracking branch 'origin/7.9' into pdf
new block alloc
Merge remote-tracking branch 'origin/7.9' into ba Conflicts: src/interpret.c src/interpret.h src/pike_embed.c
Merge remote-tracking branch 'origin/7.9' into ba
ammend this
First stage of the 'auto' type. Works, but for now only for variable declarations, not return types (entirely, most of the plumbing is done) or for variables declared in foreach and sscanf. Since the loop variables in foreach is really the most important location, this is of somewhat limited use so far. Commited for safekeeping.
Merge branch '7.9' into gobject-introspection
Compiler: Don't complain about unused private LFUNs. Fixes [bug 6553 (#6553)].
Merge branch '7.9' into block_alloc Conflicts: src/modules/system/configure.in src/post_modules/CritBit/tree_low.c src/post_modules/CritBit/tree_low.h src/post_modules/CritBit/tree_source.H
Runtime: Improved robustness of low_get_line(). The linenumber and offset deltas could get swapped if the end of the table was reached, more entries added and then resumed. This could in turn trigger the "get_small_number used on filename entry" fatal error.
Merge remote branch 'origin/7.9' into rblock_alloc Conflicts: src/post_modules/CritBit/floattree.cmod src/post_modules/CritBit/inttree.cmod src/post_modules/CritBit/stringtree.cmod
Use power-of-two hashtable for string->offset mapping for objects. This could almost certainly be optimized further, but for now gives about 0.2% better performance in the benchmarks. Probably less in real code, though.
quick_ made quick, and compacted some code.
Compiler: First try at resolving inherited symbols via inherited lfun::`->().
Merge remote branch 'origin/7.9' into breaking_into_pieces
Runtime: Made parent_storage() more robust. Now supports being called from event handlers again.
Compiler: Workaround for call_c_initializers() creating broken frames. Fixes [bug 6156 (#6156)]. Proper fix in Pike 7.9.
Compiler: Forward compatibility with 64-bit line numbers from Pike 7.9.
Compiler: The compiler and runtime are now INT_TYPE-clean wrt line numbers.
Fix profiling of recursive functions by tracking recursion level. Fixes [bug 5131 (#5131)].
CompilerEnvironment: Separated report() to a separate Reporter class.
CompilerHandler: Support calling of report() in the master and handler objects.
Compiler: Moved the resolve_cache to the compiler context proper.
Change in internal timehandling; ability to invalidate current_time.
Removed $Id$.
Getters/Setters: Avoid relying on stale pointers. The identifier tables may be reallocated between the definition of the getter/setter, and it being set later in define_function()... Fixes issue reported by 郭雪松 <zenothing@hotmail.com>, thanks.
Atomic megapatch: Use svalue accessor macros everywhere.
Revert "Compiler: Fixed resolving of external symbols in deep inherits. Fixes [bug 6063 (#6063)].". Fixes [bug 6065 (#6065)]. This reverts commit 015e37ddcac414407f936bba22eab6995f9d2ef7. The above commit caused [bug 6065 (#6065)]. Another approach is needed.
Revert "Compiler: Fixed resolving of external symbols in deep inherits. Fixes [bug 6063 (#6063)].". Fixes [bug 6065 (#6065)]. This reverts commit 6c98ca273df23f43842684297485e213f60ef66c. The above commit caused [bug 6065 (#6065)]. Another approach is needed.
Compiler: Fixed resolving of external symbols in deep inherits. Fixes [bug 6063 (#6063)]. Thanks to 郭雪松 <zenothing@hotmail.com> for the bugreport.
Atomic: Store the type in the ref_type field for all reference types.
No more foreign_idents.
Serializer: Rotated the argument order for the {,de}serializer() callback function to be more convenient.
Serializer: First implementation of the Serializer interface.
Added predef::types() in analogue with indices() and values(). Also adds lfun::_types() and ::_types().
First step towards supporting deferred evaluation of constants.
Oops, missed initializing ref.run_time_type in low_inherit().
Added cache for vtable lookups in the get case.
Preparations for changing the identifier information for constants.
First go at supporting static storage.
Added low_program_index_no_free().
Allocate object storage with xcalloc() to reduce the amount of work for call_c_initializers(). Rev: src/encode.c:1.294 Rev: src/object.c:1.309 Rev: src/program.c:1.778
Some autodoc updates regarding hash functions. Rev: src/builtin_functions.c:1.700 Rev: src/program.c:1.777
Added a memory checker hint. Rev: src/program.c:1.776
A const is a const is a const. Rev: src/program.c:1.775 Rev: src/program.h:1.268 Rev: src/svalue.c:1.259 Rev: src/svalue.h:1.172
Fixed issue where PikeCompiler()->apply_attribute_constant() could throw errors for unevaluated constant expressions. Rev: src/program.c:1.774
More rtldebug to get better info when gc_mark problems happen. Rev: Makefile:1.168 Rev: src/array.c:1.226 Rev: src/gc.c:1.338 Rev: src/gc.h:1.138 Rev: src/mapping.c:1.214 Rev: src/multiset.c:1.119 Rev: src/object.c:1.304 Rev: src/pike_types.c:1.361 Rev: src/program.c:1.773 Rev: src/svalue.c:1.255
Avoid generating unnecessary parent pointers for inherits and types. Fixes [bug 2672 (#2672)]. Rev: src/docode.c:1.206 Rev: src/las.c:1.442 Rev: src/program.c:1.772
Cleaned up facet handling somewhat. Added a few FIXMEs. Rev: src/language.yacc:1.452 Rev: src/program.c:1.771 Rev: src/program.h:1.267
More documentation fixes. Rev: src/program.c:1.770
Improved some CompilerEnvironment-related AutoDoc mk II markup. Added some FIXME markers regarding f_compilation_env_filter_exception(). Rev: src/program.c:1.769
Fixed hiding of functions with prototypes. Fixed issue with PROGRAM_BUILD_DEBUG not working. Rev: src/program.c:1.768
override_identifier() now knows more about handling of external symbols. The above makes encode_value() more happy about encoding the master program. Fixed range bug in low_add_many_to_program(). Rev: src/program.c:1.767
Added low_add_many_to_program(). Rev: src/program.c:1.766 Rev: src/program.h:1.266
Protential bugfix. Rev: src/program.c:1.765
Fixed some warnings. Rev: src/program.c:1.764 Rev: src/program.h:1.265
Fixed issue where symbols could be hidden by a later inherit of the same symbol but protected. Rev: src/program.c:1.763
low_get_function_line() now knows about prototypes. Fixes [bug 4855 (#4855)] ("Bad offset" when generating backtrace). Rev: src/program.c:1.762
Pike 7.6 and earlier compat for store_constant(UNDEFINED). Note that this behaviour is usually not something you'd want, but apparently there's code out there needing it. Rev: src/program.c:1.761
PikeCompiler()->apply_attribute_constant() now knows about strict_sprintf_format. Rev: src/program.c:1.760
Fixed bug in yyexplain_not_implements() where REPORT_NOTICE was escalated to REPORT_WARNING. Rev: src/program.c:1.759
Fixed core-dump typo in yyexplain_not_implements(). Rev: src/program.c:1.758
Fixed make_plain_file to honor the malloced flag for narrow strings, and fixed length calculation bug. Rev: src/program.c:1.757
extern declared variables now work again. Rev: src/program.c:1.756
define_variable() now hides the original variable when overloading local or extern variables. Rev: src/program.c:1.755
Fixed overriding of inherited local identifiers. Rev: src/program.c:1.754
Added duplicate filtering pass to fixate_program() after fsort_program_identifier_index(). This fixes issues where duplicate identifiers shows up in indices() on objects. Made program_identifier_index_compare() more stable. Added output of the identifier name in the identifier index table in dump_program_tables(). Rev: src/program.c:1.753
Fixed a debug printout as intended. Rev: src/program.c:1.752
Fix debug message. Rev: src/program.c:1.751
Another attempt to fix the "external refs after unregister" debug check. Rev: src/program.c:1.750
Added another convenience function to get program lines easier in gdb. Rev: src/program.c:1.749
Added more compilation dependency registrations. This can potentially make the compiler bark on more cyclic reference cases, but it's necessary to ensure indexed programs aren't (completely or partially) empty in pass 2, which can lead to very strange compilation errors. Also cleaned up some compiler error messages a little. Rev: src/las.c:1.434 Rev: src/program.c:1.748
Restored the free in the old unused compile() function, but noted another possible ref problem there. Rev: src/program.c:1.747
Fixed extra free of programs that could occur if a nested delayed compilation failed. Rev: src/program.c:1.746
More COMPILER_DEBUG improvements. Rev: src/program.c:1.745
Fixed wrong runtime type for a mapped variable. This could cause gc fatals. Rev: src/program.c:1.744
Check that the inherited program is really finished in pass 2. Also extended those error messages so that mere mortals might understand what it really is about. Rev: src/program.c:1.743
Fixed cleanup to work with the "external refs after unregister" debug check. Rev: src/program.c:1.742
Probably a better fix for the multiple run_cleanup calls bug. Rev: src/pike_compiler.h:1.16 Rev: src/program.c:1.741
Added a disclaimer comment about the last fix. Rev: src/program.c:1.740
Fix for multiple run_cleanup calls for failed delay compiled programs. Also exteded the COMPILER_DEBUG messages somewhat. Rev: src/pike_compiler.h:1.15 Rev: src/program.c:1.739
Fixed bug in call_handle_inherit(). Rev: src/program.c:1.738
Nicer if low_make_buf_space takes a signed amount to allow shrinking, than that it's given a very large unsigned number that causes wrap-around. Rev: src/dynamic_buffer.c:1.27 Rev: src/dynamic_buffer.h:1.22 Rev: src/program.c:1.737
Fixed some warnings and removed a bunch of unused variables. Rev: src/program.c:1.736
Mark private symbols as local. Rev: src/program.c:1.735
Named non-local integer constants now get a somewhat less strict type. Rev: src/program.c:1.734
Fixed another instance of the fatal "Not allowed to add more identifiers during second compiler pass.". Rev: src/program.c:1.733
Some cleanup. Rev: src/program.c:1.732
Fixed incorrect old-style use of T_INT without subtype to mark a free value. This was in newly added code from rev 1.667; please be more careful. Rev: src/program.c:1.731
Reduced amount of info in deprecation warning to report a less confusing message. Rev: src/program.c:1.730
SEE_STATIC -> SEE_PROTECTED Rev: src/encode.c:1.283 Rev: src/language.yacc:1.441 Rev: src/object.c:1.300 Rev: src/program.c:1.729
ID_STATIC -> ID_PROTECTED Rev: src/backend.cmod:1.229 Rev: src/builtin.cmod:1.217 Rev: src/errors.h:1.40 Rev: src/interpret_functions.h:1.208 Rev: src/iterators.cmod:1.70 Rev: src/language.yacc:1.440 Rev: src/object.c:1.299 Rev: src/pike_search.c:1.31 Rev: src/program.c:1.728 Rev: src/signal_handler.c:1.333 Rev: src/threads.c:1.259
More static -> protected. Rev: src/object.c:1.298 Rev: src/program.c:1.727 Rev: src/program.h:1.256
Fixed wrongthinking in eval_low optimization; we have to flush the instruction cache on the area each time. (It's still a substantial improvement though, since only the area with the new code is flushed instead of the whole program.) Rev: src/las.c:1.425 Rev: src/program.c:1.726 Rev: src/program.h:1.255
Removed a forgotten header only used for debug. Rev: src/program.c:1.725
Now has a chance at supporting machine code on systems without execinfo.h. Rev: src/program.c:1.724
Don't flush the instruction cache over and over again for the same area in eval_low when machine code is used. This should speed up constant evaluation a bit (benchmarks run about 8% faster overall for ia32). Rev: src/las.c:1.421 Rev: src/program.c:1.723 Rev: src/program.h:1.254
m_generation() is no more. Rev: src/builtin.cmod:1.215 Rev: src/encode.c:1.281 Rev: src/mapping.c:1.207 Rev: src/mapping.h:1.70 Rev: src/program.c:1.722 Rev: src/program.h:1.253
Added fake lfun _m_generation(). Rev: src/program.c:1.721 Rev: src/program.h:1.252
mc_count_bytes fix. Rev: src/modules/Gmp/mpf.cmod:1.38 Rev: src/modules/Gmp/mpq.cmod:1.30 Rev: src/program.c:1.720
Compatibility with Pike 7.6 and earlier for program_magic_identifier(). Referring to 'this' for a surrounding class should now work for compat code again. Rev: src/program.c:1.719
Bugfix of get_identifier_line(). Rev: src/program.c:1.718
Export low_get_storage. Rev: src/program.c:1.717 Rev: src/program.h:1.251
Fixed some Autodoc mk II typos. Rev: src/builtin_functions.c:1.670 Rev: src/program.c:1.716
Fixed some typos. Rev: src/program.c:1.715
Added get_identifier_line(). Rev: src/program.c:1.714 Rev: src/program.h:1.250
Some cleanups. Now calls PikeCompiler()->report() via the yy* functions. Rev: src/program.c:1.713
Modernized an error call. Rev: src/program.c:1.712
Fixed some borken, borken, boRKen behavior. Considering how ancient that compiler_pass == 2 check is (1.87 1998/04/24 00:32:09 hubbe), I think this is fairly safe. Rev: src/program.c:1.711
It is now possible to return a reference to the current inherit in this object. The third argument to program_magic_identifier() should now be -1 when no inherit has been specified (0 is now reserved for referring to the current inherit). This is also reflected in the F_THIS node. The F_THIS opcode is now used exclusively to refer to specific inherits. Use the F_THIS_OBJECT opcode to refer to the current object. Rev: src/docode.c:1.201 Rev: src/interpret_functions.h:1.204 Rev: src/language.yacc:1.426 Rev: src/las.c:1.415 Rev: src/peep.in:1.83 Rev: src/program.c:1.710
Deprecation warnings are now disabled by #pragma no_deprecation_warnings. Rev: src/program.c:1.709
Implemented support for extern variables (ie prototypes for variables). Rev: src/object.c:1.295 Rev: src/program.c:1.708
DON'T use low_clone() unless you know what you're doing... All error object should now be cloned with fast_clone_object() or better. Reinstated the freeing of err->error_message and err->error_backtrace now that the error objects are properly initialized. Added some more Autodoc mk II about the compiler. Rev: src/cpp.c:1.170 Rev: src/dynamic_load.c:1.92 Rev: src/error.c:1.162 Rev: src/object.c:1.293 Rev: src/program.c:1.707
Fixed conversion of errors to warnings in compat mode. Rev: src/program.c:1.706
One more... Rev: src/program.c:1.705
Bugfix for early exit from va_yyreport() (leaving droppings on stack). Rev: src/program.c:1.704
Bugfix for infinite resolve loop when loading eg GTK. Rev: src/program.c:1.703
Compiler messaging mega patch. va_yyreport() is now the main C-level dispatcher for compiler messages. It also handles the automatic conversion of type errors to warnings in compat mode. Consolidated the location for the implementation of most of the yy*-messaging functions to program.c. Added yytype_report(). Changed APIs for yyexplain_*(). Moved the definitions of REPORT_* from pike_compiler.h to program.h. va_yyerror() and low_yyerror() are no more. Most type-system messages should now be marked with the appropriate subsystem. Reenabled the typechecking for sscanf and sprintf() now that errors are converted into warnings in compat mode. Rev: src/language.yacc:1.425 Rev: src/las.c:1.413 Rev: src/las.h:1.79 Rev: src/modules/sprintf/sprintf.c:1.153 Rev: src/pike_compiler.h:1.14 Rev: src/pike_types.c:1.337 Rev: src/pike_types.h:1.118 Rev: src/program.c:1.702 Rev: src/program.h:1.248 Rev: src/sscanf.c:1.184
Fixed a typo. Rev: src/program.c:1.701
Added {va_,}yyreport(). yywarning() is now based on va_yyreport(). Rev: src/program.c:1.700 Rev: src/program.h:1.247
Added CompilerEnvironment()->PikeCompiler()->apply_attribute_constant(). Rev: src/pike_compiler.h:1.13 Rev: src/program.c:1.699
Allow yyerror() and yywarning() to be called outside the compilation context. Rev: src/language.yacc:1.424 Rev: src/program.c:1.698
{en,de}code_value() now know about location information for identifiers. Moved the filename storage for identifiers to the string table. encode_value() now knows about new-style getters and setters. Unified the encoding of identifiers to reduce the amount of code duplication. Bumped the version to Pike 7.7.47 since the dump format has changed. Rev: src/encode.c:1.266 Rev: src/program.c:1.697 Rev: src/program.h:1.246 Rev: src/version.h:1.401
Added this_function. Identifiers now can keep track of where they were defined. Rev: src/program.c:1.696
Fixed minor typo. Rev: src/program.c:1.695
Improved diagnostics from define_variable(). Rev: src/program.c:1.694
Changed representation of GETTER/SETTER identifiers. The getter/setter information is now stored directly in struct identifier, rather than embedded in the program code. This means that getter/setters implemented in C won't need to allocate any space for the program code. It also does away with one level of indirection, which should improve performance marginally. Rev: src/docode.c:1.199 Rev: src/object.c:1.292 Rev: src/program.c:1.693 Rev: src/program.h:1.244
Fixed missing PMOD_EXPORT on the visit functions. Rev: src/array.c:1.207 Rev: src/array.h:1.75 Rev: src/constants.c:1.60 Rev: src/constants.h:1.37 Rev: src/mapping.c:1.201 Rev: src/mapping.h:1.68 Rev: src/multiset.c:1.111 Rev: src/multiset.h:1.44 Rev: src/object.c:1.291 Rev: src/object.h:1.96 Rev: src/pike_types.c:1.332 Rev: src/pike_types.h:1.115 Rev: src/program.c:1.692 Rev: src/program.h:1.243 Rev: src/stralloc.c:1.219 Rev: src/stralloc.h:1.104
Implemented visit functions for the visit_thing_fn interface. The gc check/mark functions are restored to how they were before the GC_PASS_COUNT_MEMORY stuff. Rev: src/array.c:1.206 Rev: src/array.h:1.74 Rev: src/constants.c:1.59 Rev: src/constants.h:1.36 Rev: src/mapping.c:1.200 Rev: src/mapping.h:1.67 Rev: src/multiset.c:1.110 Rev: src/multiset.h:1.43 Rev: src/object.c:1.290 Rev: src/object.h:1.95 Rev: src/pike_types.c:1.331 Rev: src/pike_types.h:1.114 Rev: src/program.c:1.691 Rev: src/program.h:1.242 Rev: src/stralloc.c:1.218 Rev: src/stralloc.h:1.103
Disabled a debug check that trigged wrongly. Rev: src/program.c:1.690
Somewhat improved diagnostics generated by yyexplain_not_compatible(). Fixes [bug 4534 (#4534)]. Rev: src/program.c:1.689
Only warn once when calling deprecated symbols, not once for every argument. new_get_return_type() now calls CompilerEnvironment()->PikeCompiler()->apply_type_attribute() with two arguments. Rev: src/pike_types.c:1.326 Rev: src/program.c:1.688
More warnings for __deprecated__ symbols. Added CompilerEnvironment()->PikeCompiler()->apply_type_attribute(). Added some FIXMEs. Rev: src/pike_compiler.h:1.12 Rev: src/pike_types.c:1.325 Rev: src/program.c:1.687
First go at warning for deprecated symbols. Added CompilerEnvironment()->PikeCompiler()->{push,pop}_type_attribute(). pike_types_le() now calls the above when encountering asymmetric attribute types. Added some tests for the above. Rev: src/pike_compiler.h:1.11 Rev: src/pike_types.c:1.324 Rev: src/program.c:1.686 Rev: src/testsuite.in:1.804
Minor documentation cleanup. Rev: src/program.c:1.685
Simulate inherits in second pass. Fixes LysLysKOM 16472935. Rev: src/compilation.h:1.36 Rev: src/language.yacc:1.417 Rev: src/program.c:1.684 Rev: src/testsuite.in:1.803
Put all illegal size shift fatals behind ifdef PIKE_DEBUG. Rev: src/builtin.cmod:1.199 Rev: src/builtin_functions.c:1.660 Rev: src/cpp.c:1.169 Rev: src/encode.c:1.265 Rev: src/iterators.cmod:1.66 Rev: src/operators.c:1.231 Rev: src/preprocessor.h:1.93 Rev: src/program.c:1.683 Rev: src/sscanf.c:1.172 Rev: src/stralloc.c:1.217
Added handle_inherit() to CompilerEnvironment and PikeCompiler. Rev: src/pike_compiler.h:1.10 Rev: src/program.c:1.682
Added Pike.count_memory to be able to see the memory consumed by arbitrary pike structures. The Gmp classes have been fixed to accurately report sizes, but there's probably more to do in other modules. Rev: lib/modules/Pike.pmod/module.pmod:1.17 Rev: src/array.c:1.205 Rev: src/builtin_functions.c:1.659 Rev: src/gc.c:1.305 Rev: src/gc.h:1.131 Rev: src/mapping.c:1.199 Rev: src/modules/Gmp/acconfig.h:1.8 Rev: src/modules/Gmp/configure.in:1.48 Rev: src/modules/Gmp/mpf.cmod:1.35 Rev: src/modules/Gmp/mpq.cmod:1.27 Rev: src/modules/Gmp/mpz_glue.c:1.178 Rev: src/multiset.c:1.107 Rev: src/object.c:1.288 Rev: src/pike_types.c:1.323 Rev: src/program.c:1.681 Rev: src/stralloc.c:1.216 Rev: src/stralloc.h:1.102
Fixed a debug printout. Rev: src/program.c:1.680
Moved compilation_depth to struct compilation. Yet another step on the way to making the compiler thread safe. Got rid of some now unused cleanup code in dynamic_load.c. Rev: src/builtin_functions.c:1.656 Rev: src/dynamic_load.c:1.91 Rev: src/encode.c:1.264 Rev: src/language.yacc:1.416 Rev: src/pike_compiler.h:1.9 Rev: src/program.c:1.679 Rev: src/program.h:1.240
Cosmetic Autodoc mk II fix. Rev: src/program.c:1.678
The global svalue stack used_modules is no more. Moved used_modules to struct pike_compilation. Got rid of the old struct pike_compilation fields used_modules_save and num_used_modules_save. Rev: src/pike_compiler.h:1.8 Rev: src/program.c:1.677
Fixed bug where the default module from the end of pass 1 could be used at the start of pass 2. Rev: src/program.c:1.676
Some bugs remained in the last commit... Rev: src/program.c:1.675
Made the Pike compiler somewhat more transparent. Added change_compiler_compatibility() and get_{compilation_handler,default_module}(). Added _sprintf() for PikeCompiler. dump_program_tables() now also dumps the string table. Rev: src/pike_compiler.h:1.6 Rev: src/program.c:1.674
Now uses safe_apply_current2(). Rev: src/program.c:1.673
Some more Autodoc mk II markup. Rev: src/program.c:1.672
Reverted incorrect Autodoc. Rev: src/program.c:1.671
autodoc fix Rev: src/program.c:1.670
Fixed lack of references to programs that have compilation delayed. Added some more debug malloc checks. Removed some dead variables. Mapped default_module as well in PikeCompiler. Rev: src/program.c:1.669
Added enum SeverityLevel to CompilerEnvironment. Some minor AutoDoc mk II fixes. Rev: src/program.c:1.668
Pike compiler mega patch mk II. Rev: src/builtin_functions.c:1.653 Rev: src/language.yacc:1.414 Rev: src/pike_compiler.h:1.4 Rev: src/program.c:1.667 Rev: src/program.h:1.239
Added sufficient magic to compile_compiler() to use use the compiler to compile itself. Rev: src/program.c:1.666
Added PMOD_EXPORT for {enter,exit}_compiler(). Rev: src/program.c:1.665 Rev: src/program.h:1.238
%S not available here. Added h-file for get_all_args. Rev: src/program.c:1.664
Moved some of the resolver code to the CompilationEnvironment object. Rev: src/pike_compiler.h:1.3 Rev: src/program.c:1.663
Now uses the REPORT_* macros. Rev: src/language.yacc:1.412 Rev: src/program.c:1.662
CompilationEnvironment()->report() is now used for warnings as well. Rev: src/program.c:1.661
Pike compiler mega patch. Added predef::CompilerEnvironment, which is a wrapper for struct compilation. Moved the definition of struct compilation to the new header file "pike_compiler.h". The compilation struct is now contained in the current context in the current_object during compilation. The global variable lex is no more, it has moved into the compilation struct. Added enter_compiler() and exit_compiler(). predef::compile() is now shorthand for predef::CompilerContext()->compile(). Rev: src/builtin_functions.c:1.652 Rev: src/compilation.h:1.35 Rev: src/docode.c:1.197 Rev: src/docode.h:1.20 Rev: src/dynamic_load.c:1.90 Rev: src/encode.c:1.263 Rev: src/language.yacc:1.411 Rev: src/las.c:1.406 Rev: src/lex.c:1.121 Rev: src/lex.h:1.36 Rev: src/lexer.h:1.66 Rev: src/module.c:1.52 Rev: src/object.c:1.284 Rev: src/operators.c:1.230 Rev: src/pike_compiler.h:1.1 Rev: src/pike_types.c:1.321 Rev: src/program.c:1.660 Rev: src/program.h:1.237
fix for autodoc Rev: src/program.c:1.659
Some preparations for making the compiler less opaque. Added the initial stuff for PikeCompiler. Not working yet. Rev: src/program.c:1.658
Cleaned up use of program_state->parent_identifier. Removed some dead code. Rev: src/language.yacc:1.410 Rev: src/program.c:1.657
Fixed proper use of the gc to detect pike type leaks. Some other minor fiddling with the leak reports. Rev: src/gc.c:1.302 Rev: src/global.h:1.111 Rev: src/module.c:1.50 Rev: src/pike_types.c:1.318 Rev: src/pike_types.h:1.111 Rev: src/program.c:1.656 Rev: src/svalue.c:1.238
Moved SETJMP out of the loop in store_constant(); it is now somewhat faster. Rev: src/program.c:1.655
Support inherited files having names encoded according to UTF-8. Rev: src/program.c:1.654
Changed the definition of Pike_fp->context to a pointer. This should reduce the overhead for apply() somewhat. Rev: src/apply_low.h:1.33 Rev: src/builtin.cmod:1.194 Rev: src/interpret.c:1.386 Rev: src/interpret.h:1.171 Rev: src/interpret_functions.h:1.200 Rev: src/modules/Gmp/mpz_glue.c:1.171 Rev: src/object.c:1.282 Rev: src/object.h:1.93 Rev: src/opcodes.c:1.170 Rev: src/operators.c:1.227 Rev: src/program.c:1.653
{size,align}of_variable() now know about PIKE_T_GET_SET. Rev: src/program.c:1.652
Added sanity check for aliases to check_program(). Rev: src/program.c:1.651
Improved diagnostics. Rev: src/module.c:1.48 Rev: src/program.c:1.650
Adding aliases for variables is now encode_value()-safe... Rev: src/program.c:1.649
More relaxations... Rev: src/program.c:1.648
Reduce the number of warnings somewhat... Rev: src/program.c:1.647
Improved diagnostics. Rev: src/program.c:1.646
I give up: Reinstated the old behavior regarding storing UNDEFINED in mapping values. Fixed mapping_index_no_free to not munge the zero type in the mapping, at least. Rev: src/mapping.c:1.198 Rev: src/program.c:1.645
Oops... Rev: src/program.c:1.644
The integer subtype doesn't survive being in a mapping anymore. Added some extra debug checks. Rev: src/program.c:1.643
Eradicated all instances of setting type to T_INT without also setting the subtype in an svalue. From now on one should either set the subtype or use the new svalue type PIKE_T_FREE (see svalue.h). Rev: src/OCPikeInterpreter.m:1.3 Rev: src/apply_low.h:1.32 Rev: src/array.c:1.198 Rev: src/array.h:1.71 Rev: src/bignum.c:1.42 Rev: src/builtin.cmod:1.193 Rev: src/builtin_functions.c:1.650 Rev: src/configure.in:1.1038 Rev: src/cpp.c:1.164 Rev: src/encode.c:1.250 Rev: src/error.c:1.151 Rev: src/interpret.c:1.385 Rev: src/interpret_functions.h:1.197 Rev: src/iterators.cmod:1.64 Rev: src/las.c:1.403 Rev: src/main.c:1.228 Rev: src/mapping.c:1.195 Rev: src/module.c:1.47 Rev: src/modules/Gmp/mpz_glue.c:1.170 Rev: src/modules/HTTPLoop/accept_and_parse.c:1.39 Rev: src/modules/HTTPLoop/requestobject.c:1.31 Rev: src/modules/Image/colortable.c:1.130 Rev: src/modules/Java/jvm.c:1.84 Rev: src/modules/Parser/html.c:1.178 Rev: src/modules/Parser/xml.cmod:1.97 Rev: src/modules/Postgres/postgres.c:1.55 Rev: src/modules/_math/math.c:1.87 Rev: src/modules/files/sendfile.c:1.78 Rev: src/modules/spider/spider.c:1.134 Rev: src/multiset.c:1.106 Rev: src/object.c:1.281 Rev: src/operators.c:1.226 Rev: src/pike_error.h:1.42 Rev: src/post_modules/Shuffler/Shuffler.cmod:1.45 Rev: src/post_modules/_ADT/circular_list.cmod:1.18 Rev: src/post_modules/_ADT/sequence.cmod:1.19 Rev: src/program.c:1.642 Rev: src/signal_handler.c:1.331 Rev: src/sscanf.c:1.170 Rev: src/svalue.c:1.234 Rev: src/svalue.h:1.149
Reordered conditions to avoid false alarms from valgrind. Rev: src/program.c:1.641
Removed some unneeded code. Rev: src/program.c:1.640
Moved some redundant code to where it was actually used. Rev: src/program.c:1.639
Fixed potential bug when inheriting from scoped classes. Rev: src/program.c:1.638
Added missing initializer for identifier opt_flags for variables and aliases. Rev: src/program.c:1.637
Fixed the warning "Unused local variable ." (ie the empty variable name). Rev: src/program.c:1.636
Compiler messages should not contain linebreaks. Rev: src/program.c:1.635
Only warn about unused variables in the second pass. Rev: src/program.c:1.634
{low_,}pop_local_variables() now warn about unused variables. Rev: src/program.c:1.633
nomask -> final Rev: lib/modules/Stdio.pmod/module.pmod:1.231 Rev: lib/modules/Thread.pmod:1.44 Rev: src/gc.c:1.301 Rev: src/language.yacc:1.391 Rev: src/modules/_Charset/charsetmod.c:1.63 Rev: src/modules/_Charset/iso2022.c:1.45 Rev: src/program.c:1.632 Rev: src/program.h:1.236
Initial support for new-style getter/setters. Rev: src/program.c:1.631
Fixed some more warnings. Rev: src/program.c:1.630
It's not a good idea to mark LFUNS as used. Rev: src/program.c:1.629
Mark LFUNs as used. Rev: src/program.c:1.628
Now behaves the same as yyerror()... Rev: src/program.c:1.627
yywarning() now survives not having a current file. Rev: src/program.c:1.626
Detect attempts to add identifiers, identifier_references and inherits in pass 2. Rev: src/program.c:1.625
Now only warns about suspect overloadings in strict types mode. Rev: src/program.c:1.624
Fixed issues with the type checking for overloading of functions. Rev: src/program.c:1.623
Added some warnings for overloading symbols with nonmatching types. Rev: src/program.c:1.622
Unified IDENTIFIER_EXTERN and IDENTIFIER_ALIAS into IDENTIFIER_ALIAS. ID_ALIAS is no more. Added {low_,}define_alias() in analogue with the other identifiers. Aliases are now used in some places where previously an identifier was copied. Added support for constants (ie aliases) referring directly to variables and functions in the surrounding scopes. A program may now be indexed on such a constant (ie alias). Added some FIXMEs. Changed API for low_program_from_function(). Disabled find_child() (could not find anything using it). Bumped build bumber since the identifier encoding has changed. Rev: src/language.yacc:1.382 Rev: src/object.c:1.277 Rev: src/program.c:1.621 Rev: src/program.h:1.233 Rev: src/version.h:1.394
check_program() now knows something about extern symbols. Rev: src/program.c:1.620
Changed the semantics of program_index_no_free() somewhat in preparation for having symbols with storage in parent classes. Changed the representation of tentatively typed function identifiers. They are now marked by having the run time type T_MIXED. Changed the encoding in the identifier_flags field somewhat to free up a bit to indicate that the symbol has storage in an external scope. Bumped version to 7.7.36 since the dump format for programs has changed. Fixed minor bug in index_no_free() when indexing a function that wasn't a program. Rev: src/object.c:1.275 Rev: src/operators.c:1.222 Rev: src/program.c:1.619 Rev: src/program.h:1.230 Rev: src/version.h:1.393
Fixed fatal error "Getter/setter variable outside program!" et al, when an inherited getter/setter is used via the ::-operator. Rev: src/program.c:1.618
Now supports mixin for static symbols. Rev: src/program.c:1.617
Added a PROGRAM_LIVE_OBJ flag to be able to accurately detect exit callbacks in inherits. It also allows users to override the assumption that an exit or event callback makes it necessary for the gc to treat the objects as live. Rev: src/gc.c:1.286 Rev: src/gc.h:1.128 Rev: src/object.c:1.274 Rev: src/program.c:1.616 Rev: src/program.h:1.229
Document that the old event-specific program callbacks have a certain benefit afterall. Rev: src/program.c:1.615
Reworked the cycle handling in the gc and documented it in detail, to work out some kinks and to make it more convincing that the end result really is what the gc claims it to be. Rev: src/gc.c:1.281 Rev: src/pike_embed.c:1.11 Rev: src/program.c:1.614
Some fixes to gc locate and cleanup code for strings and types in the program structs. Rev: src/program.c:1.613
Fixed NULL dereference at out of memory in low_start_new_program(). Found by Klocwork. Rev: src/program.c:1.612
Removed redundant condition. Rev: src/program.c:1.611
First try at implementing getter/setter variables. Seems to work. Rev: src/program.c:1.610
make_program_executable may be called with empty programs. Rev: src/program.c:1.575
Comment fix. Rev: src/program.c:1.609
Use the homegrown heap manager for executable memory on Windows too. The reason is that VirtualProtect doesn't work if it's given an area that haven't been reserved with a single VirtualAlloc MEM_RESERVE call. Rev: src/dmalloc.h:1.62 Rev: src/pike_embed.c:1.10 Rev: src/pike_memory.c:1.183 Rev: src/pike_memory.h:1.55 Rev: src/program.c:1.608
Make some effort to find the real page size. Rev: src/configure.in:1.991 Rev: src/pike_embed.c:1.9 Rev: src/pike_memory.c:1.182 Rev: src/pike_memory.h:1.54 Rev: src/program.c:1.607
Check for errors from VirtualProtect. Rev: src/program.c:1.574
Don't do page alignment on the block passed to VirtualProtect on Windows. Rev: src/program.c:1.606
Fixed some cases of safe_apply_low2(). Rev: src/language.yacc:1.371 Rev: src/program.c:1.605 Rev: src/svalue.c:1.230
One more PMOD_EXPORT. Rev: src/program.c:1.604 Rev: src/program.h:1.225
Added PMOD_EXPORTs. Rev: src/fsort.c:1.25 Rev: src/fsort.h:1.7 Rev: src/interpret.c:1.378 Rev: src/interpret.h:1.169 Rev: src/language.yacc:1.370 Rev: src/las.h:1.73 Rev: src/operators.c:1.211 Rev: src/operators.h:1.19 Rev: src/pike_memory.c:1.179 Rev: src/pike_memory.h:1.53 Rev: src/pike_types.c:1.255 Rev: src/pike_types.h:1.95 Rev: src/program.c:1.603 Rev: src/program.h:1.224 Rev: src/stralloc.h:1.100
Added do_free_program. Added some PMOD_EXPORTs. Rev: src/program.c:1.602
Handle valgrind discarding in mexec_free. Rev: src/pike_memory.c:1.177 Rev: src/program.c:1.601
Handle valgrind discarding in mexec_free. Rev: src/pike_memory.c:1.158 Rev: src/program.c:1.573
Handle valgrind discarding in mexec_free. Rev: src/pike_memory.c:1.145 Rev: src/program.c:1.501
Backported fix for low_get_function_line() from Pike 7.7. Rev: src/program.c:1.572
Fixed main cause of "Bad offset: pc:* program:* (*)". get_function_line() assumed that all functions are implemented in pike... Rev: src/program.c:1.600
Another safe_apply_low3 reference. Rev: src/program.c:1.599
Facet init and exit needs more work. Disable them for now. Rev: src/facetgroup.cmod:1.6 Rev: src/language.yacc:1.361 Rev: src/module.c:1.36 Rev: src/program.c:1.598 Rev: src/program.h:1.221
Backported is_compatible() relaxation for integers from Pike 7.6. Rev: src/program.c:1.500
id_to_program() now knows about GTK2. Rev: src/program.c:1.597
Backport optimization from 7.7: No need to mprotect memory allocated with mmap. Rev: src/program.c:1.499
Backport optimization from 7.7: No need to mprotect memory allocated with mmap. Rev: src/program.c:1.571
No need to mprotect memory allocated with mmap. Rev: src/program.c:1.596
Workaround for false positive reported by Valgrind caused by a correct compiler optimization. Rev: src/program.c:1.498
Moved handling of the UNDEFINED symbol from find_module_identifier() to resolve_identifier(). This should make global.UNDEFINED work. Rev: src/program.c:1.595
Now uses sync_instruction_memory(3C) if it exists as recommended by SPARC Compliance Definition 2.4. Rev: src/program.c:1.594
Fixed leak introduced by the new mexec_alloc code. Rev: src/program.c:1.570
Fixed leak introduced by the new mexec_alloc code. Rev: src/program.c:1.497
Fixed leak introduced by the new mexec_alloc code. Rev: src/program.c:1.593
Added some comments. Rev: src/program.c:1.592
Some damage control in a severely broken part of the resolver mess: Now we at least get a warning if resolv() throws an error in pass 1 in rtldebug mode. Also fixed a temporary leak of the backtrace in this case. Rev: src/program.c:1.496
Some damage control in a severely broken part of the resolver mess: Now we at least get a warning if resolv() throws an error in pass 1 in rtldebug mode. Also fixed a temporary leak of the backtrace in this case. Rev: src/program.c:1.569
Some damage control in a severely broken part of the resolver mess: Now we at least get a warning if resolv() throws an error in pass 1 in rtldebug mode. Also fixed a temporary leak of the backtrace in this case. Rev: src/program.c:1.591
Fixed bug in PIKE_DEBUG code that could cause coredumps for failed compilations. Rev: src/program.c:1.568
Fixed bug in PIKE_DEBUG code that could cause coredumps for failed compilations. Rev: src/program.c:1.590
Backported use of mexec_* from Pike 7.7. Rev: src/program.c:1.495 Rev: src/program_areas.h:1.13
Backported use of mexec_* from Pike 7.7. Rev: src/program.c:1.567 Rev: src/program_areas.h:1.14
Now uses mexec_*() to allocate memory for machine-code segments. Now page-aligns pointers passed to mprotect(2) to make Linux happy. Fixes machinecode problems on Linux on x86_64-capable platforms. Rev: src/program.c:1.589
Fixed various type errors for 64 bit architectures and other warnings. (Most are in harmless debug messages, but anyway..) Rev: src/array.c:1.181 Rev: src/backend.cmod:1.175 Rev: src/builtin_functions.c:1.599 Rev: src/code/bytecode.h:1.11 Rev: src/encode.c:1.228 Rev: src/gc.c:1.270 Rev: src/interpret_functions.h:1.184 Rev: src/las.c:1.364 Rev: src/modules/Image/image.c:1.222 Rev: src/modules/Parser/html.c:1.177 Rev: src/modules/_Charset/iso2022.c:1.38 Rev: src/modules/files/file.c:1.351 Rev: src/modules/files/sendfile.c:1.72 Rev: src/modules/spider/xml.c:1.75 Rev: src/modules/system/memory.c:1.34 Rev: src/object.c:1.267 Rev: src/peep.c:1.106 Rev: src/pike_types.c:1.247 Rev: src/post_modules/Shuffler/a_source_system_memory.c:1.12 Rev: src/post_modules/Shuffler/b_source_normal_file.c:1.14 Rev: src/program.c:1.588 Rev: src/rbtree.c:1.25 Rev: src/threads.c:1.244
Fixed various type errors for 64 bit architectures. (Most are in harmless debug messages, but anyway..) Rev: src/array.c:1.164 Rev: src/backend.cmod:1.146 Rev: src/builtin_functions.c:1.555 Rev: src/code/bytecode.h:1.11 Rev: src/encode.c:1.214 Rev: src/gc.c:1.257 Rev: src/interpret_functions.h:1.170 Rev: src/las.c:1.347 Rev: src/modules/Gmp/mpz_glue.c:1.162 Rev: src/modules/Image/encodings/xcf.c:1.49 Rev: src/modules/Parser/html.c:1.173 Rev: src/modules/files/file.c:1.321 Rev: src/modules/files/sendfile.c:1.70 Rev: src/modules/spider/xml.c:1.71 Rev: src/object.c:1.257 Rev: src/peep.c:1.99 Rev: src/pike_types.c:1.236 Rev: src/post_modules/Shuffler/a_source_system_memory.c:1.11 Rev: src/program.c:1.566 Rev: src/svalue.c:1.195 Rev: src/threads.c:1.238
Improved diagnostics. Rev: src/program.c:1.587
Make flag argument wide enough to hold all possible flag values. Rev: src/program.c:1.494 Rev: src/program.h:1.183
Pass a flag to lfun::destroy about the reason for the destruct. Rev: lib/modules/Object.pmod:1.1 Rev: src/builtin_functions.c:1.587 Rev: src/gc.c:1.262 Rev: src/object.c:1.265 Rev: src/object.h:1.90 Rev: src/program.c:1.586
Added const Rev: src/program.c:1.585
prototype lfuns now show again. Rev: src/program.c:1.584
Some object subtype fixes. Rev: src/object.c:1.260 Rev: src/program.c:1.583
Added compat. Rev: src/program.c:1.582
Inherit::this and Inherit::this_program should now work. Rev: src/program.c:1.581
Added support for Inherit::this_program. Rev: src/program.c:1.580
Another facet bug fix. Rev: src/program.c:1.579
low_start_new_program() now uses new_node_s_context(). This should fix spurious fatal "Failed to free %d nodes when compiling!\n". Also added some (disabled) diagnostics. Rev: src/program.c:1.578
Fixed reference count of facet_group. Rev: src/program.c:1.577
yywarning() now uses string_builder_vsprintf(). Rev: src/program.c:1.576
my_yyerror() now uses string_builder_vsprintf(). Corrected the arguments for a lot of my_yyerror() invocations. Rev: src/language.yacc:1.350 Rev: src/las.c:1.352 Rev: src/pike_types.c:1.239 Rev: src/program.c:1.575 Rev: src/treeopt.in:1.75
Free facet_group references in programs. Rev: src/program.c:1.574
Merge 'tags/v7.7.10': Implemented from-the-end indexing in ranges using the a[..<1] syntax. Added `[..]. Still to do: Avoid fallback to `[] for ranges if it doesn't take two args.
Implemented from-the-end indexing in ranges using the a[..<1] syntax. Added `[..]. Still to do: Avoid fallback to `[] for ranges if it doesn't take two args. Rev: src/docode.c:1.181 Rev: src/interpret.c:1.358 Rev: src/interpret_functions.h:1.176 Rev: src/language.yacc:1.347 Rev: src/las.c:1.351 Rev: src/lexer.h:1.51 Rev: src/opcodes.h:1.41 Rev: src/operators.c:1.198 Rev: src/operators.h:1.16 Rev: src/pike_types.c:1.238 Rev: src/program.c:1.573 Rev: src/program.h:1.213 Rev: src/testsuite.in:1.741 Rev: src/treeopt.in:1.74
Facets Rev: src/.cvsignore:1.37 Rev: src/Makefile.in:1.387 Rev: src/errors.h:1.27 Rev: src/facetgroup.cmod:1.1 Rev: src/interpret.c:1.357 Rev: src/interpret.h:1.155 Rev: src/language.yacc:1.344 Rev: src/lexer.h:1.50 Rev: src/main.c:1.215 Rev: src/program.c:1.572 Rev: src/program.h:1.212
Cosmetic fix. Rev: src/program.c:1.571
Done away with all warnings during compilation. Now compiles on GCC 3.4.2 without any warnings using the -Wall -Werror CFLAGS. Some workarounds are not very nice, but they should do their job. Rev: src/array.c:1.174 Rev: src/dynamic_load.c:1.85 Rev: src/encode.c:1.221 Rev: src/interpret.c:1.356 Rev: src/las.c:1.350 Rev: src/module.c:1.30 Rev: src/modules/Java/jvm.c:1.71 Rev: src/modules/_Charset/charsetmod.c:1.49 Rev: src/object.c:1.258 Rev: src/pike_search.c:1.24 Rev: src/post_modules/Nettle/cipher.cmod:1.34 Rev: src/post_modules/Nettle/hash.cmod:1.26 Rev: src/post_modules/Shuffler/a_source_pikestring.c:1.10 Rev: src/post_modules/Shuffler/a_source_system_memory.c:1.11 Rev: src/post_modules/Shuffler/c_source_stream.c:1.11 Rev: src/post_modules/Shuffler/d_source_pikestream.c:1.7 Rev: src/post_modules/Shuffler/e_source_block_pikestream.c:1.5 Rev: src/post_modules/Shuffler/shuffler.h:1.6 Rev: src/program.c:1.570 Rev: src/rusage.c:1.42
Show the error when the compile time replace() optimizer fails. Rev: src/builtin_functions.c:1.469 Rev: src/language.yacc:1.317 Rev: src/las.c:1.326 Rev: src/program.c:1.493 Rev: src/program.h:1.182
Fixed race condition. Rev: src/program.c:1.569
Fixed race condition. Rev: src/program.c:1.565
Fixed race condition. Rev: src/program.c:1.492
Fixed race condition. Rev: src/program.c:1.235
Fixed race condition. Rev: src/program.c:1.111
RCSID is not really useful anymore. Rev: src/array.c:1.169 Rev: src/backend.cmod:1.145 Rev: src/builtin_functions.c:1.567 Rev: src/callback.c:1.35 Rev: src/constants.c:1.54 Rev: src/cyclic.c:1.13 Rev: src/dlopen.c:1.74 Rev: src/docode.c:1.179 Rev: src/dynamic_buffer.c:1.25 Rev: src/dynamic_load.c:1.84 Rev: src/encode.c:1.219 Rev: src/error.c:1.133 Rev: src/fd_control.c:1.51 Rev: src/fdlib.c:1.66 Rev: src/fsort.c:1.23 Rev: src/gc.c:1.256 Rev: src/hashtable.c:1.15 Rev: src/interpret.c:1.353 Rev: src/iterators.cmod:1.55 Rev: src/language.yacc:1.342 Rev: src/las.c:1.349 Rev: src/lex.c:1.119 Rev: src/main.c:1.207 Rev: src/mapping.c:1.183 Rev: src/module.c:1.28 Rev: src/module_support.c:1.63 Rev: src/modules/_math/math.c:1.79 Rev: src/modules/files/datagram.c:1.9 Rev: src/modules/files/efuns.c:1.147 Rev: src/modules/files/file.c:1.329 Rev: src/modules/files/socket.c:1.91 Rev: src/modules/files/stat.c:1.30 Rev: src/module