Hacker News new | ask | show | jobs
by mezoni 4216 days ago
>> Annotation would be no less magic (and not available to the user code anyways).

Magic of annotations in that the they are only annotates but a real magic goes elsewhere...

They can be ignored and this is not a magic because they are only a metadata (data about data).

I think that Dart VM and Dart developers does not like annotations because they thinking that VM cannot use them effectively (even if they written by humans).

But Dart VM are more complex than V8 VM and a ways that uses developers to tell VM about how specify metadata about critical methods is not a very good.

========================

Are there attributes that affect how the CLR optimizes during a JIT compile?

http://stackoverflow.com/questions/2367094/are-there-attribu...

========================

Also

========================

MethodImplOptions Enumeration

http://msdn.microsoft.com/ru-ru/library/system.runtime.compi...

- Unmanaged

- ForwardRef

- PreserveSig

- InternalCall

- Synchronized

- NoInlining

- AggressiveInlining

- NoOptimization

========================

This is from:

"The System.Runtime.CompilerServices namespace provides functionality for compiler writers who use managed code to specify attributes in metadata that affect the run-time behavior of the common language runtime."

The fact that Dart is not a multi-layer VM does not means that it are simple this is good for optimizations.

Do you use such a layer as a "Well structured intermediate language" in Dart VM?

1 comments

> I think that Dart VM and Dart developers does not like annotations because they thinking that VM cannot use them effectively (even if they written by humans).

The fear is actually completely opposite: people would misuse these annotations without understanding what they do and then complain that Dart VM "is slow".

As I said: I'd love to convert these lists to annotations. Don't tell anyone but we actually have inlining annotations[1] which we use when writing tests.

> Do you use such a layer as a "Well structured intermediate language" in Dart VM?

I don't understand the question. Dart VM uses intermediate representation when compiling, which is an implementation detail (unlike CLR IL - which well specified input to the VM essentially)

[1] https://code.google.com/p/dart/source/browse/branches/bleedi...)

> Do you use such a layer as a "Well structured intermediate language" in Dart VM?

>> I don't understand the question. Dart VM uses intermediate representation when compiling, which is an implementation detail (unlike CLR IL - which well specified input to the VM essentially)

I think that optimizing code easy if it represent in suitable form (intermediate format) for optimizations.

Dart VM does have any specifications about how it represent code and data in such form (intermediate language).

Intermediate language in this case means nothing more than the an intermediate language itself (with documentation) but not a some clases written in C++ language in VM project.

Does you have it?

As I said, we have intermediate language, but we don't accept it from outside of VM (for now).
>> As I said, we have intermediate language, but we don't accept it from outside of VM (for now).

Your approach very bad.

It does not help in the case where other professionals in this area can help you make VM better and effective.