Merge pull request #3262 from lindenlab/add_continuations_test
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 26 Jul 2016 08:49:19 +0000 (10:49 +0200)
committerGitHub <noreply@github.com>
Tue, 26 Jul 2016 08:49:19 +0000 (10:49 +0200)
Added Mono.Tasklets test

1  2 
mono/mini/mini-runtime.c
scripts/ci/run-test-default.sh

diff --combined mono/mini/mini-runtime.c
index 36225e43a5fd315cbc9d7f6aa151ae45bc26e7f1,7c03fb2949becfbdbcc4af917c0c909f29d6f2fb..dfce66481ea8db4cef11787384c1f03ad25ac634
@@@ -1514,7 -1514,7 +1514,7 @@@ mono_resolve_patch_target (MonoMethod *
                handle = mono_ldtoken_checked (patch_info->data.token->image,
                                                           patch_info->data.token->token, &handle_class, patch_info->data.token->has_context ? &patch_info->data.token->context : NULL, error);
                if (!mono_error_ok (error))
 -                      g_error ("Could not patch ldtoken due to %s", mono_error_get_message (error));
 +                      return NULL;
                mono_class_init (handle_class);
                mono_class_init (mono_class_from_mono_type ((MonoType *)handle));
  
@@@ -2779,9 -2779,6 +2779,9 @@@ MONO_SIG_HANDLER_FUNC (, mono_sigill_si
        MonoException *exc;
        MONO_SIG_HANDLER_GET_CONTEXT;
  
 +      if (mono_runtime_get_no_exec ())
 +              exit (1);
 +
        MONO_ENTER_GC_UNSAFE_UNBALANCED;
  
        exc = mono_get_exception_execution_engine ("SIGILL");
@@@ -3056,17 -3053,6 +3056,17 @@@ mini_init_delegate (MonoDelegate *del
                del->extra_arg = mini_get_delegate_arg (del->method, del->method_ptr);
  }
  
 +char*
 +mono_get_delegate_virtual_invoke_impl_name (gboolean load_imt_reg, int offset)
 +{
 +      int abs_offset;
 +
 +      abs_offset = offset;
 +      if (abs_offset < 0)
 +              abs_offset = - abs_offset;
 +      return g_strdup_printf ("delegate_virtual_invoke%s_%s%d", load_imt_reg ? "_imt" : "", offset < 0 ? "m_" : "", abs_offset / SIZEOF_VOID_P);
 +}
 +
  gpointer
  mono_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method)
  {
  
        /* FIXME Support more cases */
        if (mono_aot_only) {
 -              char tramp_name [256];
 -              const char *imt = load_imt_reg ? "_imt" : "";
 -              int ind = (load_imt_reg ? (-offset) : offset) / SIZEOF_VOID_P;
 -
 -              sprintf (tramp_name, "delegate_virtual_invoke%s_%d", imt, ind);
 -              cache [idx] = (guint8 *)mono_aot_get_trampoline (tramp_name);
 +              cache [idx] = (guint8 *)mono_aot_get_trampoline (mono_get_delegate_virtual_invoke_impl_name (load_imt_reg, offset));
                g_assert (cache [idx]);
        } else {
                cache [idx] = (guint8 *)mono_arch_get_delegate_virtual_invoke_impl (sig, method, offset, load_imt_reg);
@@@ -3166,9 -3157,7 +3166,9 @@@ mini_parse_debug_option (const char *op
        else if (!strcmp (option, "gen-seq-points"))
                debug_options.gen_sdb_seq_points = TRUE;
        else if (!strcmp (option, "gen-compact-seq-points"))
 -              debug_options.gen_seq_points_compact_data = TRUE;
 +              fprintf (stderr, "Mono Warning: option gen-compact-seq-points is deprecated.\n");
 +      else if (!strcmp (option, "no-compact-seq-points"))
 +              debug_options.no_seq_points_compact_data = TRUE;
        else if (!strcmp (option, "single-imm-size"))
                debug_options.single_imm_size = TRUE;
        else if (!strcmp (option, "init-stacks"))
@@@ -3213,7 -3202,7 +3213,7 @@@ mini_parse_debug_options (void
  
                if (!mini_parse_debug_option (arg)) {
                        fprintf (stderr, "Invalid option for the MONO_DEBUG env variable: %s\n", arg);
 -                      fprintf (stderr, "Available options: 'handle-sigint', 'keep-delegates', 'reverse-pinvoke-exceptions', 'collect-pagefault-stats', 'break-on-unverified', 'no-gdb-backtrace', 'suspend-on-sigsegv', 'suspend-on-exception', 'suspend-on-unhandled', 'dont-free-domains', 'dyn-runtime-invoke', 'gdb', 'explicit-null-checks', 'gen-seq-points', 'gen-compact-seq-points', 'single-imm-size', 'init-stacks', 'casts', 'soft-breakpoints', 'check-pinvoke-callconv', 'arm-use-fallback-tls', 'debug-domain-unload', 'partial-sharing', 'align-small-structs', 'native-debugger-break'\n");
 +                      fprintf (stderr, "Available options: 'handle-sigint', 'keep-delegates', 'reverse-pinvoke-exceptions', 'collect-pagefault-stats', 'break-on-unverified', 'no-gdb-backtrace', 'suspend-on-sigsegv', 'suspend-on-exception', 'suspend-on-unhandled', 'dont-free-domains', 'dyn-runtime-invoke', 'gdb', 'explicit-null-checks', 'gen-seq-points', 'no-compact-seq-points', 'single-imm-size', 'init-stacks', 'casts', 'soft-breakpoints', 'check-pinvoke-callconv', 'arm-use-fallback-tls', 'debug-domain-unload', 'partial-sharing', 'align-small-structs', 'native-debugger-break'\n");
                        exit (1);
                }
        }
@@@ -3695,9 -3684,7 +3695,7 @@@ mini_init (const char *filename, const 
        mono_simd_intrinsics_init ();
  #endif
  
- #if MONO_SUPPORT_TASKLETS
        mono_tasklets_init ();
- #endif
  
        register_trampolines (domain);
  
index 3ecee62fd998986ccb4369062f2c69822055a9e7,298eac6adfa044da2ffa6d6ad80dd28ee4649b31..bffda6b73f7191f1673b4e3123ca9c18b95589ea
@@@ -2,7 -2,7 +2,7 @@@
  
  export TESTCMD=`dirname "${BASH_SOURCE[0]}"`/run-step.sh
  
 -${TESTCMD} --label=mini --timeout=5m make -w -C mono/mini -k check
 +${TESTCMD} --label=mini --timeout=5m make -w -C mono/mini -k check check-seq-points EMIT_NUNIT=1
  ${TESTCMD} --label=runtime --timeout=160m make -w -C mono/tests -k test-wrench V=1 CI=1
  ${TESTCMD} --label=corlib --timeout=30m make -w -C mcs/class/corlib run-test
  ${TESTCMD} --label=verify --timeout=15m make -w -C runtime mcs-compileall
@@@ -38,6 -38,7 +38,7 @@@ ${TESTCMD} --label=Microsoft.Build.Fram
  ${TESTCMD} --label=Microsoft.Build.Tasks --timeout=5m make -w -C mcs/class/Microsoft.Build.Tasks run-test
  ${TESTCMD} --label=Microsoft.Build.Utilities --timeout=5m make -w -C mcs/class/Microsoft.Build.Utilities run-test
  ${TESTCMD} --label=Mono.C5 --timeout=5m make -w -C mcs/class/Mono.C5 run-test
+ ${TESTCMD} --label=Mono.Tasklets --timeout=5m make -w -C mcs/class/Mono.Tasklets run-test
  ${TESTCMD} --label=System.Configuration --timeout=5m make -w -C mcs/class/System.Configuration run-test
  ${TESTCMD} --label=System.Transactions --timeout=5m make -w -C mcs/class/System.Transactions run-test
  ${TESTCMD} --label=System.Web.Extensions --timeout=5m make -w -C mcs/class/System.Web.Extensions run-test