Skip to content

Commit

Permalink
-F: disable Emit code optimization in Debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
diclogic committed Oct 3, 2015
1 parent 965fdc8 commit 5359860
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Cocktail/InvocationBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ private static ModuleBuilder GenerateModule(string moduleName)
var daType = typeof(DebuggableAttribute);
var daCtor = daType.GetConstructor(new Type[] { typeof(DebuggableAttribute.DebuggingModes) });
var daBuilder = new CustomAttributeBuilder(daCtor, new object[] {
#if DEBUG
DebuggableAttribute.DebuggingModes.DisableOptimizations |
#endif
DebuggableAttribute.DebuggingModes.Default });

assembly.SetCustomAttribute(daBuilder);
Expand Down
2 changes: 1 addition & 1 deletion src/Cocktail/StatePatching.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public static void GeneratePatch(Stream ostream, StateSnapshot newState, StateSn

var flag = overridingFlag.HasValue ? overridingFlag.Value : newState.FindPatchMethod();

// TODO: since every patch can potentially create the new state, we should do it smartly (registered type or self-descriptive dynamic type)
// TODO: since now every patch can potentially create the new state, we should do it smartly (registered type or self-descriptive dynamic type)
//// Every commutative delta has the potential to create a new object, so we need the type
//if (0 != (flag & (PatchFlag.CreateBit | PatchFlag.CommutativeBit)))
//{
Expand Down

0 comments on commit 5359860

Please sign in to comment.