Partial revert "[rti/js_interop] Accelerate is JSObject"
This reverts one file from commit 2cc7d381a5.
Change-Id: Iec4dc5e9a3e564b34ae326c5517e8d6764dfc9e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425327
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This commit is contained in:
committed by
Commit Queue
parent
466cda235d
commit
8e8fc6a565
@@ -18,7 +18,7 @@ import 'dart:_foreign_helper'
|
||||
RAW_DART_FUNCTION_REF,
|
||||
TYPE_REF;
|
||||
import 'dart:_interceptors'
|
||||
show JavaScriptFunction, JSArray, JSNull, JSUnmodifiableArray, JSObject;
|
||||
show JavaScriptFunction, JSArray, JSNull, JSUnmodifiableArray;
|
||||
import 'dart:_js_helper'
|
||||
as records
|
||||
show createRecordTypePredicate, getRtiForRecord;
|
||||
@@ -1303,8 +1303,6 @@ Object? _simpleSpecializedIsTest(Rti testRti) {
|
||||
isFn = RAW_DART_FUNCTION_REF(_isString);
|
||||
} else if (_Utils.isIdentical(testRti, TYPE_REF<bool>())) {
|
||||
isFn = RAW_DART_FUNCTION_REF(_isBool);
|
||||
} else if (_Utils.isIdentical(testRti, TYPE_REF<JSObject>())) {
|
||||
isFn = RAW_DART_FUNCTION_REF(_isJSObject);
|
||||
}
|
||||
return isFn;
|
||||
}
|
||||
@@ -1675,24 +1673,6 @@ String? _asStringQ(dynamic object) {
|
||||
throw _TypeError.forType(object, 'String?');
|
||||
}
|
||||
|
||||
bool _isJSObject(Object? object) {
|
||||
if (object == null) return false;
|
||||
if (JS('bool', 'typeof # == "object"', object)) {
|
||||
if (_isDartObject(object)) return false;
|
||||
return true;
|
||||
}
|
||||
if (JS('bool', 'typeof # == "function"', object)) {
|
||||
if (JS_GET_FLAG('DEV_COMPILER')) {
|
||||
// DDC functions have a signature attached.
|
||||
var signatureName = JS_GET_NAME(JsGetName.SIGNATURE_NAME);
|
||||
var signature = JS('', '#[#]', object, signatureName);
|
||||
return signature == null;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
String _rtiArrayToString(Object? array, List<String>? genericContext) {
|
||||
String s = '', sep = '';
|
||||
for (int i = 0; i < _Utils.arrayLength(array); i++) {
|
||||
|
||||
Reference in New Issue
Block a user