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

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

Issue 1944483002: Redo how Type objects are exposed from DDC. (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: More tweaks. 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 | « tool/input_sdk/patch/core_patch.dart ('k') | tool/input_sdk/private/ddc_runtime/rtti.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/private/ddc_runtime/operations.dart
diff --git a/tool/input_sdk/private/ddc_runtime/operations.dart b/tool/input_sdk/private/ddc_runtime/operations.dart
index 0a5b69bdbdb4406215f5762c8a2184877094048b..ffb056536c26af75c1c75d34ed448e1b6e75a8fe 100644
--- a/tool/input_sdk/private/ddc_runtime/operations.dart
+++ b/tool/input_sdk/private/ddc_runtime/operations.dart
@@ -195,7 +195,7 @@ _ignoreTypeFailure(actual, type) => JS('', '''(() => {
})()''');
strongInstanceOf(obj, type, ignoreFromWhiteList) => JS('', '''(() => {
- let actual = $realRuntimeType($obj);
+ let actual = $getReifiedType($obj);
if ($isSubtype(actual, $type) || actual == $jsobject ||
actual == $int && type == $double) return true;
if ($ignoreFromWhiteList == void 0) return false;
@@ -217,7 +217,7 @@ instanceOf(obj, type) => JS('', '''(() => {
// TODO(vsm): We can statically detect many cases where this
// check is unnecessary.
if ($isGroundType($type)) return false;
- let actual = $realRuntimeType($obj);
+ let actual = $getReifiedType($obj);
$throwStrongModeError('Strong mode is check failure: ' +
$typeName(actual) + ' does not soundly subtype ' +
$typeName($type));
@@ -228,7 +228,7 @@ cast(obj, type) => JS('', '''(() => {
// TODO(#296): This is perhaps too eager to throw a StrongModeError?
// TODO(vsm): handle non-nullable types
if ($instanceOfOrNull($obj, $type)) return $obj;
- let actual = $realRuntimeType($obj);
+ let actual = $getReifiedType($obj);
if ($isGroundType($type)) $throwCastError(actual, $type);
if ($_ignoreTypeFailure(actual, $type)) return $obj;
@@ -243,7 +243,7 @@ asInt(obj) => JS('', '''(() => {
}
if (Math.floor($obj) != $obj) {
// Note: null will also be caught by this check
- $throwCastError($realRuntimeType($obj), $int);
+ $throwCastError($getReifiedType($obj), $int);
}
return $obj;
})()''');
@@ -390,7 +390,7 @@ final constants = JS('', 'new Map()');
///
@JSExportName('const')
const_(obj) => JS('', '''(() => {
- let objectKey = [$realRuntimeType($obj)];
+ let objectKey = [$getReifiedType($obj)];
// TODO(jmesserly): there's no guarantee in JS that names/symbols are
// returned in the same order.
//
« no previous file with comments | « tool/input_sdk/patch/core_patch.dart ('k') | tool/input_sdk/private/ddc_runtime/rtti.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698