|  | Remove factory body in *.fromEnvironment, and implement this same behavior
directly inside dart2js.
A few notes:
  * I ended up adding support for this feature also in dart2js with --use-kernel, it was not implemented correctly before. This is why more tests are passing.
  * I played with two other ideas:
    (a) making this a compile-time error instead
    (b) making it a warning if the arguments were constant and implement it as a constant, treat it as an error if they were not.
Unfortunately both are a breaking changes, so I backed out from them. IMO (a) is the cleanest thing to do long term, and we should raise this with the language team.
R=efortuna@google.com 
Committed: https://github.com/dart-lang/sdk/commit/dd70d8b655bc1187f942779dd5455fab1f2f8045
      Total comments: 3
      
     
  
   
      Total comments: 1
      
     
  
   
    
  
  
    
      |  | Unified diffs | Side-by-side diffs | Delta from patch set | Stats (+134 lines, -35 lines) | Patch |  
        |  | M | pkg/compiler/lib/src/common_elements.dart | View |  | 1 chunk | +3 lines, -0 lines | 0 comments | Download |  
        |  | M | pkg/compiler/lib/src/diagnostics/messages.dart | View | 1 | 2 chunks | +8 lines, -0 lines | 0 comments | Download |  
        |  | M | pkg/compiler/lib/src/elements/entities.dart | View |  | 1 chunk | +4 lines, -0 lines | 0 comments | Download |  
        |  | M | pkg/compiler/lib/src/js_backend/backend_impact.dart | View |  | 1 chunk | +11 lines, -0 lines | 0 comments | Download |  
        |  | M | pkg/compiler/lib/src/js_backend/impact_transformer.dart | View |  | 1 chunk | +3 lines, -0 lines | 0 comments | Download |  
        |  | M | pkg/compiler/lib/src/js_backend/mirrors_analysis.dart | View | 1 | 1 chunk | +1 line, -0 lines | 0 comments | Download |  
        |  | M | pkg/compiler/lib/src/js_backend/patch_resolver.dart | View | 1 | 1 chunk | +8 lines, -0 lines | 0 comments | Download |  
        |  | M | pkg/compiler/lib/src/kernel/element_map_impl.dart | View |  | 1 chunk | +6 lines, -1 line | 0 comments | Download |  
        |  | M | pkg/compiler/lib/src/kernel/elements.dart | View |  | 2 chunks | +8 lines, -1 line | 0 comments | Download |  
        |  | M | pkg/compiler/lib/src/kernel/kernel_visitor.dart | View |  | 3 chunks | +3 lines, -3 lines | 0 comments | Download |  
        |  | M | pkg/compiler/lib/src/resolution/members.dart | View | 1
        
          2 | 1 chunk | +8 lines, -0 lines | 0 comments | Download |  
        |  | M | pkg/compiler/lib/src/ssa/builder.dart | View |  | 2 chunks | +11 lines, -0 lines | 0 comments | Download |  
        |  | M | pkg/compiler/lib/src/ssa/builder_kernel.dart | View |  | 2 chunks | +21 lines, -2 lines | 0 comments | Download |  
        |  | M | pkg/compiler/lib/src/ssa/kernel_impact.dart | View | 1 | 1 chunk | +8 lines, -0 lines | 0 comments | Download |  
        |  | M | pkg/compiler/lib/src/universe/feature.dart | View |  | 1 chunk | +5 lines, -1 line | 0 comments | Download |  
        |  | M | sdk/lib/_internal/js_runtime/lib/core_patch.dart | View | 1
        
          2 | 3 chunks | +0 lines, -18 lines | 0 comments | Download |  
        |  | M | sdk/lib/_internal/js_runtime/lib/js_helper.dart | View |  | 1 chunk | +4 lines, -0 lines | 0 comments | Download |  
        |  | M | tests/compiler/dart2js/mock_libraries.dart | View |  | 1 chunk | +1 line, -0 lines | 0 comments | Download |  
        |  | M | tests/compiler/dart2js_extra/dart2js_extra.status | View |  | 1 chunk | +1 line, -0 lines | 0 comments | Download |  
        |  | A | tests/compiler/dart2js_extra/new_from_env_test.dart | View |  | 1 chunk | +18 lines, -0 lines | 0 comments | Download |  
        |  | M | tests/corelib/corelib.status | View |  | 2 chunks | +0 lines, -5 lines | 0 comments | Download |  
        |  | M | tests/language/language_dart2js.status | View |  | 2 chunks | +2 lines, -4 lines | 0 comments | Download |  
    Total messages: 16 (9 generated)
     |