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

Unified Diff: lib/runtime/harmony_feature_check.js

Issue 1879373004: Implement modular compilation (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 8 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 | « lib/runtime/dart_library.js ('k') | lib/src/analysis_context.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/harmony_feature_check.js
diff --git a/lib/runtime/harmony_feature_check.js b/lib/runtime/harmony_feature_check.js
deleted file mode 100644
index 3ea0804d8ed31cc3398dacda227a71f9c1e40dc3..0000000000000000000000000000000000000000
--- a/lib/runtime/harmony_feature_check.js
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Feature test for harmony support, alert if not present.
-(function () {
- try {
- var f = new Function(
- '"use strict";'+
- 'class C {' +
- 'constructor(x) { this.x = x; };' +
- '["foo"]() { return x => this.x + x; };' +
- 'bar(args) { return this.foo()(...args); };' +
- '};' +
- 'return new C(42).bar([100]);');
- if (f() == 142) return; // supported!
- } catch (e) {
- }
-
- var message = 'This script needs EcmaScript 6 features ' +
- 'like `class` and `=>`. Please run in a browser with support, ' +
- 'for example: chrome --js-flags="--harmony"';
- console.error(message);
- alert(message);
-
-})();
« no previous file with comments | « lib/runtime/dart_library.js ('k') | lib/src/analysis_context.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698