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

Side by Side Diff: sdk/lib/_internal/compiler/js_lib/foreign_helper.dart

Issue 944423002: Revert "Use an enum in embedded_names as input to JS_GET_NAME." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « pkg/compiler/lib/src/ssa/ssa.dart ('k') | sdk/lib/_internal/compiler/js_lib/js_helper.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 _foreign_helper; 5 library _foreign_helper;
6 6
7 import 'dart:_js_embedded_names' show JsGetName;
8
9 /** 7 /**
10 * Emits a JavaScript code fragment parameterized by arguments. 8 * Emits a JavaScript code fragment parameterized by arguments.
11 * 9 *
12 * Hash characters `#` in the [codeTemplate] are replaced in left-to-right order 10 * Hash characters `#` in the [codeTemplate] are replaced in left-to-right order
13 * with expressions that contain the values of, or evaluate to, the arguments. 11 * with expressions that contain the values of, or evaluate to, the arguments.
14 * The number of hash marks must match the number or arguments. Although 12 * The number of hash marks must match the number or arguments. Although
15 * declared with arguments [arg0] through [arg2], the form actually has no limit 13 * declared with arguments [arg0] through [arg2], the form actually has no limit
16 * on the number of arguments. 14 * on the number of arguments.
17 * 15 *
18 * The [typeDescription] argument is interpreted as a description of the 16 * The [typeDescription] argument is interpreted as a description of the
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 */ 233 */
236 String JS_FUNCTION_TYPE_OPTIONAL_PARAMETERS_TAG() {} 234 String JS_FUNCTION_TYPE_OPTIONAL_PARAMETERS_TAG() {}
237 235
238 /** 236 /**
239 * Returns the name used to tag named parameters in function type 237 * Returns the name used to tag named parameters in function type
240 * representations in JavaScript. 238 * representations in JavaScript.
241 */ 239 */
242 String JS_FUNCTION_TYPE_NAMED_PARAMETERS_TAG() {} 240 String JS_FUNCTION_TYPE_NAMED_PARAMETERS_TAG() {}
243 241
244 /// Returns the JS name for [name] from the Namer. 242 /// Returns the JS name for [name] from the Namer.
245 String JS_GET_NAME(JsGetName name) {} 243 String JS_GET_NAME(String name) {}
246 244
247 /// Reads an embedded global. 245 /// Reads an embedded global.
248 /// 246 ///
249 /// The [name] should be a constant defined in the `_embedded_names` library. 247 /// The [name] should be a constant defined in the `_embedded_names` library.
250 JS_EMBEDDED_GLOBAL(String typeDescription, String name) {} 248 JS_EMBEDDED_GLOBAL(String typeDescription, String name) {}
251 249
252 /// Returns the state of a flag that is determined by the state of the compiler 250 /// Returns the state of a flag that is determined by the state of the compiler
253 /// when the program has been analyzed. 251 /// when the program has been analyzed.
254 bool JS_GET_FLAG(String name) {} 252 bool JS_GET_FLAG(String name) {}
255 253
(...skipping 28 matching lines...) Expand all
284 } 282 }
285 283
286 /** 284 /**
287 * JavaScript string concatenation. Inputs must be Strings. Corresponds to the 285 * JavaScript string concatenation. Inputs must be Strings. Corresponds to the
288 * HStringConcat SSA instruction and may be constant-folded. 286 * HStringConcat SSA instruction and may be constant-folded.
289 */ 287 */
290 String JS_STRING_CONCAT(String a, String b) { 288 String JS_STRING_CONCAT(String a, String b) {
291 // This body is unused, only here for type analysis. 289 // This body is unused, only here for type analysis.
292 return JS('String', '# + #', a, b); 290 return JS('String', '# + #', a, b);
293 } 291 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/ssa.dart ('k') | sdk/lib/_internal/compiler/js_lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698