Descriptiondart2js cps: Replace getter/setter calls with direct field access.
.length on JS arrays are not introduced yet because that is not
seen as field accesses by our class hierarchy.
I've changed the contract on Primitives so they can have side effects,
depend on state, diverge, throw, anything goes. GetField on possibly
null receivers would not be allowed otherwise.
AFAIK there are no optimizations that actually used the contract on
primitives, it just seemed like a good idea at one point in the past,
so that change only affects a single doc comment.
I'll migrate some of the classes that can now be primitives in another
CL.
BuiltinOperators are still required to be pure, although that too may
possibly change soon.
BUG=
R=kmillikin@google.com
Committed: https://github.com/dart-lang/sdk/commit/2f3b889c7b515ccbd720507f85a1b45ce9a5a998
Patch Set 1 #Patch Set 2 : Track if GetField may throw to avoid eliminating a NPE #Patch Set 3 : Fix test case #
Total comments: 2
Messages
Total messages: 8 (1 generated)
|