neoneo-go/pkg/compiler
Evgeniy Stratonikov 304900e765 compiler: improve debugging experience
Currently one instruction can correspond to multiple sequence points
because of inlining. This leads to a bad user experience as only
the last one is used. In this commit we create a sequence point for each
inlined call and also make sure that each time a new sequence point is
created the corresponding opcode can easily be seen in code.

The NOPs increase contract size, but not to a large degree. Other
solutions considered:
1. Discard NOPs if a special flag is provided. Still leads to bad
   debugging experience if deployed contract differs from the debugged
   one.
2. Create an issue for a debugger. When multiple sequence points are
   provided for a single instruction they can be used to emulate
   non-inline behaviour with pseudo-NOPs. I believe this is what windows
   debugger does (the last paragraph https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/debugging-optimized-code-and-inline-functions-external )
3. Emit debug info for inlined functions even without creating a
   function in the NEF itself. This should be done for each called
   instance and would also create overlapping opcode ranges for
   the enclosing function. However this approach can also ensure
   consistent values view for inlined function parameters.

Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-04-14 13:48:24 +03:00
..
testdata compiler: set type information during traversal, fix #2231 2021-10-25 13:55:55 +03:00
analysis.go compiler: use absolute paths for debug data 2022-04-06 15:46:54 +03:00
assign_test.go compiler: group small tests in a single file 2022-03-04 17:55:33 +03:00
binary_expr_test.go compiler: group small tests in a single file 2022-03-04 17:55:33 +03:00
byte_conversion_test.go compiler: allow to convert string constants to []byte 2020-01-27 15:29:52 +03:00
codegen.go compiler: improve debugging experience 2022-04-14 13:48:24 +03:00
codegen_test.go compiler: allow to use += on strings 2020-08-24 09:44:44 +03:00
compiler.go compiler: revert a part of ad65d1fa1f 2022-03-17 19:39:18 +03:00
compiler_test.go *: remove io/ioutil uses 2022-03-17 19:39:18 +03:00
constant_test.go compiler/interop: replace int64 with int 2021-03-04 13:20:43 +03:00
convert_test.go compiler: group small tests in a single file 2022-03-04 17:55:33 +03:00
debug.go compiler: add hash field to debug info 2022-04-06 15:27:01 +03:00
debug_test.go compiler: emit bindings configuration 2022-02-28 15:36:14 +03:00
defer_test.go compiler: properly process defer in conditional statements 2022-02-04 11:04:03 +03:00
doc.go *: add more package-specific documentation 2021-03-19 16:18:45 +03:00
for_test.go compiler: group small tests in a single file 2022-03-04 17:55:33 +03:00
func_scope.go compiler: properly process defer in conditional statements 2022-02-04 11:04:03 +03:00
function_call_test.go compiler: provide .go filename to Compile 2022-01-20 13:21:24 +03:00
global_test.go compiler: allow to use _ in constants 2022-01-20 13:52:58 +03:00
if_test.go compiler: do not DROP unary expression value inside IF stmt 2020-10-13 19:14:44 +03:00
import_test.go vm/emit: emit Boolean values correctly 2021-03-09 13:34:22 +03:00
init_test.go compiler: allow to use local variables in init() 2020-10-06 19:08:32 +03:00
inline.go compiler: improve debugging experience 2022-04-14 13:48:24 +03:00
inline_test.go compiler: do not traverse defer function literals twice 2022-02-02 16:52:15 +03:00
interop_test.go dao: drop DAO interface 2022-02-16 18:24:20 +03:00
jumps_test.go compiler: process last instructin in writeJumps 2020-08-21 09:43:05 +03:00
lambda_test.go compiler: support calling function literals 2020-08-27 10:28:50 +03:00
limit_test.go compiler: emit integers correctly 2020-01-28 16:39:19 +03:00
map_test.go compiler: support delete() builtin 2020-09-06 15:49:41 +03:00
native_test.go compiler: add test for murmur32 interop API 2022-04-05 10:51:12 +03:00
nilcheck_test.go compiler: support nil checks 2020-06-24 10:43:58 +03:00
numeric_test.go compiler: move tests from vm/tests 2019-12-23 17:05:34 +03:00
panic_test.go compiler: do not log panic message 2020-08-27 10:28:50 +03:00
pointer_test.go compiler: copy structs when passing as arguments 2020-08-05 13:14:38 +03:00
return_test.go compiler: do not DROP return value with type assertion 2020-10-13 19:14:44 +03:00
slice_test.go compiler: group small tests in a single file 2022-03-04 17:55:33 +03:00
struct_test.go compiler: group small tests in a single file 2022-03-04 17:55:33 +03:00
switch_test.go compiler: group small tests in a single file 2022-03-04 17:55:33 +03:00
syscall_test.go compiler: group small tests in a single file 2022-03-04 17:55:33 +03:00
type_test.go compiler: support non-struct methods 2020-05-19 16:40:26 +03:00
types.go compiler: update x/tools package 2022-01-20 13:21:26 +03:00
vars.go compiler: allow to use multiple underscores in func arguments 2021-10-09 13:23:11 +03:00
verify_test.go core: rename Neo.Crypto.CheckSig interop 2021-05-11 18:37:55 +03:00
vm_test.go compiler: speed up boolean expression short-circuit test 2022-01-20 13:21:26 +03:00