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

Side by Side Diff: lib/src/codegen/js_codegen.dart

Issue 1131143002: Angular workarounds (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase onto latest Created 5 years, 7 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 | « lib/src/codegen/html_codegen.dart ('k') | test/codegen/expect/html_input.html » ('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 library dev_compiler.src.codegen.js_codegen; 5 library dev_compiler.src.codegen.js_codegen;
6 6
7 import 'dart:collection' show HashSet, HashMap; 7 import 'dart:collection' show HashSet, HashMap;
8 8
9 import 'package:analyzer/analyzer.dart' hide ConstantEvaluator; 9 import 'package:analyzer/analyzer.dart' hide ConstantEvaluator;
10 import 'package:analyzer/src/generated/ast.dart' hide ConstantEvaluator; 10 import 'package:analyzer/src/generated/ast.dart' hide ConstantEvaluator;
(...skipping 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1920 return js.call( 1920 return js.call(
1921 'dart.$dynamicHelper(#, #)', [_visit(target), _visitList(args)]); 1921 'dart.$dynamicHelper(#, #)', [_visit(target), _visitList(args)]);
1922 } 1922 }
1923 return js.call('dart.$DSEND(#, #, #)', [ 1923 return js.call('dart.$DSEND(#, #, #)', [
1924 _visit(target), 1924 _visit(target),
1925 memberName, 1925 memberName,
1926 _visitList(args) 1926 _visitList(args)
1927 ]); 1927 ]);
1928 } 1928 }
1929 1929
1930 if (_isJSBuiltinType(type)) {
1931 // static call pattern for builtins.
1932 return js.call('#.#(#, #)', [
1933 _emitTypeName(type),
1934 memberName,
1935 _visit(target),
1936 _visitList(args)
1937 ]);
1938 }
1939 // Generic dispatch to a statically known method. 1930 // Generic dispatch to a statically known method.
1940 return js.call('#.#(#)', [_visit(target), memberName, _visitList(args)]); 1931 return js.call('#.#(#)', [_visit(target), memberName, _visitList(args)]);
1941 } 1932 }
1942 1933
1943 @override 1934 @override
1944 visitIndexExpression(IndexExpression node) { 1935 visitIndexExpression(IndexExpression node) {
1945 return _emitSend(_getTarget(node), '[]', [node.index]); 1936 return _emitSend(_getTarget(node), '[]', [node.index]);
1946 } 1937 }
1947 1938
1948 /// Gets the target of a [PropertyAccess] or [IndexExpression]. 1939 /// Gets the target of a [PropertyAccess] or [IndexExpression].
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
2475 2466
2476 /// A special kind of element created by the compiler, signifying a temporary 2467 /// A special kind of element created by the compiler, signifying a temporary
2477 /// variable. These objects use instance equality, and should be shared 2468 /// variable. These objects use instance equality, and should be shared
2478 /// everywhere in the tree where they are treated as the same variable. 2469 /// everywhere in the tree where they are treated as the same variable.
2479 class TemporaryVariableElement extends LocalVariableElementImpl { 2470 class TemporaryVariableElement extends LocalVariableElementImpl {
2480 TemporaryVariableElement.forNode(Identifier name) : super.forNode(name); 2471 TemporaryVariableElement.forNode(Identifier name) : super.forNode(name);
2481 2472
2482 int get hashCode => identityHashCode(this); 2473 int get hashCode => identityHashCode(this);
2483 bool operator ==(Object other) => identical(this, other); 2474 bool operator ==(Object other) => identical(this, other);
2484 } 2475 }
OLDNEW
« no previous file with comments | « lib/src/codegen/html_codegen.dart ('k') | test/codegen/expect/html_input.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698