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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart

Issue 12310045: Make quotes in support code match rest of code (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/lib/js_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
index 64a6aa67d791b4b9ce5a0a803eca4ccb12d4f828..7f17cc6d0ae238918484faa6f49692f7cf3e1745 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
@@ -250,8 +250,8 @@ class CodeEmitterTask extends CompilerTask {
return js.fun(['cls', 'fields', 'prototype'], [
js['var constructor'],
- // if (typeof fields == 'function') {
- js.if_(js["typeof fields == 'function'"], [
+ // if (typeof fields == "function") {
+ js.if_(js['typeof fields == "function"'], [
js['constructor = fields']
], /* else */ [
js['var str = "function " + cls + "("'],
@@ -295,11 +295,11 @@ class CodeEmitterTask extends CompilerTask {
return [
js['var $supportsProtoName = false'],
- js["var tmp = (defineClass('c', ['f?'], {})).prototype"],
+ js['var tmp = (defineClass("c", ["f?"], {})).prototype'],
js.if_(js['tmp.__proto__'], [
js['tmp.__proto__ = {}'],
- js.if_(js[r"typeof tmp.get$f != 'undefined'"],
+ js.if_(js[r'typeof tmp.get$f != "undefined"'],
js['$supportsProtoName = true'])
])
@@ -341,13 +341,13 @@ class CodeEmitterTask extends CompilerTask {
* Super;field1,field2 from the null-string property on the
* descriptor.
*/
- // var fields = desc[''], supr;
- js["var fields = desc[''], supr"],
+ // var fields = desc[""], supr;
+ js['var fields = desc[""], supr'],
- js.if_(js["typeof fields == 'string'"], [
+ js.if_(js['typeof fields == "string"'], [
js['var s = fields.split(";")'],
js['supr = s[0]'],
- js["fields = s[1] == '' ? [] : s[1].split(',')"],
+ js['fields = s[1] == "" ? [] : s[1].split(",")'],
], /* else */ [
js['supr = desc.super']
]),
@@ -1013,7 +1013,7 @@ class CodeEmitterTask extends CompilerTask {
if (!needsHolder(cls)) return;
String holder = namer.isolateAccess(cls);
String name = namer.getName(cls);
- buffer.add("$holder$_=$_{builtin\$cls:$_'$name'");
+ buffer.add('$holder$_=$_{builtin\$cls:$_"$name"');
buffer.add('}$N');
}
@@ -2187,10 +2187,10 @@ class CodeEmitterTask extends CompilerTask {
}
addComment('BEGIN invoke [main].', buffer);
buffer.add("""
-if (typeof document !== 'undefined' && document.readyState !== 'complete') {
- document.addEventListener('readystatechange', function () {
- if (document.readyState == 'complete') {
- if (typeof dartMainRunner === 'function') {
+if (typeof document !== "undefined" && document.readyState !== "complete") {
+ document.addEventListener("readystatechange", function () {
+ if (document.readyState == "complete") {
+ if (typeof dartMainRunner === "function") {
dartMainRunner(function() { ${mainCall}; });
} else {
${mainCall};
@@ -2198,7 +2198,7 @@ if (typeof document !== 'undefined' && document.readyState !== 'complete') {
}
}, false);
} else {
- if (typeof dartMainRunner === 'function') {
+ if (typeof dartMainRunner === "function") {
dartMainRunner(function() { ${mainCall}; });
} else {
${mainCall};
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698