bearophile wrote:
Some comments are patently false (such as the one that you must compile with dmc
to call C functions on Windows).
Is this true? I have seen many times people here answer that code has to be
compiled with DMC, etc. If I am wrong I'll fix the text.
I thought this was pretty
Frits van Bommel wrote:
bearophile wrote:
Some are ignorant (the author concluded that dmd can't optimize tail
recursion by trying it with the non-tail-recursive factorial
function; and I took the time to explain him!).
If I compile this D2 program with DMD:
import std.stdio: printf;
import
bearophile wrote:
Frits van Bommel:
[LDC] [1]: It currently does not realize the array load can be done before the
function call, but I submitted a patch to LLVM for that. (This is why it currently
needs to be split up, so that LDC emits the load before the function call)
I guess you mean
bearophile wrote:
grauzone:
Just that LDC (why not mention it directly?) is starting to become more
stable than DMD, while the .NET port is in an early alpha stage at best.
I agree with you, mentioning LDC name there is better. This part of the article
is bad.
And LDC is getting quite
dsimcha wrote:
It seems that Phobos won't allow opening a file that is being written to by
another program. I understand that this is unsafe behavior. However, for my
purposes, I don't care and want to do it anyhow. (My purposes are that I have
a program periodically dumping data to a file
Brad Roberts wrote:
On Thu, 11 Jun 2009, Frits van Bommel wrote:
Note that for LDC, an even more optimal arrangement is something like[1]:
-
version(LDC)
import ldc.llvmasm;
creal expi(real y) {
return __asm!(creal)(fsincos, ={st(0)},={st(1)},0, y);
}
-
My appologies if I cut
Don wrote:
For bonus points:
[end of message]
I guess nobody'll be getting those bonus points then... :P
Andrei Alexandrescu wrote:
bearophile wrote:
One of those five precios things is the Elvis operator: Exp1 ?:
Exp2
That means: If Exp1 is non-null, use that, otherwise evaluate and use
Exp2
Adding it to D looks easy, but is such operator so important to be in
the list of the only 5 things to
Fractal wrote:
Jarrett Billingsley Wrote:
Because those are the three string encodings D supports, and only
supporting one is a dumb idea.
Why? wchar is full compatible with all languages (if it is not please tell
me)... also when I have many strings in different types, I need to convert it
Brad Roberts wrote:
I'm in the process of updating the version.html list of predefined identifiers.
I'd like to include the identifiers that are produced by LDC as well as
validate that there aren't conflicts or contradictions between the compilers. I
know there was a thread about this a while
bearophile wrote:
Frits van Bommel:
LDC actually still does a dynamic allocation there because it doesn't eliminate
dynamic allocations in loops.
I have compiled the loop in foo() with LDC:
[snip]
scope auto item = new AllocationItem(i);
[snip]
The asm of the core of the loop
Jarrett Billingsley wrote:
On Tue, Jun 2, 2009 at 8:10 AM, bearophile bearophileh...@lycos.com wrote:
Walter Bright:
Dead assignment elimination is compiler technology from the 70's !
I'd like to see this technology used for arrays too. So in the following two adjacent
lines of code a
Jarrett Billingsley wrote:
I thought I remember seeing a runtime function to allocate an array
without initializing it.. maybe it's just not used yet?
Oh, the function's there. It's just not used for that purpose :P.
It's used for array concatenations and array literals, where the compiler
bearophile wrote:
Dmitry Sychov:
Can D compiler be used only as a C++ preprocessor, that it to generate C++
output (platform independent) to be later compiled via the target platform C++
compiler?
It may be possible to induce LDC to output C code.
With the LLVM C backend linked in it
bearophile wrote:
Andrei Alexandrescu:
If we want to allow people to create ranges that are classes (as opposed
to structs) the requirement for a save() function is a must. This is
because copying class ranges with
Range copy = original;
only creates a new alias for original; the two share
Sean Kelly wrote:
Jason House wrote:
Over in D.anounce, the LDC devs said they would have an easier time
upgrading to newer dmd (fe) versions if the source was in source
control. Even if Walter is the only one with write access, it's still
be helpful. It's helpful for more than just the LDC
Frits van Bommel wrote:
Thomas Lindquist
Sorry about the misspelling there, Tomas. I get annoyed when people misspell my
name, and now I'm doing it too... :(
Denis Koroskin wrote:
FWIW, NNTP (which is used in newsgroups like this) falls into Usenet category:
Wikipedia quote (http://en.wikipedia.org/wiki/Usenet#Technical_details):
On the Internet, Usenet is typically served via NNTP ...
Just because NNTP is used for Usenet doesn't mean every NNTP
Robert Clipsham wrote:
Andrei Alexandrescu wrote:
Great! Quick question - are you supporting or considering supporting
D2? I looked on the project's home page and couldn't find that
information. There's mention of druntime for D2 which makes me hopeful.
Thanks,
Andrei
D2 support in LDC
bearophile wrote:
Christian Kamm:
The release 0.9.1 of LDC, the LLVM based compiler for the D programming
language, contains the following major improvements:
Very good. I'll try this too.
* turn GC allocations to allocas if possible
Phobos1 of DMD too has alloca, so can this
bearophile wrote:
Frits van Bommel:
Thank you for your answers.
This one is only done for certain GC allocations by the way, not all of them.
The ones currently implemented are:
* new Struct/int/float/etc.,
* uninitialized arrays (used for arr1 ~ arr2, for instance),
* zero-initialized
bearophile wrote:
While this code:
typedef int Int2 = 2;
auto a = cast(int[])(new Int2[1000]);
Produces:
pushl %esi
subl$8, %esp
movl$1000, 4(%esp)
movl$_D20TypeInfo_ATmain4Int26__initZ, (%esp)
xorl%esi, %esi
call
Andrei Alexandrescu wrote:
Jason House wrote:
This conversation made me realize a simple optimization (forgive me
if it's what Don was implying)
Instead of storing m ranges in a heap, store only m-1 ranges. The
range that would be the min if the heap is kept separate. Each pop
operation will
Stewart Gordon wrote:
Jason House wrote:
snip
Method 1:
if (x !in y)
foo();
else{
auto z = x in y;
bar(z);
}
Method 2:
auto z = x in y;
if (z is null)
foo;
else
bar(z);
Method 1 essentially calls in twice while method 2 calls in once.
snip
But there's no requirement to look it
nobody wrote:
== Quote from Jason House (jason.james.ho...@gmail.com)'s article
Why not use valgrind? With the GC disabled, it should give accurate results.
Strange enough, indeed I have tried valgrind with the GC disabled version. It
didn't report anything useful.
That's why I'm puzzled,
Brad Roberts wrote:
Don wrote:
bearophile wrote:
Andrei Alexandrescu:
there's been a sharp increase in bug reports and patches recently.
Walter and I are still scratching our head over that (it's not like
dmd got much crappier overnight). I can only infer that more people
have started using
Kagamin wrote:
BCS Wrote:
smaller object code? OTOH a good implementation will noice when I can fold
together several template expansions
That's the difference. You can't fold templates because they're binary
incompatible as opposite to generics.
They're not always binary-incompatible.
Denis Koroskin wrote:
On Wed, 20 May 2009 13:09:37 +0400, Kagamin s...@here.lot wrote:
BCS Wrote:
smaller object code? OTOH a good implementation will noice when I can
fold
together several template expansions
That's the difference. You can't fold templates because they're binary
bearophile wrote:
Frits van Bommel:
To do the latter transformation, the pass would need to be reimplemented to run
when the code is closer to machine code.
Can't this feature be asked to the LLVM developers?
Sure, feel free to file a feature request:
http://llvm.org/bugs/enter_bug.cgi
Kagamin wrote:
Frits van Bommel Wrote:
That's the difference. You can't fold templates because they're binary
incompatible as opposite to generics.
They're not always binary-incompatible. For instance, if a template only works
with pointers or references (this includes object references
Jacob Carlborg wrote:
Daniel Keep wrote:
Actually, Descent isn't perfect, either. For example, it mandates that
cases in a switch MUST be aligned with the braces. What's more fun is
that you can't override it until AFTER it's corrected YOU.
Just file a ticket.
The relevant ticket[1] is a
Andrei Alexandrescu wrote:
Good point! Now define Unfinalize that opens the final methods of a
class for method overriding.
class A
{
final int foo(string) { ... }
}
class UnfinalizeA : A
{
int foo(string a) { return super.foo(a); }
}
DMD rightly doesn't allow this:
---
test.d(8):
Fractal wrote:
Hello
After I updated my installed DMD, to 1.045, when I try compile my code, many errors
appears, like Error: class main.Program D compiler and phobos' object.d are
mismatched.
What I can do to fix these errors? (Im using Tango)
Tango added support for 1.045 in r4653:
MikeWh wrote:
I have 2 files: 1. a main file called caller.d, 2. a file to import called
sub.d. They are:
// caller.d
import sub;
import std.stdio;
void main(){
sub mySub= new sub;
writefln( mySub.one() );
}
// sub.d
class sub{
int one(){
return 1;
}
}
Nick Sabalausky wrote:
Can anyone think of a
reasonable case where it would actually make sense to override opCmp, but
not opEquals? (that is, without bastardizing them like in a C++ streams
kind of way)
How about a struct you want to be opCmp()-comparable (which, according to the
spec,
Leandro Lucarella wrote:
Isn't the demangle code taken from DMDFE?
Why would DMDFE need a demangler? It can just not mangle in the first place :).
dsimcha wrote:
== Quote from Frits van Bommel (fvbom...@remwovexcapss.nl)'s article
Leandro Lucarella wrote:
Isn't the demangle code taken from DMDFE?
Why would DMDFE need a demangler? It can just not mangle in the first place :).
You need name mangling for templates and function
Leandro Lucarella wrote:
GDB people have spoken (I don't see you subscribed to the bug report so
I transcribe the comment from GDB):
--
For a patch this size we would need copyright assignments from all
the authors of the
Daniel Keep wrote:
Frits van Bommel wrote:
Daniel Keep wrote:
When your class' dtor is called, you CANNOT say whether any of the
references into GC-controlled memory you hold are still valid.
You forgot to add: unless you know for a *fact* they're referenced from
a GC root, for example from
Daniel Keep wrote:
When your class' dtor is called, you CANNOT say whether any of the
references into GC-controlled memory you hold are still valid.
You forgot to add: unless you know for a *fact* they're referenced from a GC
root, for example from a global variable (directly or indirectly).
Don wrote:
In the case complex = int/complex, there's no problem. It's the case int
= int/complex that doesn't make sense.
And that's fundamentally because cast(real)(2 + 3i) doesn't have a
definite answer.
Devil's advocate: one could argue it's the same as cast(int) of a float -- it
returns
Walter Bright wrote:
Leandro Lucarella wrote:
Hi, I don't who is in charge of the web NG archive[1], but is there any
chance to update them at least once a day?
Doing it once a day means getting the archiving program on the server,
which is FreeBSD64. Unfortunately, that platform isn't
Michel Fortin wrote:
On 2009-04-27 00:50:23 -0400, dsimcha dsim...@yahoo.com said:
Output:
Direct: 2343
Virtual: 5695
opApply: 3014
Nice.
Isn't there room for optimisation on the compiler side though? I mean,
the compiler could inline opApply, and while doing so it could notice
that
dsimcha wrote:
[snip]
Output:
Direct: 2343
Virtual: 5695
opApply: 3014
Bottom line is that these pretty much come in the order you would expect them
to,
but there are no particularly drastic differences between any of them. To put
these timings in perspective, 5700 ms for 1 billion
Denis Koroskin wrote:
On Thu, 23 Apr 2009 16:20:03 +0400, Don nos...@nospam.com wrote:
struct Foo(A, B, C){
A[10] a;
B b;
C c;
void toString(Sink sink){
foreach(x; a) sink(x);
sink(b);
sink(c);
}
}
... but it's not, you have to create a silly buffer to put all your
strings in,
Andrei Alexandrescu wrote:
Frits van Bommel wrote:
IMHO It'd be pretty nice for the standard formatting systems (both the
Tango and Phobos ones) to just call a standard Object method taking
(Sink sink, char[] format = null) on objects.
Probably we'll need that. You forgot the in though :o
bearophile wrote:
What is the advantage of having a separate /+ +/ nestable comment syntax?
Can't the /+ +/ be removed to make the normal /* */ syntax nestable?
(IS the different C semantics of /* */ a problem here? I don't think so.)
Sometimes it's handy to have non-nesting comments.
For
Leandro Lucarella wrote:
I think instead of a notification mechanism access to the mark bit can be
provided.
The mark phase is ran with all thread paused, so you don't need any
notifications in that phase because nobody can ask the weak ref object for
the underlaying pointer then.
When threads
Jason House wrote:
Frits van Bommel Wrote:
Leandro Lucarella wrote:
I think instead of a notification mechanism access to the mark bit can be
provided.
The mark phase is ran with all thread paused, so you don't need any
notifications in that phase because nobody can ask the weak ref object
Lars T. Kyllingstad wrote:
Walter Bright wrote:
This is a major revision to Phobos, including Andrei's revolutionary
new range support.
http://www.digitalmars.com/d/2.0/changelog.html
http://ftp.digitalmars.com/dmd.2.029.zip
This is looking very nice! I want to switch from D1 to D2,
Daniel Keep wrote:
Lars T. Kyllingstad wrote:
Walter Bright wrote:
This is a major revision to Phobos, including Andrei's revolutionary
new range support.
http://www.digitalmars.com/d/2.0/changelog.html
http://ftp.digitalmars.com/dmd.2.029.zip
This is looking very nice! I want to switch
Rohan wrote:
Hi! I try to build DMD under Syllable, but I get next error. I tried 12
versions and BSD port, and it didn't help.
http://img95.imageshack.us/img95/5505/capturey.png
Could anybody help?
Looks like simple missing #includes.
Figure out which header should declare each of those
Michel Fortin wrote:
On 2009-04-20 00:38:48 -0400, Steve Teale steve.te...@britseyeview.com
said:
Michel Fortin Wrote:
What's the license?
Hmm, forgot about that stuff, BSD maybe - suggest one please.
By looking at the code, I've found a license. Not sure which license it
is (looks a
Walter Bright wrote:
Anders Bergh wrote:
You could probably make dmd run on some GNU/Darwin, but it's sort of
dead. There's http://www.puredarwin.org/ but I'm not sure if it
actually works yet. The iPhone is an ARM platform so dmd would
certainly not work there...
If dmd/phobos binaries for
Michel Fortin wrote:
On 2009-04-13 09:43:53 -0400, Frits van Bommel
fvbom...@remwovexcapss.nl said:
(How does this combine with the D ABI anyway? I know binary
compatibility between the different compilers is a bit of a pipe dream
at the moment, but the only way that could work would
Stewart Gordon wrote:
Don wrote:
Stewart Gordon wrote:
snip
Surely, align isn't applicable to unions at all. IINM the members of
a union, by design, start at the same offset.
Not so, the alignment of each member should be respected.
But the offset of a union member is always zero. So
Robert Jacques wrote:
On Tue, 14 Apr 2009 06:04:01 -0400, Frits van Bommel
fvbom...@remwovexcapss.nl wrote:
Robert Jacques wrote:
it instead. (You'd have to create a fake ClassInfo for structs and
arrays.) Then the GC only has to track the start of each object (i.e.
the beginning of a block
Christopher Wright wrote:
Frits van Bommel wrote:
But the union's alignment needs to be sufficient for all members, so
it depends on the maximum alignment of all members.
Or the least common multiple, assuming that align accepts arguments that
are not powers of 2.
I have never seen
Leandro Lucarella wrote:
Christopher Wright, el 12 de abril a las 17:54 me escribiste:
Absolutely. When writing parallel code to do large scale data mining in D, the
lack of precision and multithreaded allocation are real killers. My interests
are, in order of importance:
1. Being able to
Sean Kelly wrote:
Leandro Lucarella wrote:
But right now gc_malloc() doesn't take any TypeInfo argument. I can't see
where I can get the TypeInfo in the first place =/
The call would have to be modified. Right now the best you can do is
pass BlkAttr.NO_SCAN. And storing a pointer per block
Andrei Alexandrescu wrote:
alias TypeTuple!(GENERIC_READ,
FILE_SHARE_READ, (SECURITY_ATTRIBUTES*).init, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN,
HANDLE.init)
defaults;
How is that a type-tuple? (As far as I can see, none
Vincent Richomme wrote:
Hi,
I am really sorry but I was following the newsgroups for a long time
then I stopped 4 months ago and now there a too many news to read.
So could someone tell me :
1) Have you merged the two libs tango and phobos, I mean does it use a
common base ?
Phobos for D2
Andrei Alexandrescu wrote:
Denis Koroskin wrote:
Well, actually I think that having an Appender object is an overkill.
I never use, although I wrote a few implementations. Instead, I found
the following method to be extemely handy, very fast and cover all my
cases:
void append(T)(T[] array,
dsimcha wrote:
== Quote from Jarrett Billingsley (jarrett.billings...@gmail.com)'s article
On Wed, Apr 8, 2009 at 3:39 PM, Walter Bright
newshou...@digitalmars.com wrote:
Paul D. Anderson wrote:
b) the features and functions that should be included.
I'd say NaNs and unordered comparisons. In
Jarrett Billingsley wrote:
On Wed, Apr 8, 2009 at 4:51 PM, Christopher Wright dhase...@gmail.com wrote:
No. This proposed syntax change is quite misleading. Contracts cannot access
the function's local variables, but it looks like they can. Contracts are
executed at particular times, but that
Andrei Alexandrescu wrote:
grauzone wrote:
Sorry for the uninformed question, but do these types with with std.math?
If you meant to ask whether they work with std.math, yes, but only in
the sense that they are convertible from and to the built-in floating
point types. I've been coquetting
Unknown W. Brackets wrote:
In the case of arrays, test == null and test
is null should be the same operation.
They're not the same operation. (Though there was quite a large debate on these
newsgroups a while back because a lot of people thought they *should* be, as you
said)
The
Jérôme M. Berger wrote:
Now, how would you make money on free, as in libre, software? How would
you make a free, single-player RPG and still stay in business? All you
can under GPL is take payment for distribution, as long as nobody else
starts to distribute it for free. This means giving
Yigal Chripun wrote:
it's not a platform issue but more of a linker issue. after all, mingw uses elf
on windows, right?
Actually, I'm pretty sure it uses a COFF variant. (Unless this has
changed recently?)
dsimcha wrote:
import std.stdio;
uint bar = 0;
void main() {
start:
immutable uint foo = bar;
bar++;
writeln(foo);
goto start;
}
foo changes in this case. Is this a real bug, or is it considered undefined
behavior to use goto in this way?
I disagree: foo doesn't change
BCS wrote:
Hello dsimcha,
I sometimes run into false pointer issues when using very large data
structures in D. Often, these data structures are owned by a single
class instance and do not escape. In these cases, is it safe to do
something like:
If you can be shure ~this will get called,
I'm pretty much in agreement with Andrei and BCS here, so I'll just
comment on this bit:
hasen wrote:
When the coder marks a function as pure, the compiler must check that
it actually is pure.
I think the compiler can do this, in a way similar to how it can detect
which functions can have
grauzone wrote:
Walter Bright wrote:
Burton Radons wrote:
That's what we said about strings in 1.0. You modify it, you copy it,
or you tell the user. The gentleman's agreement worked perfectly and
that came without a mess of keywords, without implicit or explicit
restrictions on behaviour,
Georg Wrede wrote:
Denis Koroskin wrote:
On Fri, 06 Mar 2009 08:51:57 +0300, Walter Bright
newshou...@digitalmars.com wrote:
[snip]
The ones I listen to are the ones who *are* using D and have some
sweat equity in it.
http://www.micropoll.com/akira/mpresult/539369-138652
Bipolar folks
Nick Sabalausky wrote:
Georg Wrede georg.wr...@iki.fi wrote in message
news:gosa0h$md...@digitalmars.com...
And now the inevitable $1M question: when can we get D on it
As soon as we get a fully-working C-backend for one of the D compilers ;)
LLVM has a C backend, so as soon as LDC is
Daniel Keep wrote:
bearophile wrote:
There are some improvements in the last LLVM V.2.5, among them now LLVM
provides intrinsics for (some) arithmetic with overflow operations:
http://llvm.org/docs/LangRef.html#int_overflow
Introducing such feature into D (LDC and more) is even simpler now
Don wrote:
there's no simple solution. (gripe They could at least recognize that
outside the US, everyone uses A4-size paper, not that bizarro
letter/legal stuff /gripe).
Amen!
It is usual that the user needs to write, say, in Swedish or in
Russian, while in a Finnish setting. Or that one
Walter Bright wrote:
Frits van Bommel wrote:
Walter Bright wrote:
The problem if it detects it in an implementation-defined manner is
the source code is no longer portable.
... If the result of compilation provably won't *run* anyway, what's
the problem with a compile-time error?
Nothing
Sean Kelly wrote:
Daniel Keep wrote:
extern(C) void __identifier(blah$UNIX2003)(int);
That would be awesome.
A beneficial side-effect is that I can finally get rid of all those
mixins that are just doing this:
mixin(`void `~name_of_fn~`(int a)
{
// ... rest of function ...
}`);
I had
Andrei Alexandrescu wrote:
Frits van Bommel wrote:
Andrei Alexandrescu wrote:
Spot on. My ambitions are actually a tad higher. I want to
implement containers as by-value structs defining value semantics
and the needed primitives. Then, using introspection, I want to
define a template Class
Michel Fortin wrote:
http://michelf.com/weblog/2009/some-ideas-for-dynamic-vtables-in-d/
===
In the current vtable system, each D object begins with a monitor
pointer, followed by a pointer to the vtable, followed by the object’s
members.
===
Isn't it { vtable, monitor, members } ?
TSalm wrote:
Hello,
In the code below, why the first Stdout throws a Exception when the
second doesn't ?
/* CODE */
import tango.io.Stdout;
struct VoidPtr(T)
{
void* vPtr;
void value(T val)
{
vPtr = val;
Here you're storing a pointer to a non-ref
Mike Parker wrote:
Heinz wrote:
torhu Wrote:
On 10.02.2009 19:51, Heinz wrote:
Heinz Wrote:
I attached a rar file with the sources just to see what i'm talking
about. The example is from the DMD site. Included is the extern D
(ok) and the extern C (fails). To compile open compile.bat and
westcity wrote:
My code is as following:
struct Point {
float x, y, z ;
};
int main ()
{
Point[3] pts = [
{1.0, 0.0, 0.0} ,
{0.0, 1.0, 0.0} ,
{0.0, 0.0, 1.0}
];
return 0 ;
}
But, the compiler report Error: array
bearophile wrote:
westcity Wrote:
But, the compiler report Error: array initializers as expressions are not
allowed.
Then, how do I initialize an array of struct ?
Move the definition out of main (note that ; after the struct isn't required):
struct Point {
float x, y, z;
}
Point[3]
grauzone wrote:
Some severe disadvantages of version():
1. They can't contain expressions (like version(linux mac)).
Unless Apple has plans to s/BSD/Linux/ in MacOS that I'm not aware of,
version(linux || mac) would probably be more useful...
Allowing boolean expressions (using only
Qian Xu wrote:
Hi All,
I want to test, if two objects are equal.
The rules are as follows:
1. When both are null, it should return true.
2. When one of them is null, it should return false.
3. When both not null, then compare their values (as two strings)
((a is b) || (a a == b))
Note
Daniel Keep wrote:
One option is the turn everything into an expression route. This is
what Nemerle (think a functional superset of C#) did, and it's just
BEAUTIFULLY expressive.
X x = if( someCondition ) new SomeX(); else new SomeOtherX();
Failing that, there's always this (note: didn't do
Andrei Alexandrescu wrote:
dsimcha wrote:
Is std.string by any chance going to see any ripple effects from
ranges? I
want to write some patches to make it work with CTFE, which would be
useful
for some compile time mixin generation, but I don't want to waste time
working
on a module that
Walter Bright wrote:
Weed wrote:
Daniel Keep пишет:
Weed wrote:
[snip]
If I had to take a guess, I'd say that it's six times slower because
you're performing 100 million allocations. You aren't benchmarking
class/struct overhead, you're benchmarking the overhead of doing 100
million
Walter Bright wrote:
Weed wrote:
Daniel Keep пишет:
Weed wrote:
[snip]
If I had to take a guess, I'd say that it's six times slower because
you're performing 100 million allocations. You aren't benchmarking
class/struct overhead, you're benchmarking the overhead of doing 100
million
Chad J wrote:
Frits van Bommel wrote:
Lionello Lunesu wrote:
Frits van Bommel fvbom...@remwovexcapss.nl wrote in message
news:gmeqbr$137...@digitalmars.com...
LDC on the other hand needs to emit LLVM asm, which requires it to
specify an explicit return value. My approach is a way to extract
Walter Bright wrote:
Frits van Bommel wrote:
Luckily, inline asm is treated as a function literal in LLVM, and it
can return one or more values to the caller if the constraints string
specifies which registers will contain them. So if LDC just specifies
(e.g.) EAX/EDX:EAX/ST(0) to contain
Lionello Lunesu wrote:
Frits van Bommel fvbom...@remwovexcapss.nl wrote in message
news:gmeqbr$137...@digitalmars.com...
LDC on the other hand needs to emit LLVM asm, which requires it to
specify an explicit return value. My approach is a way to extract that
return value from the inline asm
Tomas Lindquist Olsen wrote:
The approach Fritz mentions should still allow inlining. Having a fake
Why do people keep performing s/s/z/ on my name? :(
Walter Bright wrote:
Frits van Bommel wrote:
Is it really that hard? Can't you just detect this case (non-void
function without a 'return' at the end but with inline asm inside)?
Since the compiler should know the calling convention[1], the register
that will contain the return value
Michel Fortin wrote:
On 2009-01-31 19:26:08 -0500, Andrei Alexandrescu
seewebsiteforem...@erdani.org said:
So I think in the future it's a good bet for both programmers and
editors to consider q{} quotes as containing code.
Hum, but since it's a string, shouldn't text editors highlight it
Saaa wrote:
How do you generate the compile-time view?
Since Descent has a Java port of the DMD frontend inside, it probably
just runs the semantics passes on the AST and prints it back out...
Walter Bright wrote:
Frits van Bommel wrote:
Some testing shows that all DMD-frontend based compilers (i.e. DMD,
GDC and LDC) seem to produce that error message for any version
identifier starting with D_ (Including D_ itself).
The point of that is to ensure that the D_ name space
bearophile wrote:
Walter Bright:
Frits van Bommel:
[1]: Hey, x86 technically has 6-byte pointers if you count segments as
part of the pointer (which would be mostly useless on currently popular
operating systems though).
It does, but I know of no compiler that supports that (C, C++, or any
1 - 100 of 117 matches
Mail list logo