Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Register ops in cli #3004

Closed

Conversation

bartlomieju
Copy link
Member

Based on #3002

Introduces op registration to CLI.

@bartlomieju
Copy link
Member Author

bartlomieju commented Sep 21, 2019

creating snapshot...
global handle not serialized: 0x7b2e6dcc879: [JSArrayBuffer] in OldSpace
 - map: 0x07b2ebe02199 <Map(HOLEY_ELEMENTS)> [FastProperties]
 - prototype: 0x07b28e50c609 <Object map = 0x7b2ebe021e9>
 - elements: 0x07b27e5c0c01 <FixedArray[0]> [HOLEY_ELEMENTS]
 - embedder fields: 2
 - backing_store: 0x7fbcb0002000
 - byte_length: 1024
 - detachable
 - properties: 0x07b27e5c0c01 <FixedArray[0]> {}
 - embedder fields = {
    0, aligned pointer: 0x0
    0, aligned pointer: 0x0
 }

--- stderr


#
# Fatal error in ../../core/libdeno/v8/src/api/api.cc, line 814
# Check failed: handle_checker.CheckGlobalAndEternalHandles().
#
#
#
#FailureMessage Object: 0x7ffee9ce9000
==== C stack trace ===============================

    0   build-script-build                  0x0000000106acba93 v8::base::debug::StackTrace::StackTrace() + 19
    1   build-script-build                  0x00000001074de4d9 v8::platform::(anonymous namespace)::PrintStackTrace() + 41
    2   build-script-build                  0x0000000106ac3f96 V8_Fatal(char const*, int, char const*, ...) + 326
    3   build-script-build                  0x000000010609bf0b v8::SnapshotCreator::CreateBlob(v8::SnapshotCreator::FunctionCodeHandling) + 6443
    4   build-script-build                  0x0000000106093521 deno_snapshot_new + 257
    5   build-script-build                  0x0000000105f4a489 deno::isolate::Isolate::snapshot::h9543998b3e3e5c13 + 57
    6   build-script-build                  0x0000000105f2ac27 deno_typescript::write_snapshot::h27d194d16bb3d726 + 135
    7   build-script-build                  0x0000000105f29f1a deno_typescript::mksnapshot_bundle::h0f88cc34b9dd6d42 + 1674
    8   build-script-build                  0x0000000105f1596c build_script_build::main::h6151c4b9a6b9c9a8 + 940
    9   build-script-build                  0x0000000105f162d2 _ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd66cca6f6a9ce6b7E + 18
    10  build-script-build                  0x00000001060734e8 std::panicking::try::do_call::ha6f6dadf842d3c9c + 24
    11  build-script-build                  0x000000010607524f __rust_maybe_catch_panic + 31
    12  build-script-build                  0x0000000106073f0e std::rt::lang_start_internal::hc1ac2c20e9f8edf2 + 542
    13  build-script-build                  0x0000000105f162b2 std::rt::lang_start::h48e7438993ce8cb1 + 66
    14  build-script-build                  0x0000000105f15d52 main + 34
    15  libdyld.dylib                       0x00007fff793d83d5 start + 1
    16  ???                                 0x0000000000000001 0x0 + 1

🙄 anyone has idea how to find what's not serialized?

EDIT: Because of Deno.core.getOpsMap - can't hold reference to Deno.core in dispatch.ts

@bartlomieju
Copy link
Member Author

bartlomieju commented Sep 21, 2019

Please note that this PR still uses "dual-dispatch" model (ie. uses dispatch function if set_dispatch was used, otherwise dispatches op directly from op registry). That definitely affects performance negatively. To remove dual-dispatch we need to update compiler in deno_typescript (it takes mutable reference to TSState which doesn't play nicely with CoreOp type)

@bartlomieju
Copy link
Member Author

I'll open a fresh PR

@bartlomieju bartlomieju closed this Oct 1, 2019
@bartlomieju bartlomieju deleted the feat-register_ops_in_cli branch October 1, 2019 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant