Skip to content

Figured out how to compile in memory beam data - #421

Merged
bryanjos merged 5 commits into
masterfrom
compile_from_path
Sep 20, 2017
Merged

Figured out how to compile in memory beam data#421
bryanjos merged 5 commits into
masterfrom
compile_from_path

Conversation

@bryanjos

Copy link
Copy Markdown
Collaborator

fixes #420

Comment thread lib/elixir_script/beam.ex
end

defp do_debug_info(beam, beam_path) do
with {:ok, {module, [debug_info: {:debug_info_v1, backend, data}]}} <- :beam_lib.chunks(beam, [:debug_info]),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long (max is 80, was 114).

Comment thread lib/elixir_script/compiler.ex Outdated

files = Path.wildcard(path)

Kernel.ParallelCompiler.files(files, [each_module: &on_module_compile(pid, &1, &2, &3)])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long (max is 80, was 92).

end)
end

def get_in_memory_module(pid, module) do

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functions should have a @SPEC type specification.

end)
end

def get_in_memory_modules(pid) do

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functions should have a @SPEC type specification.

end)
end

def put_in_memory_module(pid, module, beam) do

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functions should have a @SPEC type specification.

end

defp walk({:for, _, generators}, state) do
defp walk({:for, _, generators}, state) when is_list(generators) do

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function is too complex (ABC size is 33, max is 30).

{ J.identifier("null"), state }
end

def compile(map, state) when is_map(map) do

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functions should have a @SPEC type specification.

end

def compile({:for, _, _} = ast, state) do
def compile({:for, _, generators} = ast, state) when is_list(generators) do

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functions should have a @SPEC type specification.

end

defp walk({:for, _, generators}, state) do
defp walk({:for, _, generators}, state) when is_list(generators) do

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function is too complex (ABC size is 32, max is 30).

Comment thread lib/elixir_script/compiler.ex Outdated
def compile(entry_modules, opts \\ []) do
opts = build_compiler_options(opts, entry_modules)
{:ok, pid} = ElixirScript.State.start_link()
alias ElixirScript.{State, Translate, FindUsedModules, FindUsedFunctions, Output}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long (max is 80, was 83).

Comment thread lib/elixir_script/compiler.ex Outdated

files = Path.wildcard(path)

ParallelCompiler.files(files, [each_module: &on_module_compile(pid, &1, &2, &3)])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long (max is 80, was 85).

@sourcelevel-bot

Copy link
Copy Markdown

Ebert has finished reviewing this Pull Request and has found:

  • 3 possible new issues (including those that may have been commented here).
  • 5 fixed issues! 🎉

You can see more details about this review at https://ebertapp.io/github/elixirscript/elixirscript/pulls/421.

@bryanjos
bryanjos merged commit cf857ae into master Sep 20, 2017
@bryanjos
bryanjos deleted the compile_from_path branch September 20, 2017 03:08
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.

Allow a path to be given to ElixirScript compiler

1 participant