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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart

Issue 2916893002: Handle int constant (Closed)
Patch Set: Updated cf. comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.js_emitter.program_builder; 5 library dart2js.js_emitter.program_builder;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'dart:convert' show JSON; 8 import 'dart:convert' show JSON;
9 9
10 import '../../closure.dart' show ClosureTask, ClosureFieldElement; 10 import '../../closure.dart' show ClosureTask, ClosureFieldElement;
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 }); 366 });
367 return loadMap; 367 return loadMap;
368 } 368 }
369 369
370 js.Expression _buildTypeToInterceptorMap() { 370 js.Expression _buildTypeToInterceptorMap() {
371 InterceptorStubGenerator stubGenerator = new InterceptorStubGenerator( 371 InterceptorStubGenerator stubGenerator = new InterceptorStubGenerator(
372 _options, 372 _options,
373 _commonElements, 373 _commonElements,
374 _task, 374 _task,
375 _nativeCodegenEnqueuer, 375 _nativeCodegenEnqueuer,
376 _constantHandler,
377 _namer, 376 _namer,
378 _oneShotInterceptorData, 377 _oneShotInterceptorData,
379 _customElementsCodegenAnalysis, 378 _customElementsCodegenAnalysis,
380 _worldBuilder, 379 _worldBuilder,
381 _closedWorld); 380 _closedWorld);
382 return stubGenerator.generateTypeToInterceptorMap(); 381 return stubGenerator.generateTypeToInterceptorMap();
383 } 382 }
384 383
385 MainFragment _buildMainFragment(LibrariesMap librariesMap) { 384 MainFragment _buildMainFragment(LibrariesMap librariesMap) {
386 // Construct the main output from the libraries and the registered holders. 385 // Construct the main output from the libraries and the registered holders.
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 } 1011 }
1013 } 1012 }
1014 } 1013 }
1015 1014
1016 Iterable<StaticStubMethod> _generateGetInterceptorMethods() { 1015 Iterable<StaticStubMethod> _generateGetInterceptorMethods() {
1017 InterceptorStubGenerator stubGenerator = new InterceptorStubGenerator( 1016 InterceptorStubGenerator stubGenerator = new InterceptorStubGenerator(
1018 _options, 1017 _options,
1019 _commonElements, 1018 _commonElements,
1020 _task, 1019 _task,
1021 _nativeCodegenEnqueuer, 1020 _nativeCodegenEnqueuer,
1022 _constantHandler,
1023 _namer, 1021 _namer,
1024 _oneShotInterceptorData, 1022 _oneShotInterceptorData,
1025 _customElementsCodegenAnalysis, 1023 _customElementsCodegenAnalysis,
1026 _worldBuilder, 1024 _worldBuilder,
1027 _closedWorld); 1025 _closedWorld);
1028 1026
1029 String holderName = 1027 String holderName =
1030 _namer.globalObjectForLibrary(_commonElements.interceptorsLibrary); 1028 _namer.globalObjectForLibrary(_commonElements.interceptorsLibrary);
1031 // TODO(floitsch): we shouldn't update the registry in the middle of 1029 // TODO(floitsch): we shouldn't update the registry in the middle of
1032 // generating the interceptor methods. 1030 // generating the interceptor methods.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 1091
1094 return fields; 1092 return fields;
1095 } 1093 }
1096 1094
1097 Iterable<StaticStubMethod> _generateOneShotInterceptors() { 1095 Iterable<StaticStubMethod> _generateOneShotInterceptors() {
1098 InterceptorStubGenerator stubGenerator = new InterceptorStubGenerator( 1096 InterceptorStubGenerator stubGenerator = new InterceptorStubGenerator(
1099 _options, 1097 _options,
1100 _commonElements, 1098 _commonElements,
1101 _task, 1099 _task,
1102 _nativeCodegenEnqueuer, 1100 _nativeCodegenEnqueuer,
1103 _constantHandler,
1104 _namer, 1101 _namer,
1105 _oneShotInterceptorData, 1102 _oneShotInterceptorData,
1106 _customElementsCodegenAnalysis, 1103 _customElementsCodegenAnalysis,
1107 _worldBuilder, 1104 _worldBuilder,
1108 _closedWorld); 1105 _closedWorld);
1109 1106
1110 String holderName = 1107 String holderName =
1111 _namer.globalObjectForLibrary(_commonElements.interceptorsLibrary); 1108 _namer.globalObjectForLibrary(_commonElements.interceptorsLibrary);
1112 // TODO(floitsch): we shouldn't update the registry in the middle of 1109 // TODO(floitsch): we shouldn't update the registry in the middle of
1113 // generating the interceptor methods. 1110 // generating the interceptor methods.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 Constant constant = new Constant(name, holder, constantValue); 1185 Constant constant = new Constant(name, holder, constantValue);
1189 _constants[constantValue] = constant; 1186 _constants[constantValue] = constant;
1190 } 1187 }
1191 } 1188 }
1192 1189
1193 Holder _registerStaticStateHolder() { 1190 Holder _registerStaticStateHolder() {
1194 return _registry.registerHolder(_namer.staticStateHolder, 1191 return _registry.registerHolder(_namer.staticStateHolder,
1195 isStaticStateHolder: true); 1192 isStaticStateHolder: true);
1196 } 1193 }
1197 } 1194 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/program_builder/collector.dart ('k') | pkg/compiler/lib/src/kernel/kernel_strategy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698