mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 09:01:42 +00:00
[vm] Alternate fix for mismatch between native and intrinsic versions of writeIntoOneByteString.
TEST=ci Bug: https://github.com/dart-lang/sdk/issues/48194 Change-Id: I8baa500e220db43d894498c59211831d15af1b4e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229322 Reviewed-by: Alexander Markov <alexmarkov@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
parent
d727165aba
commit
90542c2903
|
@ -343,8 +343,8 @@ DEFINE_NATIVE_ENTRY(Internal_writeIntoOneByteString, 0, 3) {
|
|||
ASSERT(receiver.IsOneByteString());
|
||||
GET_NON_NULL_NATIVE_ARGUMENT(Smi, index_obj, arguments->NativeArgAt(1));
|
||||
GET_NON_NULL_NATIVE_ARGUMENT(Smi, code_point_obj, arguments->NativeArgAt(2));
|
||||
ASSERT((0 <= code_point_obj.Value()) && (code_point_obj.Value() <= 0xFF));
|
||||
OneByteString::SetCharAt(receiver, index_obj.Value(), code_point_obj.Value());
|
||||
OneByteString::SetCharAt(receiver, index_obj.Value(),
|
||||
code_point_obj.Value() & 0xFF);
|
||||
return Object::null();
|
||||
}
|
||||
|
||||
|
@ -353,8 +353,8 @@ DEFINE_NATIVE_ENTRY(Internal_writeIntoTwoByteString, 0, 3) {
|
|||
ASSERT(receiver.IsTwoByteString());
|
||||
GET_NON_NULL_NATIVE_ARGUMENT(Smi, index_obj, arguments->NativeArgAt(1));
|
||||
GET_NON_NULL_NATIVE_ARGUMENT(Smi, code_point_obj, arguments->NativeArgAt(2));
|
||||
ASSERT((0 <= code_point_obj.Value()) && (code_point_obj.Value() <= 0xFFFF));
|
||||
TwoByteString::SetCharAt(receiver, index_obj.Value(), code_point_obj.Value());
|
||||
TwoByteString::SetCharAt(receiver, index_obj.Value(),
|
||||
code_point_obj.Value() & 0xFFFF);
|
||||
return Object::null();
|
||||
}
|
||||
|
||||
|
|
|
@ -1979,7 +1979,7 @@ class _Utf8Decoder {
|
|||
}
|
||||
byte = (byte << 6) | e;
|
||||
}
|
||||
writeIntoOneByteString(result, j++, byte & 0xFF);
|
||||
writeIntoOneByteString(result, j++, byte);
|
||||
}
|
||||
// Output size must match, unless we are doing single conversion and are
|
||||
// inside an unfinished sequence (which will trigger an error later).
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
// VMOptions=--verify_after_gc
|
||||
// VMOptions=--verify_before_gc --verify_after_gc
|
||||
// VMOptions=--verify_store_buffer
|
||||
// VMOptions=--no_intrinsify
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import 'dart:async';
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
// VMOptions=--verify_after_gc
|
||||
// VMOptions=--verify_before_gc --verify_after_gc
|
||||
// VMOptions=--verify_store_buffer
|
||||
// VMOptions=--no_intrinsify
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import 'dart:async';
|
||||
|
|
Loading…
Reference in a new issue