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

Unified Diff: pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart

Issue 2534263002: Make the dart:developer library available in DDC so debugger statement works (Closed)
Patch Set: Merged Created 4 years, 1 month 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 | « pkg/dev_compiler/tool/input_sdk/lib/developer/timeline.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart
new file mode 100644
index 0000000000000000000000000000000000000000..93f19fb8777f45eca55b92aa5ed64be0bb0498a5
--- /dev/null
+++ b/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart
@@ -0,0 +1,127 @@
+// 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.
+
+// Patch file for dart:developer library.
+
+import 'dart:_js_helper' show patch, ForceInline;
+import 'dart:_foreign_helper' show JS;
+
+@patch
+// @ForceInline()
+bool debugger({bool when: true, String message}) {
+ if (when) {
+ JS('', 'debugger');
+ }
+ return when;
+}
+
+@patch
+Object inspect(Object object) {
+ return object;
+}
+
+@patch
+void log(String message,
+ {DateTime time,
+ int sequenceNumber,
+ int level: 0,
+ String name: '',
+ Zone zone,
+ Object error,
+ StackTrace stackTrace}) {
+ // TODO.
+}
+
+final _extensions = new Map<String, ServiceExtensionHandler>();
+
+@patch
+ServiceExtensionHandler _lookupExtension(String method) {
+ return _extensions[method];
+}
+
+@patch
+_registerExtension(String method, ServiceExtensionHandler handler) {
+ _extensions[method] = handler;
+}
+
+@patch
+_postEvent(String eventKind, String eventData) {
+ // TODO.
+}
+
+
+@patch
+bool _isDartStreamEnabled() {
+ return false;
+}
+
+@patch
+int _getTraceClock() {
+ // TODO.
+ return _clockValue++;
+}
+int _clockValue = 0;
+
+@patch
+int _getThreadCpuClock() {
+ return -1;
+}
+
+
+@patch
+void _reportCompleteEvent(int start,
+ int startCpu,
+ String category,
+ String name,
+ String argumentsAsJson) {
+ // TODO.
+}
+
+@patch
+void _reportInstantEvent(int start,
+ String category,
+ String name,
+ String argumentsAsJson) {
+ // TODO.
+}
+
+@patch
+int _getNextAsyncId() {
+ return 0;
+}
+
+@patch
+int _getIsolateNum() {
+ return 0;
+}
+
+@patch
+void _reportTaskEvent(int start,
+ int taskId,
+ String phase,
+ String category,
+ String name,
+ String argumentsAsJson) {
+ // TODO.
+}
+
+@patch
+int _getServiceMajorVersion() {
+ return 0;
+}
+
+@patch
+int _getServiceMinorVersion() {
+ return 0;
+}
+
+@patch
+void _getServerInfo(SendPort sp) {
+ sp.send(null);
+}
+
+@patch
+void _webServerControl(SendPort sp, bool enable) {
+ sp.send(null);
+}
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/lib/developer/timeline.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698