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

BooleanSetting.value helper #7261

Closed
scabug opened this issue Mar 17, 2013 · 5 comments
Closed

BooleanSetting.value helper #7261

scabug opened this issue Mar 17, 2013 · 5 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Mar 17, 2013

It would save 6 chars if we had an implicit conversion from BooleanSetting to Boolean.

@scabug
Copy link
Author

scabug commented Mar 17, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7261?orig=1
Reporter: @som-snytt
Affected Versions: 2.11.0-M2

@scabug
Copy link
Author

scabug commented Mar 17, 2013

@som-snytt said:
scala/scala#2272

Save a few bytes, spend a few bytes.

This isn't news; I just wanted to see if the #devWarning syntax worked.

scala> :javap build/quick/classes/compiler/scala/tools/nsc/Global.class#devWarning
  public final void devWarning(scala.Function0<java.lang.String>);
    flags: ACC_PUBLIC, ACC_FINAL
    Code:
      stack=5, locals=2, args_size=2
         0: getstatic     #1296               // Field scala/tools/nsc/settings/AbsScalaSettings$.MODULE$:Lscala/tools/nsc/settings/AbsScalaSettings$;
         3: aload_0      
         4: invokevirtual #1219               // Method settings:()Lscala/tools/nsc/Settings;
         7: invokeinterface #1312,  1         // InterfaceMethod scala/tools/nsc/settings/ScalaSettings.developer:()Lscala/tools/nsc/settings/MutableSettings$BooleanSetting;
        12: invokevirtual #1305               // Method scala/tools/nsc/settings/AbsScalaSettings$.valueOfBooleanSetting:(Lscala/tools/nsc/settings/AbsSettings$AbsSetting;)Z
        15: ifne          36
        18: getstatic     #1296               // Field scala/tools/nsc/settings/AbsScalaSettings$.MODULE$:Lscala/tools/nsc/settings/AbsScalaSettings$;
        21: aload_0      
        22: invokevirtual #1219               // Method settings:()Lscala/tools/nsc/Settings;
        25: invokeinterface #1301,  1         // InterfaceMethod scala/tools/nsc/settings/ScalaSettings.debug:()Lscala/tools/nsc/settings/MutableSettings$BooleanSetting;
        30: invokevirtual #1305               // Method scala/tools/nsc/settings/AbsScalaSettings$.valueOfBooleanSetting:(Lscala/tools/nsc/settings/AbsSettings$AbsSetting;)Z

@scabug
Copy link
Author

scabug commented Mar 17, 2013

@Blaisorblade said:
Not really a big trouble, but it doesn't look like @inline worked.

@scabug
Copy link
Author

scabug commented Mar 28, 2013

@som-snytt said:
The supersessive PR: scala/scala#2327

That may not be a word sanctioned by the dictionary.

@scabug scabug closed this as completed Apr 4, 2013
@scabug
Copy link
Author

scabug commented Apr 4, 2013

@som-snytt said:
There are no trivial issues, only trivial issues with fixes to trivial issues.

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

No branches or pull requests

2 participants