| Index: vm/code_descriptors_test.cc
|
| ===================================================================
|
| --- vm/code_descriptors_test.cc (revision 11528)
|
| +++ vm/code_descriptors_test.cc (working copy)
|
| @@ -182,18 +182,22 @@
|
| CODEGEN_TEST_RUN(StackmapCodegen, Smi::New(1))
|
|
|
|
|
| -DEFINE_NATIVE_ENTRY(NativeFunc, 2) {
|
| - GET_NATIVE_ARGUMENT(Smi, i, arguments->At(0));
|
| - GET_NATIVE_ARGUMENT(Smi, k, arguments->At(1));
|
| - EXPECT_EQ(10, i.Value());
|
| - EXPECT_EQ(20, k.Value());
|
| +static void NativeFunc(Dart_NativeArguments args) {
|
| + Dart_EnterScope();
|
| + Dart_Handle i = Dart_GetNativeArgument(args, 0);
|
| + Dart_Handle k = Dart_GetNativeArgument(args, 1);
|
| + int64_t value = -1;
|
| + EXPECT_VALID(Dart_IntegerToInt64(i, &value));
|
| + EXPECT_EQ(10, value);
|
| + EXPECT_VALID(Dart_IntegerToInt64(k, &value));
|
| + EXPECT_EQ(20, value);
|
| Isolate::Current()->heap()->CollectAllGarbage();
|
| }
|
|
|
|
|
| static Dart_NativeFunction native_resolver(Dart_Handle name,
|
| int argument_count) {
|
| - return reinterpret_cast<Dart_NativeFunction>(&DN_NativeFunc);
|
| + return reinterpret_cast<Dart_NativeFunction>(&NativeFunc);
|
| }
|
|
|
|
|
|
|