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

Side by Side Diff: tool/input_sdk/private/ddc_runtime/operations.dart

Issue 2249233002: fix #626, add AMD module format and make it default (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: merged Created 4 years, 3 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
« no previous file with comments | « tool/build_test_pkgs.sh ('k') | web/web_command.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /// This library defines runtime operations on objects used by the code 5 /// This library defines runtime operations on objects used by the code
6 /// generator. 6 /// generator.
7 part of dart._runtime; 7 part of dart._runtime;
8 8
9 class InvocationImpl extends Invocation { 9 class InvocationImpl extends Invocation {
10 final Symbol memberName; 10 final Symbol memberName;
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 _trackCall(obj, name) { 207 _trackCall(obj, name) {
208 if (JS('bool', '!#', trackProfile)) return; 208 if (JS('bool', '!#', trackProfile)) return;
209 209
210 var actual = getReifiedType(obj); 210 var actual = getReifiedType(obj);
211 String stackStr = JS('String', "new Error().stack"); 211 String stackStr = JS('String', "new Error().stack");
212 var stack = stackStr.split('\n at '); 212 var stack = stackStr.split('\n at ');
213 var src = ''; 213 var src = '';
214 for (int i = 2; i < stack.length; ++i) { 214 for (int i = 2; i < stack.length; ++i) {
215 var frame = stack[i]; 215 var frame = stack[i];
216 if (!frame.contains('dev_compiler/lib/runtime/dart_sdk.js')) { 216 if (!frame.contains('dart_sdk.js')) {
217 src = frame; 217 src = frame;
218 break; 218 break;
219 } 219 }
220 } 220 }
221 221
222 name = "${typeName(actual)}.$name <$src>"; 222 name = "${typeName(actual)}.$name <$src>";
223 if (_callMethodStats.containsKey(name)) { 223 if (_callMethodStats.containsKey(name)) {
224 _callMethodStats[name] = _callMethodStats[name] + 1; 224 _callMethodStats[name] = _callMethodStats[name] + 1;
225 } else { 225 } else {
226 _callMethodStats[name] = 1; 226 _callMethodStats[name] = 1;
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 if (obj != null && getExtensionType(obj) != null) { 733 if (obj != null && getExtensionType(obj) != null) {
734 return JS('', 'dartx.#', name); 734 return JS('', 'dartx.#', name);
735 } 735 }
736 736
737 // Check for certain names that we can't use in JS 737 // Check for certain names that we can't use in JS
738 if (name == 'constructor' || name == 'prototype') { 738 if (name == 'constructor' || name == 'prototype') {
739 name = '+' + name; 739 name = '+' + name;
740 } 740 }
741 return name; 741 return name;
742 } 742 }
OLDNEW
« no previous file with comments | « tool/build_test_pkgs.sh ('k') | web/web_command.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698