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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart

Issue 2944413002: optimize null safe ops by using DDC's let abstraction (Closed)
Patch Set: Created 3 years, 6 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 | « pkg/dev_compiler/lib/src/compiler/side_effect_analysis.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/private/ddc_runtime/operations.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
index 174bc54670108b14452a5b09d4b337062cfce69a..5e94d58999f4f382716699c9430c09b6b5e0602c 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
@@ -750,23 +750,6 @@ stackPrint(exception) {
// Forward to dart:_js_helper to create a _StackTrace object.
stackTrace(exception) => getTraceFromException(exception);
-///
-/// Implements a sequence of .? operations.
-///
-/// Will call each successive callback, unless one returns null, which stops
-/// the sequence.
-///
-nullSafe(obj, @rest callbacks) => JS(
- '',
- '''(() => {
- if ($obj == null) return $obj;
- for (let callback of $callbacks) {
- $obj = callback($obj);
- if ($obj == null) break;
- }
- return $obj;
-})()''');
-
final _value = JS('', 'Symbol("_value")');
///
« no previous file with comments | « pkg/dev_compiler/lib/src/compiler/side_effect_analysis.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698