dart-archive / kernel

Dart IR (Intermediate Representation) -- moved to dart-lang/sdk
BSD 3-Clause "New" or "Revised" License
20 stars 3 forks source link

Sorting named parameters and native #44

Open jensjoha opened 7 years ago

jensjoha commented 7 years ago

Commit 0defa95239024bf36b62f59d42130037cadfa519 introduced sorting of named parameters which apparently doesn't play well with native stuff. E.g. the test "co19/LibTest/core/Match/operator_subscript_A01_t01" fails because lib/regexp.cc (at about line 23) just takes in parameter 2 and 3 (0-indexed) as if they where "multiLine" and "caseSensitive", respectively. With the sorting they are not.

Similarly the following program crashes as a dill file:

import 'dart:developer';

main() {
  debugger(message: "Hello, World!", when: true);
  print("Hello world!");
}

with the exception "Invalid argument(s): Hello, World!". Caused by the same thing: lib/developer.cc (around line 23) assumes parameter 0 and 1 are "when" and "message", respectively.

@asgerf

asgerf commented 7 years ago

@kmillikin is there a way to fix this on the VM side?