Revert "Turn the VM's dart:typed_data into a patch"
This reverts commit a9b906d319.
A lot of things were broken by the changes to implementation class
names.
BUG=
Review-Url: https://codereview.chromium.org/2598603002 .
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,8 @@
|
||||
{
|
||||
'sources': [
|
||||
'typed_data.cc',
|
||||
'typed_data_patch.dart',
|
||||
'typed_data.dart',
|
||||
'simd128.cc',
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
@@ -2551,33 +2551,33 @@ M.InstanceKind stringToInstanceKind(String s) {
|
||||
return M.InstanceKind.float64x2;
|
||||
case 'Int32x4':
|
||||
return M.InstanceKind.int32x4;
|
||||
case '_Uint8ClampedList':
|
||||
case 'Uint8ClampedList':
|
||||
return M.InstanceKind.uint8ClampedList;
|
||||
case '_Uint8List':
|
||||
case 'Uint8List':
|
||||
return M.InstanceKind.uint8List;
|
||||
case '_Uint16List':
|
||||
case 'Uint16List':
|
||||
return M.InstanceKind.uint16List;
|
||||
case '_Uint32List':
|
||||
case 'Uint32List':
|
||||
return M.InstanceKind.uint32List;
|
||||
case '_Uint64List':
|
||||
case 'Uint64List':
|
||||
return M.InstanceKind.uint64List;
|
||||
case '_Int8List':
|
||||
case 'Int8List':
|
||||
return M.InstanceKind.int8List;
|
||||
case '_Int16List':
|
||||
case 'Int16List':
|
||||
return M.InstanceKind.int16List;
|
||||
case '_Int32List':
|
||||
case 'Int32List':
|
||||
return M.InstanceKind.int32List;
|
||||
case '_Int64List':
|
||||
case 'Int64List':
|
||||
return M.InstanceKind.int64List;
|
||||
case '_Float32List':
|
||||
case 'Float32List':
|
||||
return M.InstanceKind.float32List;
|
||||
case '_Float64List':
|
||||
case 'Float64List':
|
||||
return M.InstanceKind.float64List;
|
||||
case '_Int32x4List':
|
||||
case 'Int32x4List':
|
||||
return M.InstanceKind.int32x4List;
|
||||
case '_Float32x4List':
|
||||
case 'Float32x4List':
|
||||
return M.InstanceKind.float32x4List;
|
||||
case '_Float64x2List':
|
||||
case 'Float64x2List':
|
||||
return M.InstanceKind.float64x2List;
|
||||
case 'StackTrace':
|
||||
return M.InstanceKind.stackTrace;
|
||||
@@ -2791,46 +2791,46 @@ class Instance extends HeapObject implements M.Instance {
|
||||
if (map['bytes'] != null) {
|
||||
Uint8List bytes = BASE64.decode(map['bytes']);
|
||||
switch (map['kind']) {
|
||||
case "_Uint8ClampedList":
|
||||
case "Uint8ClampedList":
|
||||
typedElements = bytes.buffer.asUint8ClampedList();
|
||||
break;
|
||||
case "_Uint8List":
|
||||
case "Uint8List":
|
||||
typedElements = bytes.buffer.asUint8List();
|
||||
break;
|
||||
case "_Uint16List":
|
||||
case "Uint16List":
|
||||
typedElements = bytes.buffer.asUint16List();
|
||||
break;
|
||||
case "_Uint32List":
|
||||
case "Uint32List":
|
||||
typedElements = bytes.buffer.asUint32List();
|
||||
break;
|
||||
case "_Uint64List":
|
||||
case "Uint64List":
|
||||
typedElements = bytes.buffer.asUint64List();
|
||||
break;
|
||||
case "_Int8List":
|
||||
case "Int8List":
|
||||
typedElements = bytes.buffer.asInt8List();
|
||||
break;
|
||||
case "_Int16List":
|
||||
case "Int16List":
|
||||
typedElements = bytes.buffer.asInt16List();
|
||||
break;
|
||||
case "_Int32List":
|
||||
case "Int32List":
|
||||
typedElements = bytes.buffer.asInt32List();
|
||||
break;
|
||||
case "_Int64List":
|
||||
case "Int64List":
|
||||
typedElements = bytes.buffer.asInt64List();
|
||||
break;
|
||||
case "_Float32List":
|
||||
case "Float32List":
|
||||
typedElements = bytes.buffer.asFloat32List();
|
||||
break;
|
||||
case "_Float64List":
|
||||
case "Float64List":
|
||||
typedElements = bytes.buffer.asFloat64List();
|
||||
break;
|
||||
case "_Int32x4List":
|
||||
case "Int32x4List":
|
||||
typedElements = bytes.buffer.asInt32x4List();
|
||||
break;
|
||||
case "_Float32x4List":
|
||||
case "Float32x4List":
|
||||
typedElements = bytes.buffer.asFloat32x4List();
|
||||
break;
|
||||
case "_Float64x2List":
|
||||
case "Float64x2List":
|
||||
typedElements = bytes.buffer.asFloat64x2List();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -436,12 +436,12 @@ var tests = [
|
||||
};
|
||||
var result = await isolate.invokeRpcNoUpgrade('getObject', params);
|
||||
expect(result['type'], equals('Instance'));
|
||||
expect(result['kind'], equals('_Uint8List'));
|
||||
expect(result['kind'], equals('Uint8List'));
|
||||
expect(result['_vmType'], equals('TypedData'));
|
||||
expect(result['id'], startsWith('objects/'));
|
||||
expect(result['valueAsString'], isNull);
|
||||
expect(result['class']['type'], equals('@Class'));
|
||||
expect(result['class']['name'], equals('_Uint8List'));
|
||||
expect(result['class']['name'], equals('Uint8List'));
|
||||
expect(result['size'], isPositive);
|
||||
expect(result['fields'], isEmpty);
|
||||
expect(result['length'], equals(3));
|
||||
@@ -462,12 +462,12 @@ var tests = [
|
||||
};
|
||||
var result = await isolate.invokeRpcNoUpgrade('getObject', params);
|
||||
expect(result['type'], equals('Instance'));
|
||||
expect(result['kind'], equals('_Uint8List'));
|
||||
expect(result['kind'], equals('Uint8List'));
|
||||
expect(result['_vmType'], equals('TypedData'));
|
||||
expect(result['id'], startsWith('objects/'));
|
||||
expect(result['valueAsString'], isNull);
|
||||
expect(result['class']['type'], equals('@Class'));
|
||||
expect(result['class']['name'], equals('_Uint8List'));
|
||||
expect(result['class']['name'], equals('Uint8List'));
|
||||
expect(result['size'], isPositive);
|
||||
expect(result['fields'], isEmpty);
|
||||
expect(result['length'], equals(3));
|
||||
@@ -489,12 +489,12 @@ var tests = [
|
||||
};
|
||||
var result = await isolate.invokeRpcNoUpgrade('getObject', params);
|
||||
expect(result['type'], equals('Instance'));
|
||||
expect(result['kind'], equals('_Uint8List'));
|
||||
expect(result['kind'], equals('Uint8List'));
|
||||
expect(result['_vmType'], equals('TypedData'));
|
||||
expect(result['id'], startsWith('objects/'));
|
||||
expect(result['valueAsString'], isNull);
|
||||
expect(result['class']['type'], equals('@Class'));
|
||||
expect(result['class']['name'], equals('_Uint8List'));
|
||||
expect(result['class']['name'], equals('Uint8List'));
|
||||
expect(result['size'], isPositive);
|
||||
expect(result['fields'], isEmpty);
|
||||
expect(result['length'], equals(3));
|
||||
@@ -516,12 +516,12 @@ var tests = [
|
||||
};
|
||||
var result = await isolate.invokeRpcNoUpgrade('getObject', params);
|
||||
expect(result['type'], equals('Instance'));
|
||||
expect(result['kind'], equals('_Uint8List'));
|
||||
expect(result['kind'], equals('Uint8List'));
|
||||
expect(result['_vmType'], equals('TypedData'));
|
||||
expect(result['id'], startsWith('objects/'));
|
||||
expect(result['valueAsString'], isNull);
|
||||
expect(result['class']['type'], equals('@Class'));
|
||||
expect(result['class']['name'], equals('_Uint8List'));
|
||||
expect(result['class']['name'], equals('Uint8List'));
|
||||
expect(result['size'], isPositive);
|
||||
expect(result['fields'], isEmpty);
|
||||
expect(result['length'], equals(3));
|
||||
@@ -539,12 +539,12 @@ var tests = [
|
||||
};
|
||||
var result = await isolate.invokeRpcNoUpgrade('getObject', params);
|
||||
expect(result['type'], equals('Instance'));
|
||||
expect(result['kind'], equals('_Uint64List'));
|
||||
expect(result['kind'], equals('Uint64List'));
|
||||
expect(result['_vmType'], equals('TypedData'));
|
||||
expect(result['id'], startsWith('objects/'));
|
||||
expect(result['valueAsString'], isNull);
|
||||
expect(result['class']['type'], equals('@Class'));
|
||||
expect(result['class']['name'], equals('_Uint64List'));
|
||||
expect(result['class']['name'], equals('Uint64List'));
|
||||
expect(result['size'], isPositive);
|
||||
expect(result['fields'], isEmpty);
|
||||
expect(result['length'], equals(3));
|
||||
@@ -565,12 +565,12 @@ var tests = [
|
||||
};
|
||||
var result = await isolate.invokeRpcNoUpgrade('getObject', params);
|
||||
expect(result['type'], equals('Instance'));
|
||||
expect(result['kind'], equals('_Uint64List'));
|
||||
expect(result['kind'], equals('Uint64List'));
|
||||
expect(result['_vmType'], equals('TypedData'));
|
||||
expect(result['id'], startsWith('objects/'));
|
||||
expect(result['valueAsString'], isNull);
|
||||
expect(result['class']['type'], equals('@Class'));
|
||||
expect(result['class']['name'], equals('_Uint64List'));
|
||||
expect(result['class']['name'], equals('Uint64List'));
|
||||
expect(result['size'], isPositive);
|
||||
expect(result['fields'], isEmpty);
|
||||
expect(result['length'], equals(3));
|
||||
@@ -592,12 +592,12 @@ var tests = [
|
||||
};
|
||||
var result = await isolate.invokeRpcNoUpgrade('getObject', params);
|
||||
expect(result['type'], equals('Instance'));
|
||||
expect(result['kind'], equals('_Uint64List'));
|
||||
expect(result['kind'], equals('Uint64List'));
|
||||
expect(result['_vmType'], equals('TypedData'));
|
||||
expect(result['id'], startsWith('objects/'));
|
||||
expect(result['valueAsString'], isNull);
|
||||
expect(result['class']['type'], equals('@Class'));
|
||||
expect(result['class']['name'], equals('_Uint64List'));
|
||||
expect(result['class']['name'], equals('Uint64List'));
|
||||
expect(result['size'], isPositive);
|
||||
expect(result['fields'], isEmpty);
|
||||
expect(result['length'], equals(3));
|
||||
@@ -619,12 +619,12 @@ var tests = [
|
||||
};
|
||||
var result = await isolate.invokeRpcNoUpgrade('getObject', params);
|
||||
expect(result['type'], equals('Instance'));
|
||||
expect(result['kind'], equals('_Uint64List'));
|
||||
expect(result['kind'], equals('Uint64List'));
|
||||
expect(result['_vmType'], equals('TypedData'));
|
||||
expect(result['id'], startsWith('objects/'));
|
||||
expect(result['valueAsString'], isNull);
|
||||
expect(result['class']['type'], equals('@Class'));
|
||||
expect(result['class']['name'], equals('_Uint64List'));
|
||||
expect(result['class']['name'], equals('Uint64List'));
|
||||
expect(result['size'], isPositive);
|
||||
expect(result['fields'], isEmpty);
|
||||
expect(result['length'], equals(3));
|
||||
|
||||
+3
-4
@@ -344,12 +344,10 @@ generate_core_libraries("core_libraries") {
|
||||
],
|
||||
[
|
||||
"typed_data",
|
||||
processed_gypis.typed_data_sdk_sources,
|
||||
"../../sdk/lib/typed_data",
|
||||
"typed_data",
|
||||
true,
|
||||
processed_gypis.typed_data_runtime_sources,
|
||||
"../lib",
|
||||
"typed_data",
|
||||
false,
|
||||
],
|
||||
[
|
||||
"_vmservice",
|
||||
@@ -430,6 +428,7 @@ template("generate_patched_sdk") {
|
||||
# Files below are not patches, they will not be in [concatenation_files]
|
||||
# but the `patch_sdk.dart` script will copy them into the patched sdk.
|
||||
inputs += [
|
||||
"../lib/typed_data.dart",
|
||||
"../bin/builtin.dart",
|
||||
"../bin/vmservice/vmservice_io.dart",
|
||||
"../bin/vmservice/loader.dart",
|
||||
|
||||
@@ -44,6 +44,7 @@ enum {
|
||||
|
||||
|
||||
const char** Bootstrap::profiler_patch_paths_ = NULL;
|
||||
const char** Bootstrap::typed_data_patch_paths_ = NULL;
|
||||
|
||||
|
||||
#define MAKE_PROPERTIES(CamelName, name) \
|
||||
|
||||
@@ -55,11 +55,11 @@ class Bootstrap : public AllStatic {
|
||||
static const char* isolate_patch_paths_[];
|
||||
static const char* math_patch_paths_[];
|
||||
static const char* mirrors_patch_paths_[];
|
||||
static const char* typed_data_patch_paths_[];
|
||||
static const char* _vmservice_patch_paths_[];
|
||||
|
||||
// NULL patch paths for libraries that do not have patch files.
|
||||
static const char** profiler_patch_paths_;
|
||||
static const char** typed_data_patch_paths_;
|
||||
};
|
||||
|
||||
} // namespace dart
|
||||
|
||||
@@ -3539,8 +3539,8 @@ DART_EXPORT Dart_Handle Dart_NewByteBuffer(Dart_Handle typed_data) {
|
||||
RETURN_TYPE_ERROR(Z, typed_data, 'TypedData');
|
||||
}
|
||||
Object& result = Object::Handle(Z);
|
||||
result = GetByteBufferConstructor(T, Symbols::_ByteBuffer(),
|
||||
Symbols::_ByteBufferDot_New(), 1);
|
||||
result = GetByteBufferConstructor(T, Symbols::ByteBuffer(),
|
||||
Symbols::ByteBufferDot_New(), 1);
|
||||
ASSERT(!result.IsNull());
|
||||
ASSERT(result.IsFunction());
|
||||
const Function& factory = Function::Cast(result);
|
||||
|
||||
@@ -76,11 +76,12 @@ uword FlowGraphBuilder::FindDoubleConstant(double value) {
|
||||
}
|
||||
|
||||
|
||||
#define RECOGNIZE_FACTORY(symbol, class_name, constructor_name, cid, fp) \
|
||||
{Symbols::k##symbol##Id, cid, fp, #symbol ", " #cid}, // NOLINT
|
||||
#define RECOGNIZE_FACTORY(test_factory_symbol, cid, fp) \
|
||||
{Symbols::k##test_factory_symbol##Id, cid, fp, \
|
||||
#test_factory_symbol ", " #cid}, // NOLINT
|
||||
|
||||
static struct {
|
||||
intptr_t symbol_id;
|
||||
intptr_t symbold_id;
|
||||
intptr_t cid;
|
||||
intptr_t finger_print;
|
||||
const char* name;
|
||||
@@ -97,10 +98,10 @@ intptr_t FactoryRecognizer::ResultCid(const Function& factory) {
|
||||
(lib.raw() == Library::TypedDataLibrary()));
|
||||
const String& factory_name = String::Handle(factory.name());
|
||||
for (intptr_t i = 0;
|
||||
factory_recognizer_list[i].symbol_id != Symbols::kIllegal; i++) {
|
||||
factory_recognizer_list[i].symbold_id != Symbols::kIllegal; i++) {
|
||||
if (String::EqualsIgnoringPrivateKey(
|
||||
factory_name,
|
||||
Symbols::Symbol(factory_recognizer_list[i].symbol_id))) {
|
||||
Symbols::Symbol(factory_recognizer_list[i].symbold_id))) {
|
||||
return factory_recognizer_list[i].cid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ _core_library_gypis = [
|
||||
"../../sdk/lib/math/math_sources.gypi",
|
||||
"../../sdk/lib/mirrors/mirrors_sources.gypi",
|
||||
"../../sdk/lib/profiler/profiler_sources.gypi",
|
||||
"../../sdk/lib/typed_data/typed_data_sources.gypi",
|
||||
"../../sdk/lib/vmservice/vmservice_sources.gypi",
|
||||
"../bin/io_sources.gypi",
|
||||
]
|
||||
|
||||
+95
-104
@@ -57,65 +57,63 @@ namespace dart {
|
||||
0x46d00995) \
|
||||
V(Float32x4, Float32x4.fromFloat64x2, Float32x4FromFloat64x2, Float32x4, \
|
||||
0x685a86d2) \
|
||||
V(_Float32x4, shuffle, Float32x4Shuffle, Float32x4, 0x7829101f) \
|
||||
V(_Float32x4, shuffleMix, Float32x4ShuffleMix, Float32x4, 0x4182c06b) \
|
||||
V(_Float32x4, get:signMask, Float32x4GetSignMask, Dynamic, 0x1d07ca93) \
|
||||
V(_Float32x4, equal, Float32x4Equal, Int32x4, 0x11adb239) \
|
||||
V(_Float32x4, greaterThan, Float32x4GreaterThan, Int32x4, 0x48adaf58) \
|
||||
V(_Float32x4, greaterThanOrEqual, Float32x4GreaterThanOrEqual, Int32x4, \
|
||||
0x32db94ca) \
|
||||
V(_Float32x4, lessThan, Float32x4LessThan, Int32x4, 0x425b000c) \
|
||||
V(_Float32x4, lessThanOrEqual, Float32x4LessThanOrEqual, Int32x4, \
|
||||
0x0278c2f8) \
|
||||
V(_Float32x4, notEqual, Float32x4NotEqual, Int32x4, 0x2987cd26) \
|
||||
V(_Float32x4, min, Float32x4Min, Float32x4, 0x5ed74b6f) \
|
||||
V(_Float32x4, max, Float32x4Max, Float32x4, 0x68696442) \
|
||||
V(_Float32x4, scale, Float32x4Scale, Float32x4, 0x704e4122) \
|
||||
V(_Float32x4, sqrt, Float32x4Sqrt, Float32x4, 0x2c967a6f) \
|
||||
V(_Float32x4, reciprocalSqrt, Float32x4ReciprocalSqrt, Float32x4, \
|
||||
0x6264bfe8) \
|
||||
V(_Float32x4, reciprocal, Float32x4Reciprocal, Float32x4, 0x3cd7e819) \
|
||||
V(_Float32x4, unary-, Float32x4Negate, Float32x4, 0x34431a14) \
|
||||
V(_Float32x4, abs, Float32x4Absolute, Float32x4, 0x471cdd87) \
|
||||
V(_Float32x4, clamp, Float32x4Clamp, Float32x4, 0x2cb30492) \
|
||||
V(_Float32x4, withX, Float32x4WithX, Float32x4, 0x4e336aff) \
|
||||
V(_Float32x4, withY, Float32x4WithY, Float32x4, 0x0a72b910) \
|
||||
V(_Float32x4, withZ, Float32x4WithZ, Float32x4, 0x31e93658) \
|
||||
V(_Float32x4, withW, Float32x4WithW, Float32x4, 0x60ddc105) \
|
||||
V(Float32x4, shuffle, Float32x4Shuffle, Float32x4, 0x7829101f) \
|
||||
V(Float32x4, shuffleMix, Float32x4ShuffleMix, Float32x4, 0x4182c06b) \
|
||||
V(Float32x4, get:signMask, Float32x4GetSignMask, Dynamic, 0x1d07ca93) \
|
||||
V(Float32x4, _cmpequal, Float32x4Equal, Int32x4, 0x16ad0fea) \
|
||||
V(Float32x4, _cmpgt, Float32x4GreaterThan, Int32x4, 0x0641f613) \
|
||||
V(Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, Int32x4, 0x464b8ffc) \
|
||||
V(Float32x4, _cmplt, Float32x4LessThan, Int32x4, 0x3eecd0de) \
|
||||
V(Float32x4, _cmplte, Float32x4LessThanOrEqual, Int32x4, 0x06384754) \
|
||||
V(Float32x4, _cmpnequal, Float32x4NotEqual, Int32x4, 0x2f25ef10) \
|
||||
V(Float32x4, _min, Float32x4Min, Float32x4, 0x1ee6c750) \
|
||||
V(Float32x4, _max, Float32x4Max, Float32x4, 0x4db6bbb4) \
|
||||
V(Float32x4, _scale, Float32x4Scale, Float32x4, 0x52052a66) \
|
||||
V(Float32x4, _sqrt, Float32x4Sqrt, Float32x4, 0x479f6b4a) \
|
||||
V(Float32x4, _reciprocalSqrt, Float32x4ReciprocalSqrt, Float32x4, \
|
||||
0x6d35bfcf) \
|
||||
V(Float32x4, _reciprocal, Float32x4Reciprocal, Float32x4, 0x21a56839) \
|
||||
V(Float32x4, _negate, Float32x4Negate, Float32x4, 0x6cfd5db7) \
|
||||
V(Float32x4, _abs, Float32x4Absolute, Float32x4, 0x249b8078) \
|
||||
V(Float32x4, _clamp, Float32x4Clamp, Float32x4, 0x28b06c7a) \
|
||||
V(Float32x4, withX, Float32x4WithX, Float32x4, 0x4e336aff) \
|
||||
V(Float32x4, withY, Float32x4WithY, Float32x4, 0x0a72b910) \
|
||||
V(Float32x4, withZ, Float32x4WithZ, Float32x4, 0x31e93658) \
|
||||
V(Float32x4, withW, Float32x4WithW, Float32x4, 0x60ddc105) \
|
||||
V(Float64x2, Float64x2., Float64x2Constructor, Float64x2, 0x193be61d) \
|
||||
V(Float64x2, Float64x2.zero, Float64x2Zero, Float64x2, 0x7b2ed5df) \
|
||||
V(Float64x2, Float64x2.splat, Float64x2Splat, Float64x2, 0x2abbfcb2) \
|
||||
V(Float64x2, Float64x2.fromFloat32x4, Float64x2FromFloat32x4, Float64x2, \
|
||||
0x2f43d3a6) \
|
||||
V(_Float64x2, get:x, Float64x2GetX, Double, 0x58bfb39a) \
|
||||
V(_Float64x2, get:y, Float64x2GetY, Double, 0x3cf4fcfa) \
|
||||
V(_Float64x2, unary-, Float64x2Negate, Float64x2, 0x3df2eecb) \
|
||||
V(_Float64x2, abs, Float64x2Abs, Float64x2, 0x031f9e47) \
|
||||
V(_Float64x2, sqrt, Float64x2Sqrt, Float64x2, 0x77f711dd) \
|
||||
V(_Float64x2, get:signMask, Float64x2GetSignMask, Dynamic, 0x27ddf18d) \
|
||||
V(_Float64x2, scale, Float64x2Scale, Float64x2, 0x26830a61) \
|
||||
V(_Float64x2, withX, Float64x2WithX, Float64x2, 0x1d2bcaf5) \
|
||||
V(_Float64x2, withY, Float64x2WithY, Float64x2, 0x383ed6ac) \
|
||||
V(_Float64x2, min, Float64x2Min, Float64x2, 0x28d7ddf6) \
|
||||
V(_Float64x2, max, Float64x2Max, Float64x2, 0x0bd74e5b) \
|
||||
V(Float64x2, get:x, Float64x2GetX, Double, 0x58bfb39a) \
|
||||
V(Float64x2, get:y, Float64x2GetY, Double, 0x3cf4fcfa) \
|
||||
V(Float64x2, _negate, Float64x2Negate, Float64x2, 0x523937da) \
|
||||
V(Float64x2, abs, Float64x2Abs, Float64x2, 0x031f9e47) \
|
||||
V(Float64x2, sqrt, Float64x2Sqrt, Float64x2, 0x77f711dd) \
|
||||
V(Float64x2, get:signMask, Float64x2GetSignMask, Dynamic, 0x27ddf18d) \
|
||||
V(Float64x2, scale, Float64x2Scale, Float64x2, 0x26830a61) \
|
||||
V(Float64x2, withX, Float64x2WithX, Float64x2, 0x1d2bcaf5) \
|
||||
V(Float64x2, withY, Float64x2WithY, Float64x2, 0x383ed6ac) \
|
||||
V(Float64x2, min, Float64x2Min, Float64x2, 0x28d7ddf6) \
|
||||
V(Float64x2, max, Float64x2Max, Float64x2, 0x0bd74e5b) \
|
||||
V(Int32x4, Int32x4., Int32x4Constructor, Int32x4, 0x26b199a7) \
|
||||
V(Int32x4, Int32x4.bool, Int32x4BoolConstructor, Int32x4, 0x1b55a5e1) \
|
||||
V(Int32x4, Int32x4.fromFloat32x4Bits, Int32x4FromFloat32x4Bits, Int32x4, \
|
||||
0x7e82564c) \
|
||||
V(_Int32x4, get:flagX, Int32x4GetFlagX, Bool, 0x563883c4) \
|
||||
V(_Int32x4, get:flagY, Int32x4GetFlagY, Bool, 0x446f5e7a) \
|
||||
V(_Int32x4, get:flagZ, Int32x4GetFlagZ, Bool, 0x20d61679) \
|
||||
V(_Int32x4, get:flagW, Int32x4GetFlagW, Bool, 0x504478ac) \
|
||||
V(_Int32x4, get:signMask, Int32x4GetSignMask, Dynamic, 0x2c1ec9e5) \
|
||||
V(_Int32x4, shuffle, Int32x4Shuffle, Int32x4, 0x20bc0b16) \
|
||||
V(_Int32x4, shuffleMix, Int32x4ShuffleMix, Int32x4, 0x5c7056e1) \
|
||||
V(_Int32x4, select, Int32x4Select, Float32x4, 0x6b49654f) \
|
||||
V(_Int32x4, withFlagX, Int32x4WithFlagX, Int32x4, 0x0ef58fcf) \
|
||||
V(_Int32x4, withFlagY, Int32x4WithFlagY, Int32x4, 0x6485a9c4) \
|
||||
V(_Int32x4, withFlagZ, Int32x4WithFlagZ, Int32x4, 0x267acdfa) \
|
||||
V(_Int32x4, withFlagW, Int32x4WithFlagW, Int32x4, 0x345ac675) \
|
||||
V(_Int64List, [], Int64ArrayGetIndexed, Dynamic, 0x680ec59b) \
|
||||
V(_Int64List, []=, Int64ArraySetIndexed, Dynamic, 0x0872fc15) \
|
||||
V(Int32x4, get:flagX, Int32x4GetFlagX, Bool, 0x563883c4) \
|
||||
V(Int32x4, get:flagY, Int32x4GetFlagY, Bool, 0x446f5e7a) \
|
||||
V(Int32x4, get:flagZ, Int32x4GetFlagZ, Bool, 0x20d61679) \
|
||||
V(Int32x4, get:flagW, Int32x4GetFlagW, Bool, 0x504478ac) \
|
||||
V(Int32x4, get:signMask, Int32x4GetSignMask, Dynamic, 0x2c1ec9e5) \
|
||||
V(Int32x4, shuffle, Int32x4Shuffle, Int32x4, 0x20bc0b16) \
|
||||
V(Int32x4, shuffleMix, Int32x4ShuffleMix, Int32x4, 0x5c7056e1) \
|
||||
V(Int32x4, select, Int32x4Select, Float32x4, 0x5c254e86) \
|
||||
V(Int32x4, withFlagX, Int32x4WithFlagX, Int32x4, 0x0ef58fcf) \
|
||||
V(Int32x4, withFlagY, Int32x4WithFlagY, Int32x4, 0x6485a9c4) \
|
||||
V(Int32x4, withFlagZ, Int32x4WithFlagZ, Int32x4, 0x267acdfa) \
|
||||
V(Int32x4, withFlagW, Int32x4WithFlagW, Int32x4, 0x345ac675) \
|
||||
V(Int64List, [], Int64ArrayGetIndexed, Dynamic, 0x680ec59b) \
|
||||
V(Int64List, []=, Int64ArraySetIndexed, Dynamic, 0x0872fc15) \
|
||||
V(_Bigint, get:_neg, Bigint_getNeg, Bool, 0x355fa565) \
|
||||
V(_Bigint, get:_used, Bigint_getUsed, Smi, 0x33b9dcd2) \
|
||||
V(_Bigint, get:_digits, Bigint_getDigits, TypedDataUint32Array, 0x68de883a) \
|
||||
@@ -268,45 +266,45 @@ namespace dart {
|
||||
TypedDataFloat64x2Array, 0x18cbf4d9) \
|
||||
|
||||
#define GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \
|
||||
V(_Int8List, [], Int8ArrayGetIndexed, Smi, 0x5f9a4430) \
|
||||
V(_Int8List, []=, Int8ArraySetIndexed, Dynamic, 0x5f880110) \
|
||||
V(_Uint8List, [], Uint8ArrayGetIndexed, Smi, 0x1eb150d8) \
|
||||
V(_Uint8List, []=, Uint8ArraySetIndexed, Dynamic, 0x4cf76981) \
|
||||
V(Int8List, [], Int8ArrayGetIndexed, Smi, 0x5f9a4430) \
|
||||
V(Int8List, []=, Int8ArraySetIndexed, Dynamic, 0x5f880110) \
|
||||
V(Uint8List, [], Uint8ArrayGetIndexed, Smi, 0x1eb150d8) \
|
||||
V(Uint8List, []=, Uint8ArraySetIndexed, Dynamic, 0x4cf76981) \
|
||||
V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, Smi, 0x1eb150d8) \
|
||||
V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, Dynamic, \
|
||||
0x4cf76981) \
|
||||
V(_Uint8ClampedList, [], Uint8ClampedArrayGetIndexed, Smi, 0x1eb150d8) \
|
||||
V(_Uint8ClampedList, []=, Uint8ClampedArraySetIndexed, Dynamic, 0x2224afe1) \
|
||||
V(Uint8ClampedList, [], Uint8ClampedArrayGetIndexed, Smi, 0x1eb150d8) \
|
||||
V(Uint8ClampedList, []=, Uint8ClampedArraySetIndexed, Dynamic, 0x2224afe1) \
|
||||
V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \
|
||||
Smi, 0x1eb150d8) \
|
||||
V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArraySetIndexed, \
|
||||
Dynamic, 0x2224afe1) \
|
||||
V(_Int16List, [], Int16ArrayGetIndexed, Smi, 0x74ea134c) \
|
||||
V(_Int16List, []=, Int16ArraySetIndexed, Dynamic, 0x48e25661) \
|
||||
V(_Uint16List, [], Uint16ArrayGetIndexed, Smi, 0x756d9a97) \
|
||||
V(_Uint16List, []=, Uint16ArraySetIndexed, Dynamic, 0x698f9d4f) \
|
||||
V(_Int32List, [], Int32ArrayGetIndexed, Dynamic, 0x61e49de1) \
|
||||
V(_Int32List, []=, Int32ArraySetIndexed, Dynamic, 0x55736c63) \
|
||||
V(_Uint32List, [], Uint32ArrayGetIndexed, Dynamic, 0x2eaa22d2) \
|
||||
V(_Uint32List, []=, Uint32ArraySetIndexed, Dynamic, 0x3c88eeb9) \
|
||||
V(_Float64List, [], Float64ArrayGetIndexed, Double, 0x20950e8a) \
|
||||
V(_Float64List, []=, Float64ArraySetIndexed, Dynamic, 0x556a0727) \
|
||||
V(_Float32List, [], Float32ArrayGetIndexed, Double, 0x7101fa23) \
|
||||
V(_Float32List, []=, Float32ArraySetIndexed, Dynamic, 0x5e32c1eb) \
|
||||
V(_Float32x4List, [], Float32x4ArrayGetIndexed, Float32x4, 0x28b0a7ef) \
|
||||
V(_Float32x4List, []=, Float32x4ArraySetIndexed, Dynamic, 0x4babf032) \
|
||||
V(_Int32x4List, [], Int32x4ArrayGetIndexed, Int32x4, 0x619c79a0) \
|
||||
V(_Int32x4List, []=, Int32x4ArraySetIndexed, Dynamic, 0x021bd16b) \
|
||||
V(_Float64x2List, [], Float64x2ArrayGetIndexed, Float64x2, 0x7a6dd5e5) \
|
||||
V(_Float64x2List, []=, Float64x2ArraySetIndexed, Dynamic, 0x3c59fecb) \
|
||||
V(Int16List, [], Int16ArrayGetIndexed, Smi, 0x74ea134c) \
|
||||
V(Int16List, []=, Int16ArraySetIndexed, Dynamic, 0x48e25661) \
|
||||
V(Uint16List, [], Uint16ArrayGetIndexed, Smi, 0x756d9a97) \
|
||||
V(Uint16List, []=, Uint16ArraySetIndexed, Dynamic, 0x698f9d4f) \
|
||||
V(Int32List, [], Int32ArrayGetIndexed, Dynamic, 0x61e49de1) \
|
||||
V(Int32List, []=, Int32ArraySetIndexed, Dynamic, 0x55736c63) \
|
||||
V(Uint32List, [], Uint32ArrayGetIndexed, Dynamic, 0x2eaa22d2) \
|
||||
V(Uint32List, []=, Uint32ArraySetIndexed, Dynamic, 0x3c88eeb9) \
|
||||
V(Float64List, [], Float64ArrayGetIndexed, Double, 0x20950e8a) \
|
||||
V(Float64List, []=, Float64ArraySetIndexed, Dynamic, 0x556a0727) \
|
||||
V(Float32List, [], Float32ArrayGetIndexed, Double, 0x7101fa23) \
|
||||
V(Float32List, []=, Float32ArraySetIndexed, Dynamic, 0x5e32c1eb) \
|
||||
V(Float32x4List, [], Float32x4ArrayGetIndexed, Float32x4, 0x28b0a7ef) \
|
||||
V(Float32x4List, []=, Float32x4ArraySetIndexed, Dynamic, 0x4babf032) \
|
||||
V(Int32x4List, [], Int32x4ArrayGetIndexed, Int32x4, 0x619c79a0) \
|
||||
V(Int32x4List, []=, Int32x4ArraySetIndexed, Dynamic, 0x021bd16b) \
|
||||
V(Float64x2List, [], Float64x2ArrayGetIndexed, Float64x2, 0x7a6dd5e5) \
|
||||
V(Float64x2List, []=, Float64x2ArraySetIndexed, Dynamic, 0x3c59fecb) \
|
||||
V(_TypedList, get:length, TypedDataLength, Smi, 0x2090dc1a) \
|
||||
V(_Float32x4, get:x, Float32x4ShuffleX, Double, 0x63d0c13f) \
|
||||
V(_Float32x4, get:y, Float32x4ShuffleY, Double, 0x20343b1b) \
|
||||
V(_Float32x4, get:z, Float32x4ShuffleZ, Double, 0x13181dba) \
|
||||
V(_Float32x4, get:w, Float32x4ShuffleW, Double, 0x69895020) \
|
||||
V(_Float32x4, *, Float32x4Mul, Float32x4, 0x0e2a0ef4) \
|
||||
V(_Float32x4, -, Float32x4Sub, Float32x4, 0x6edeeaa3) \
|
||||
V(_Float32x4, +, Float32x4Add, Float32x4, 0x303a9943) \
|
||||
V(Float32x4, get:x, Float32x4ShuffleX, Double, 0x63d0c13f) \
|
||||
V(Float32x4, get:y, Float32x4ShuffleY, Double, 0x20343b1b) \
|
||||
V(Float32x4, get:z, Float32x4ShuffleZ, Double, 0x13181dba) \
|
||||
V(Float32x4, get:w, Float32x4ShuffleW, Double, 0x69895020) \
|
||||
V(Float32x4, _mul, Float32x4Mul, Float32x4, 0x6183ae12) \
|
||||
V(Float32x4, _sub, Float32x4Sub, Float32x4, 0x22a8d3ea) \
|
||||
V(Float32x4, _add, Float32x4Add, Float32x4, 0x613c30f4) \
|
||||
|
||||
#define GRAPH_CORE_INTRINSICS_LIST(V) \
|
||||
V(_List, get:length, ObjectArrayLength, Smi, 0x25943ad2) \
|
||||
@@ -540,30 +538,23 @@ class MethodRecognizer : public AllStatic {
|
||||
|
||||
// clang-format off
|
||||
// List of recognized list factories:
|
||||
// (factory-name-symbol, class-name-string, constructor-name-string,
|
||||
// result-cid, fingerprint).
|
||||
// (factory-name-symbol, result-cid, fingerprint).
|
||||
#define RECOGNIZED_LIST_FACTORY_LIST(V) \
|
||||
V(_ListFactory, _List, ., kArrayCid, 0x375519ad) \
|
||||
V(_GrowableListWithData, _GrowableList, .withData, kGrowableObjectArrayCid, \
|
||||
0x401f3150) \
|
||||
V(_GrowableListFactory, _GrowableList, ., kGrowableObjectArrayCid, \
|
||||
0x0b8d9feb) \
|
||||
V(_Int8ArrayFactory, Int8List, ., kTypedDataInt8ArrayCid, 0x2e7749e3) \
|
||||
V(_Uint8ArrayFactory, Uint8List, ., kTypedDataUint8ArrayCid, 0x6ab75439) \
|
||||
V(_Uint8ClampedArrayFactory, Uint8ClampedList, ., \
|
||||
kTypedDataUint8ClampedArrayCid, 0x183129d7) \
|
||||
V(_Int16ArrayFactory, Int16List, ., kTypedDataInt16ArrayCid, 0x14b563ea) \
|
||||
V(_Uint16ArrayFactory, Uint16List, ., kTypedDataUint16ArrayCid, 0x07456be4) \
|
||||
V(_Int32ArrayFactory, Int32List, ., kTypedDataInt32ArrayCid, 0x5bd49250) \
|
||||
V(_Uint32ArrayFactory, Uint32List, ., kTypedDataUint32ArrayCid, 0x3c59b3a4) \
|
||||
V(_Int64ArrayFactory, Int64List, ., kTypedDataInt64ArrayCid, 0x57d85ac7) \
|
||||
V(_Uint64ArrayFactory, Uint64List, ., kTypedDataUint64ArrayCid, 0x2c093004) \
|
||||
V(_Float64ArrayFactory, Float64List, ., kTypedDataFloat64ArrayCid, \
|
||||
0x501be4f1) \
|
||||
V(_Float32ArrayFactory, Float32List, ., kTypedDataFloat32ArrayCid, \
|
||||
0x738e124b) \
|
||||
V(_Float32x4ArrayFactory, Float32x4List, ., kTypedDataFloat32x4ArrayCid, \
|
||||
0x7a7dd718)
|
||||
V(_ListFactory, kArrayCid, 0x375519ad) \
|
||||
V(_GrowableListWithData, kGrowableObjectArrayCid, 0x401f3150) \
|
||||
V(_GrowableListFactory, kGrowableObjectArrayCid, 0x0b8d9feb) \
|
||||
V(_Int8ArrayFactory, kTypedDataInt8ArrayCid, 0x2e7749e3) \
|
||||
V(_Uint8ArrayFactory, kTypedDataUint8ArrayCid, 0x6ab75439) \
|
||||
V(_Uint8ClampedArrayFactory, kTypedDataUint8ClampedArrayCid, 0x183129d7) \
|
||||
V(_Int16ArrayFactory, kTypedDataInt16ArrayCid, 0x14b563ea) \
|
||||
V(_Uint16ArrayFactory, kTypedDataUint16ArrayCid, 0x07456be4) \
|
||||
V(_Int32ArrayFactory, kTypedDataInt32ArrayCid, 0x5bd49250) \
|
||||
V(_Uint32ArrayFactory, kTypedDataUint32ArrayCid, 0x3c59b3a4) \
|
||||
V(_Int64ArrayFactory, kTypedDataInt64ArrayCid, 0x57d85ac7) \
|
||||
V(_Uint64ArrayFactory, kTypedDataUint64ArrayCid, 0x2c093004) \
|
||||
V(_Float64ArrayFactory, kTypedDataFloat64ArrayCid, 0x501be4f1) \
|
||||
V(_Float32ArrayFactory, kTypedDataFloat32ArrayCid, 0x738e124b) \
|
||||
V(_Float32x4ArrayFactory, kTypedDataFloat32x4ArrayCid, 0x7a7dd718)
|
||||
|
||||
// clang-format on
|
||||
|
||||
|
||||
+13
-10
@@ -1510,7 +1510,7 @@ RawError* Object::Init(Isolate* isolate, kernel::Program* kernel_program) {
|
||||
ASSERT(lib.raw() == Library::TypedDataLibrary());
|
||||
#define REGISTER_TYPED_DATA_CLASS(clazz) \
|
||||
cls = Class::NewTypedDataClass(kTypedData##clazz##ArrayCid); \
|
||||
RegisterPrivateClass(cls, Symbols::clazz##List(), lib);
|
||||
RegisterClass(cls, Symbols::clazz##List(), lib);
|
||||
|
||||
DART_CLASS_LIST_TYPED_DATA(REGISTER_TYPED_DATA_CLASS);
|
||||
#undef REGISTER_TYPED_DATA_CLASS
|
||||
@@ -1531,14 +1531,14 @@ RawError* Object::Init(Isolate* isolate, kernel::Program* kernel_program) {
|
||||
cls = Class::New<Instance>(kByteBufferCid);
|
||||
cls.set_instance_size(0);
|
||||
cls.set_next_field_offset(-kWordSize);
|
||||
RegisterPrivateClass(cls, Symbols::_ByteBuffer(), lib);
|
||||
RegisterClass(cls, Symbols::ByteBuffer(), lib);
|
||||
pending_classes.Add(cls);
|
||||
|
||||
CLASS_LIST_TYPED_DATA(REGISTER_EXT_TYPED_DATA_CLASS);
|
||||
#undef REGISTER_EXT_TYPED_DATA_CLASS
|
||||
// Register Float32x4 and Int32x4 in the object store.
|
||||
cls = Class::New<Float32x4>();
|
||||
RegisterPrivateClass(cls, Symbols::Float32x4(), lib);
|
||||
RegisterClass(cls, Symbols::Float32x4(), lib);
|
||||
cls.set_num_type_arguments(0);
|
||||
cls.set_num_own_type_arguments(0);
|
||||
cls.set_is_prefinalized();
|
||||
@@ -1548,7 +1548,7 @@ RawError* Object::Init(Isolate* isolate, kernel::Program* kernel_program) {
|
||||
object_store->set_float32x4_type(type);
|
||||
|
||||
cls = Class::New<Int32x4>();
|
||||
RegisterPrivateClass(cls, Symbols::Int32x4(), lib);
|
||||
RegisterClass(cls, Symbols::Int32x4(), lib);
|
||||
cls.set_num_type_arguments(0);
|
||||
cls.set_num_own_type_arguments(0);
|
||||
cls.set_is_prefinalized();
|
||||
@@ -1558,7 +1558,7 @@ RawError* Object::Init(Isolate* isolate, kernel::Program* kernel_program) {
|
||||
object_store->set_int32x4_type(type);
|
||||
|
||||
cls = Class::New<Float64x2>();
|
||||
RegisterPrivateClass(cls, Symbols::Float64x2(), lib);
|
||||
RegisterClass(cls, Symbols::Float64x2(), lib);
|
||||
cls.set_num_type_arguments(0);
|
||||
cls.set_num_own_type_arguments(0);
|
||||
cls.set_is_prefinalized();
|
||||
@@ -11575,16 +11575,19 @@ void Library::CheckFunctionFingerprints() {
|
||||
#undef CHECK_FINGERPRINTS2
|
||||
|
||||
|
||||
#define CHECK_FACTORY_FINGERPRINTS(symbol, class_name, factory_name, cid, fp) \
|
||||
func = GetFunction(all_libs, #class_name, #factory_name); \
|
||||
Class& cls = Class::Handle();
|
||||
|
||||
#define CHECK_FACTORY_FINGERPRINTS(factory_symbol, cid, fp) \
|
||||
cls = Isolate::Current()->class_table()->At(cid); \
|
||||
func = cls.LookupFunctionAllowPrivate(Symbols::factory_symbol()); \
|
||||
if (func.IsNull()) { \
|
||||
has_errors = true; \
|
||||
OS::Print("Function not found %s.%s\n", #class_name, #factory_name); \
|
||||
OS::Print("Function not found %s.%s\n", cls.ToCString(), \
|
||||
Symbols::factory_symbol().ToCString()); \
|
||||
} else { \
|
||||
CHECK_FINGERPRINT2(func, symbol, cid, fp); \
|
||||
CHECK_FINGERPRINT2(func, factory_symbol, cid, fp); \
|
||||
}
|
||||
|
||||
all_libs.Add(&Library::ZoneHandle(Library::CoreLibrary()));
|
||||
RECOGNIZED_LIST_FACTORY_LIST(CHECK_FACTORY_FINGERPRINTS);
|
||||
|
||||
#undef CHECK_FACTORY_FINGERPRINTS
|
||||
|
||||
@@ -678,7 +678,7 @@ void Precompiler::AddRoots(Dart_QualifiedFunctionName embedder_entry_points[]) {
|
||||
{"dart:isolate", "_SendPortImpl", "send"},
|
||||
{"dart:typed_data", "ByteData", "ByteData."},
|
||||
{"dart:typed_data", "ByteData", "ByteData._view"},
|
||||
{"dart:typed_data", "_ByteBuffer", "_ByteBuffer._New"},
|
||||
{"dart:typed_data", "ByteBuffer", "ByteBuffer._New"},
|
||||
{"dart:_vmservice", "::", "_registerIsolate"},
|
||||
{"dart:_vmservice", "::", "boot"},
|
||||
#if !defined(PRODUCT)
|
||||
|
||||
@@ -994,7 +994,7 @@ TEST_CASE(Profiler_TypedArrayAllocation) {
|
||||
Library::Handle(isolate->object_store()->typed_data_library());
|
||||
|
||||
const Class& float32_list_class =
|
||||
Class::Handle(GetClass(typed_data_library, "_Float32List"));
|
||||
Class::Handle(GetClass(typed_data_library, "Float32List"));
|
||||
EXPECT(!float32_list_class.IsNull());
|
||||
|
||||
Dart_Handle result = Dart_Invoke(lib, NewString("foo"), 0, NULL);
|
||||
|
||||
+19
-19
@@ -215,23 +215,23 @@ class ObjectPointerVisitor;
|
||||
V(Object, "Object") \
|
||||
V(Int, "int") \
|
||||
V(Double, "double") \
|
||||
V(Float32x4, "_Float32x4") \
|
||||
V(Float64x2, "_Float64x2") \
|
||||
V(Int32x4, "_Int32x4") \
|
||||
V(Int8List, "_Int8List") \
|
||||
V(Uint8List, "_Uint8List") \
|
||||
V(Uint8ClampedList, "_Uint8ClampedList") \
|
||||
V(Int16List, "_Int16List") \
|
||||
V(Uint16List, "_Uint16List") \
|
||||
V(Int32List, "_Int32List") \
|
||||
V(Uint32List, "_Uint32List") \
|
||||
V(Int64List, "_Int64List") \
|
||||
V(Uint64List, "_Uint64List") \
|
||||
V(Float32x4List, "_Float32x4List") \
|
||||
V(Int32x4List, "_Int32x4List") \
|
||||
V(Float64x2List, "_Float64x2List") \
|
||||
V(Float32List, "_Float32List") \
|
||||
V(Float64List, "_Float64List") \
|
||||
V(Float32x4, "Float32x4") \
|
||||
V(Float64x2, "Float64x2") \
|
||||
V(Int32x4, "Int32x4") \
|
||||
V(Int8List, "Int8List") \
|
||||
V(Uint8List, "Uint8List") \
|
||||
V(Uint8ClampedList, "Uint8ClampedList") \
|
||||
V(Int16List, "Int16List") \
|
||||
V(Uint16List, "Uint16List") \
|
||||
V(Int32List, "Int32List") \
|
||||
V(Uint32List, "Uint32List") \
|
||||
V(Int64List, "Int64List") \
|
||||
V(Uint64List, "Uint64List") \
|
||||
V(Float32x4List, "Float32x4List") \
|
||||
V(Int32x4List, "Int32x4List") \
|
||||
V(Float64x2List, "Float64x2List") \
|
||||
V(Float32List, "Float32List") \
|
||||
V(Float64List, "Float64List") \
|
||||
V(_Int8ArrayFactory, "Int8List.") \
|
||||
V(_Uint8ArrayFactory, "Uint8List.") \
|
||||
V(_Uint8ClampedArrayFactory, "Uint8ClampedList.") \
|
||||
@@ -278,8 +278,8 @@ class ObjectPointerVisitor;
|
||||
V(ByteDataDot, "ByteData.") \
|
||||
V(ByteDataDot_view, "ByteData._view") \
|
||||
V(_ByteDataView, "_ByteDataView") \
|
||||
V(_ByteBuffer, "_ByteBuffer") \
|
||||
V(_ByteBufferDot_New, "_ByteBuffer._New") \
|
||||
V(ByteBuffer, "ByteBuffer") \
|
||||
V(ByteBufferDot_New, "ByteBuffer._New") \
|
||||
V(_WeakProperty, "_WeakProperty") \
|
||||
V(_MirrorReference, "_MirrorReference") \
|
||||
V(FreeListElement, "FreeListElement") \
|
||||
|
||||
+10
-78
@@ -30,7 +30,6 @@
|
||||
'snapshot_test_in_dat_file': 'snapshot_test_in.dat',
|
||||
'snapshot_test_dart_file': 'snapshot_test.dart',
|
||||
'typed_data_cc_file': '<(gen_source_dir)/typed_data_gen.cc',
|
||||
'typed_data_patch_cc_file': '<(gen_source_dir)/typed_data_patch_gen.cc',
|
||||
'vmservice_cc_file': '<(gen_source_dir)/vmservice_gen.cc',
|
||||
'vmservice_patch_cc_file': '<(gen_source_dir)/vmservice_patch_gen.cc',
|
||||
},
|
||||
@@ -234,7 +233,6 @@
|
||||
'generate_mirrors_patch_cc_file#host',
|
||||
'generate_profiler_cc_file#host',
|
||||
'generate_typed_data_cc_file#host',
|
||||
'generate_typed_data_patch_cc_file#host',
|
||||
'generate_vmservice_cc_file#host',
|
||||
'generate_vmservice_patch_cc_file#host',
|
||||
],
|
||||
@@ -273,7 +271,6 @@
|
||||
'<(mirrors_patch_cc_file)',
|
||||
'<(profiler_cc_file)',
|
||||
'<(typed_data_cc_file)',
|
||||
'<(typed_data_patch_cc_file)',
|
||||
'<(vmservice_cc_file)',
|
||||
'<(vmservice_patch_cc_file)',
|
||||
],
|
||||
@@ -970,12 +967,16 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
# Unlike the other libraries in the SDK, dart:typed_data is not
|
||||
# implemented as a patch applied to the base SDK implementation.
|
||||
# Instead the VM has a complete replacement library and the
|
||||
# implementation in the SDK is ignored.
|
||||
'target_name': 'generate_typed_data_cc_file',
|
||||
'type': 'none',
|
||||
'toolsets':['host'],
|
||||
'includes': [
|
||||
# Load the runtime implementation sources.
|
||||
'../../sdk/lib/typed_data/typed_data_sources.gypi',
|
||||
'../lib/typed_data_sources.gypi',
|
||||
],
|
||||
'sources/': [
|
||||
# Exclude all .[cc|h] files.
|
||||
@@ -1009,46 +1010,6 @@
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
'target_name': 'generate_typed_data_patch_cc_file',
|
||||
'type': 'none',
|
||||
'toolsets':['host'],
|
||||
'includes': [
|
||||
# Load the patch sources.
|
||||
'../lib/typed_data_sources.gypi',
|
||||
],
|
||||
'sources/': [
|
||||
# Exclude all .[cc|h] files.
|
||||
# This is only here for reference. Excludes happen after
|
||||
# variable expansion, so the script has to do its own
|
||||
# exclude processing of the sources being passed.
|
||||
['exclude', '\\.cc|h$'],
|
||||
],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'generate_typed_data_patch_cc',
|
||||
'inputs': [
|
||||
'../tools/gen_library_src_paths.py',
|
||||
'<(libgen_in_cc_file)',
|
||||
'<@(_sources)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(typed_data_patch_cc_file)',
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'tools/gen_library_src_paths.py',
|
||||
'--output', '<(typed_data_patch_cc_file)',
|
||||
'--input_cc', '<(libgen_in_cc_file)',
|
||||
'--include', 'vm/bootstrap.h',
|
||||
'--var_name', 'dart::Bootstrap::typed_data_patch_paths_',
|
||||
'--library_name', 'dart:typed_data',
|
||||
'<@(_sources)',
|
||||
],
|
||||
'message': 'Generating ''<(typed_data_patch_cc_file)'' file.'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
'target_name': 'generate_profiler_cc_file',
|
||||
'type': 'none',
|
||||
@@ -1294,7 +1255,6 @@
|
||||
'generate_math_library_patch',
|
||||
'generate_mirrors_library_patch',
|
||||
'generate_profiler_library_patch',
|
||||
'generate_typed_data_library_patch',
|
||||
'generate_vmservice_library_patch',
|
||||
],
|
||||
'actions': [
|
||||
@@ -1305,6 +1265,11 @@
|
||||
'"dart$", "sdk/lib"])',
|
||||
'../../tools/patch_sdk.py',
|
||||
'../../tools/patch_sdk.dart',
|
||||
# Unlike the other libraries in the SDK, dart:typed_data is not
|
||||
# implemented as a patch applied to the base SDK implementation.
|
||||
# Instead the VM has a complete replacement library and the
|
||||
# implementation in the SDK is ignored.
|
||||
'../lib/typed_data.dart',
|
||||
# Unlike the other libraries in the SDK, dart:_builtin and
|
||||
# dart:nativewrappers are only available for the Dart VM.
|
||||
'../bin/builtin.dart',
|
||||
@@ -1322,7 +1287,6 @@
|
||||
'<(gen_source_dir)/patches/math_patch.dart',
|
||||
'<(gen_source_dir)/patches/mirrors_patch.dart',
|
||||
'<(gen_source_dir)/patches/profiler_patch.dart',
|
||||
'<(gen_source_dir)/patches/typed_data_patch.dart',
|
||||
'<(gen_source_dir)/patches/vmservice_patch.dart',
|
||||
],
|
||||
'outputs': [
|
||||
@@ -1694,38 +1658,6 @@
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
'variables': {
|
||||
'library_name': 'typed_data',
|
||||
'library_uri': 'dart:typed_data',
|
||||
},
|
||||
'target_name': 'generate_<(library_name)_library_patch',
|
||||
'type': 'none',
|
||||
'toolsets': ['host'],
|
||||
'includes': [
|
||||
'../lib/typed_data_sources.gypi',
|
||||
],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'concatenate_<(library_name)_patches',
|
||||
'inputs': [
|
||||
'../tools/concatenate_patches.py',
|
||||
'<@(_sources)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart'
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'tools/concatenate_patches.py',
|
||||
'--output',
|
||||
'<(gen_source_dir)/patches/<(library_name)_patch.dart',
|
||||
'<@(_sources)',
|
||||
],
|
||||
'message': 'Generating <(library_uri) patch.',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
'variables': {
|
||||
'library_name': 'vmservice',
|
||||
|
||||
@@ -110,7 +110,14 @@ void main(List<String> argv) {
|
||||
|
||||
var libraryOut = path.join(sdkLibIn, library.path);
|
||||
var libraryIn;
|
||||
if (mode == 'ddc' && library.path.contains(INTERNAL_PATH)) {
|
||||
if (mode == 'vm' && library.path.contains('typed_data.dart')) {
|
||||
// dart:typed_data is unlike the other libraries in the SDK. The VM does
|
||||
// not apply a patch to the base SDK implementation of the library.
|
||||
// Instead, the VM provides a replacement implementation and ignores the
|
||||
// sources in the SDK.
|
||||
libraryIn =
|
||||
path.join(dartDir, 'runtime', 'lib', 'typed_data.dart');
|
||||
} else if (mode == 'ddc' && library.path.contains(INTERNAL_PATH)) {
|
||||
libraryIn =
|
||||
path.join(privateIn, library.path.replaceAll(INTERNAL_PATH, ''));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user