Opened 2 years ago

Closed 2 years ago

#5131 closed change (fixed)

[emscripten] Clean separation of bindings code and runtime code

Reported by: trev Assignee:
Priority: P4 Milestone:
Module: Core Keywords:
Cc: Blocked By:
Blocking: #4122 Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29410617/

Description (last modified by trev)

Background

We are currently compiling bindings.cpp both during bindings generation and for the final build. This results in unnecessary global variables being compiled for the final build. Also, the code is less readable than it should be.

What to change

Create a bindings/ subdirectory with the following contents:

  • main.cpp - former bindings.cpp, but with the bindings definitions properly placed within main()
  • generator.h - class_ class definition, currently in bindings.ipp
  • generator.cpp - class_ class implementation and private data structures, currently in bindings.ipp
  • runtime_utils.cpp - functions required for the bindings to work in the final build

Only runtime_utils.cpp should be part of the final build.

Change History (5)

comment:1 Changed 2 years ago by trev

  • Description modified (diff)

comment:2 Changed 2 years ago by trev

  • Description modified (diff)

comment:3 Changed 2 years ago by trev

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:4 Changed 2 years ago by abpbot

A commit referencing this issue has landed:
Issue 5131 - [emscripten Clean separation of bindings code and runtime code]

comment:5 Changed 2 years ago by trev

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.