Chromium Code Reviews
DescriptionAdd a new operator |= which does a simple assignment of the raw pointer into
a handle without any vtable settings. In debug mode there are the usual checks
to ensure that the vtable in the handle matches the expected vtable value
based on the dynamic type of the object.
It is useful in loopy code as follows:
const Array& funcs = class.functions();
Function func = Function::Handle();
for (int i = 0; i < 100000000; i++) {
func |= funcs.At(i);
}
Committed: https://code.google.com/p/dart/source/detail?r=17244
Patch Set 1 #Patch Set 2 : #
Total comments: 2
Messages
Total messages: 4 (0 generated)
|
||||||||||||||||||||||||||||