Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(510)

Issue 1859493002: Replace 'length' with more generic 'extractProperty' operation. (Closed)

Created:
4 years, 8 months ago by scheglov
Modified:
4 years, 8 months ago
Reviewers:
Paul Berry
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Replace 'length' with more generic 'extractProperty' operation. R=paulberry@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/9b79213323ed56a4efc683843fa783ce0cfe0643

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+256 lines, -167 lines) Patch
M pkg/analyzer/lib/src/summary/format.fbs View Binary file 0 comments Download
M pkg/analyzer/lib/src/summary/idl.dart View 3 chunks +7 lines, -11 lines 0 comments Download
M pkg/analyzer/lib/src/summary/prelink.dart View 1 chunk +2 lines, -18 lines 0 comments Download
M pkg/analyzer/lib/src/summary/resynthesize.dart View 11 chunks +56 lines, -39 lines 0 comments Download
M pkg/analyzer/lib/src/summary/summarize_ast.dart View 2 chunks +11 lines, -9 lines 0 comments Download
M pkg/analyzer/lib/src/summary/summarize_const_expr.dart View 6 chunks +39 lines, -14 lines 0 comments Download
M pkg/analyzer/lib/src/summary/summarize_elements.dart View 4 chunks +68 lines, -61 lines 0 comments Download
M pkg/analyzer/test/src/summary/resynthesize_test.dart View 1 chunk +9 lines, -0 lines 1 comment Download
M pkg/analyzer/test/src/summary/summarize_ast_test.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M pkg/analyzer/test/src/summary/summarize_elements_test.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M pkg/analyzer/test/src/summary/summary_common.dart View 14 chunks +58 lines, -15 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
scheglov
4 years, 8 months ago (2016-04-04 06:04:59 UTC) #1
Paul Berry
lgtm https://codereview.chromium.org/1859493002/diff/1/pkg/analyzer/test/src/summary/resynthesize_test.dart File pkg/analyzer/test/src/summary/resynthesize_test.dart (right): https://codereview.chromium.org/1859493002/diff/1/pkg/analyzer/test/src/summary/resynthesize_test.dart#newcode487 pkg/analyzer/test/src/summary/resynthesize_test.dart:487: compareConstAsts(r.identifier, o, desc); Please add a check to ...
4 years, 8 months ago (2016-04-04 15:51:25 UTC) #2
scheglov
Committed patchset #1 (id:1) manually as 9b79213323ed56a4efc683843fa783ce0cfe0643 (presubmit successful).
4 years, 8 months ago (2016-04-04 16:32:48 UTC) #4
Paul Berry
On 2016/04/04 16:32:48, scheglov wrote: > Committed patchset #1 (id:1) manually as > 9b79213323ed56a4efc683843fa783ce0cfe0643 (presubmit ...
4 years, 8 months ago (2016-04-04 21:19:51 UTC) #5
Paul Berry
4 years, 8 months ago (2016-04-04 21:30:40 UTC) #6
Message was sent while issue was closed.
On 2016/04/04 21:19:51, Paul Berry wrote:
> On 2016/04/04 16:32:48, scheglov wrote:
> > Committed patchset #1 (id:1) manually as
> > 9b79213323ed56a4efc683843fa783ce0cfe0643 (presubmit successful).
> 
> This appears to have broken a unit test in analyzer_cli.
> 
> Repro with: python tools/test.py -aia32 --checked -mrelease -t60
> pkg/analyzer_cli/test/driver_test
> 
> Example output:
> ERROR: Driver | build-mode | no stats
>   Test failed: Caught RangeError (index): Invalid value: Only valid value is
0:
> 1
>   dart:core-patch/array.dart 11                                 List.[]
>   package:analyzer/src/summary/flat_buffers.dart 811:20        
> _FbGenericList.[]
>   package:analyzer/src/summary/resynthesize.dart 546:29        
> _ConstExprBuilder._pushExtractProperty
>   package:analyzer/src/summary/resynthesize.dart 444:11        
> _ConstExprBuilder.build
>   package:analyzer/src/summary/resynthesize.dart 2569:44       
> _UnitResynthesizer._buildConstExpression
>   package:analyzer/src/summary/resynthesize.dart 2274:13       
> _UnitResynthesizer.buildVariable
>   dart:collection/list.dart 63                                 
> Object&ListMixin.forEach
>   package:analyzer/src/summary/resynthesize.dart 2508:28       
> _UnitResynthesizer.populateUnit
>   package:analyzer/src/summary/resynthesize.dart 1236:23       
> _LibraryResynthesizer.populateUnit
>   package:analyzer/src/summary/resynthesize.dart 1127:7        
> _LibraryResynthesizer.buildLibrary
>   package:analyzer/src/summary/resynthesize.dart 194:53        
> SummaryResynthesizer.getLibraryElement.<fn>
>   dart:collection-patch/compact_hash.dart 259                  
> _HashVMBase&MapMixin&&_LinkedHashMapMixin.putIfAbsent
>   package:analyzer/src/summary/resynthesize.dart 181:36        
> SummaryResynthesizer.getLibraryElement
>   package:analyzer/src/summary/summary_sdk.dart 129:44         
> SdkSummaryResultProvider._buildCoreLibrary
>   package:analyzer/src/summary/summary_sdk.dart 36:5           
> SdkSummaryResultProvider.SdkSummaryResultProvider
>   package:analyzer/src/generated/sdk_io.dart 288:19            
> DirectoryBasedDartSdk.context
>   package:analyzer/src/context/context.dart 2065:46            
> PartitionManager.forSdk
>   package:analyzer/src/context/context.dart 694:48             
> AnalysisContextImpl.createCacheFromSourceFactory
>   package:analyzer/src/context/context.dart 429:14             
> AnalysisContextImpl.sourceFactory=
>   package:analyzer_cli/src/build_mode.dart 167:13              
> BuildMode._createContext
>   package:analyzer_cli/src/build_mode.dart 69:5                
> BuildMode.analyze
>   package:analyzer_cli/src/driver.dart 250:46                  
> Driver._buildModeAnalyze.<fn>
>   package:analyzer/src/generated/utilities_general.dart 212:15 
> _PerformanceTagImpl.makeCurrentWhile
>   package:analyzer_cli/src/driver.dart 246:27                  
> Driver._buildModeAnalyze
>   package:analyzer_cli/src/driver.dart 128:32                   Driver.start
>   pkg/analyzer_cli/test/driver_test.dart 423:10                 drive
>   pkg/analyzer_cli/test/driver_test.dart 290:9                 
> main.<fn>.<fn>.doDrive
>   pkg/analyzer_cli/test/driver_test.dart 301:16                
> main.<fn>.<fn>.<fn>
>   package:unittest/src/internal_test_case.dart 120:37          
> InternalTestCase.run.<fn>
>   dart:async/zone.dart 902                                      _rootRunUnary
>   dart:async/zone.dart 798                                     
> _CustomZone.runUnary
>   dart:async/future_impl.dart 553                              
> _Future._propagateToListeners.handleValueCallback
>   dart:async/future_impl.dart 639                              
> _Future._propagateToListeners
>   dart:async/future_impl.dart 426                              
> _Future._completeWithValue
>   dart:async/future_impl.dart 481                              
> _Future._asyncComplete.<fn>
>   dart:async/zone.dart 895                                      _rootRun
>   dart:async/zone.dart 790                                     
_CustomZone.run
>   dart:async/zone.dart 696                                     
> _CustomZone.runGuarded
>   dart:async/zone.dart 721                                     
> _CustomZone.bindCallback.<fn>
>   dart:async/schedule_microtask.dart 41                         _microtaskLoop
>   dart:async/schedule_microtask.dart 50                        
> _startMicrotaskLoop
>   dart:isolate-patch/timer_impl.dart 394                       
> _Timer._runTimers
>   dart:isolate-patch/timer_impl.dart 414                       
> _Timer._handleMessage
>   dart:isolate-patch/isolate_patch.dart 148                    
> _RawReceivePortImpl._handleMessage
> 
> Would you mind investigating?

Konstantin pointed out that this was due to the fact that the CL introduced a
backwards-incompatible change to the summary format, so I simply needed to
regenerate my SDK summaries (a rebuild does the trick).  Sorry for the noise!

Powered by Google App Engine
This is Rietveld 408576698