Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

[CppCodeGen] Make Reflection.Execution compile #2518

Closed
jkotas opened this issue Jan 17, 2017 · 4 comments
Closed

[CppCodeGen] Make Reflection.Execution compile #2518

jkotas opened this issue Jan 17, 2017 · 4 comments

Comments

@jkotas
Copy link
Member

jkotas commented Jan 17, 2017

This is pre-requisite for making reflection work (#2035):

Repro:

  1. Comment out if check:
    if (_isCppCodeGen && !entry.UseWithCppCodeGen)
  2. Compile "Hello world" using CppCodeGen
@jkotas
Copy link
Member Author

jkotas commented Jan 17, 2017

The current problem is:

---------------------------
Assertion Failed: Abort=Quit, Retry=Debug, Ignore=Continue
---------------------------
Stack is not empty
   at Internal.IL.EvaluationStack`1.Pop()
   at Internal.IL.ILImporter.ImportStoreVar(Int32 index, Boolean argument)
   at Internal.IL.ILImporter.ImportBasicBlock(BasicBlock basicBlock)

@mikedn
Copy link
Contributor

mikedn commented Jan 17, 2017

Presumably CppCodeGen has not support for exception handling and the best that can be done atm is to just push a null on the stack of the handler BB?

@jkotas
Copy link
Member Author

jkotas commented Jan 18, 2017

The handlers should not be getting compiled right now. If they are getting pulled in somehow in this method (what is special about this method that pulls them in?), I agree that pushing null on the stack would be fine for now.

@mikedn
Copy link
Contributor

mikedn commented Jan 18, 2017

The handlers should not be getting compiled right now

Yep, that seems to be the intention of the existing code. But this is done by not creating BBs for catch handlers and this results in nested finally BBs falling through into the catch BB code. I'll try to fix it one of these days.

PS: Actually it's the other way around, the BB is created but it's not ignored during import. Either way, EH handling needs fixing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants