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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart

Issue 11859012: Change how to opt-in to dart2js mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 7 years, 11 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 | dart/sdk/lib/_internal/compiler/implementation/lib/mirror_opt_in_message.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart b/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
index ae4646638ba549101bd5f9fbd90057511bd9cebd..68605212b9d64cee93d3686f63176a25ee61fe99 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
@@ -10,7 +10,6 @@ part 'constant_map.dart';
part 'native_helper.dart';
part 'regexp_helper.dart';
part 'string_helper.dart';
-part 'mirror_opt_in_message.dart';
// Performance critical helper methods.
add(var a, var b) => (a is num && b is num)
@@ -399,8 +398,6 @@ class JSInvocationMirror implements InvocationMirror {
class Primitives {
static int hashCodeSeed = 0;
- static bool mirrorsEnabled = false;
-
static int objectHashCode(object) {
int hash = JS('var', r'#.$identityHash', object);
if (hash == null) {
@@ -417,11 +414,7 @@ class Primitives {
* by defining a function in JavaScript called "dartPrint".
*/
static void printString(String string) {
- if ((MIRROR_OPT_IN_MESSAGE == string)) {
- // Turn on mirrors. Also, make sure that this message isn't easy
- // to suppress by not calling dartPrint.
- mirrorsEnabled = true;
- } else if (JS('bool', r'typeof dartPrint == "function"')) {
+ if (JS('bool', r'typeof dartPrint == "function"')) {
// Support overriding print from JavaScript.
JS('void', r'dartPrint(#)', string);
return;
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/lib/mirror_opt_in_message.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698