Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Eiffel > ISE 5.7: built-...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 833 of 913
Post > Topic >>

ISE 5.7: built-in copy routine fails for expanded type

by Ulrich Windl <Ulrich.Windl@[EMAIL PROTECTED] > Nov 22, 2006 at 12:11 PM

Hi,

I have filed issue 10912 (built-in copy routine fails for expanded types)
during beta release of ISE 5.7. I had no response for the issue, but the
problem is still there in ISE 5.7 (i386 Linux in my case):

Maybe I'm using the language wrong, but I can't see it. Here's my
description
and analysis of the problem:

---
feature "frozen twin" of classs DIGITS fails at "Result.copy(Current)":
value of Current not copied to Result.
Accordingly, "is_equal: Result.is_equal (Current)" fails.

Inside copy, the line "{ISE_RUNTIME}.c_standard_copy ($other, $Current)"
seems
to fail to copy `other' to `Current'.
Basically that's C code "ecopy".
The code is in studio/spec/linux-x86/lib/libwkbench.a (wcopy.o).
Maybe "eif_xcopy" should have been called instead for expanded objects...
---

The root class is this:
---snip
class
        EXP_TEST

create
        make

feature -- Initialization

        make is
                        -- Creation procedure.
                local
                        d : DIGITS
                do
                        d := 6
                end

end -- class EXP_TEST
---snip

Class DIGITS follows:
---snip
expanded class
	DIGITS
		inherit ANY

create
	default_create,
	make_from_integer

convert
	make_from_integer({INTEGER})

feature -- Creation

	make_from_integer(i : INTEGER) is
			-- convert from `i'
		require
			valid_digit: i >= 1 and i <= 9
		do
			set_digit(i)
		end -- make_from_integer

feature -- Access

	item : BIT 9

	has_digit(digit : INTEGER) : BOOLEAN is
			-- is bit `digit' set?
		require
			valid_digit: digit >= 1 and digit <= 9
		do
			Result := item.item(digit)
		end -- has_digit

	set_digit(digit : INTEGER) is
			-- set `item' to `value'
		require
			valid_digit: digit >= 1 and digit <= 9
		do
			item.put(true, digit)
		ensure
			digit_set: has_digit(digit)
		end -- set_item

end -- class DIGITS
---snip

Project definitions:
----snip
<?xml version="1.0" encoding="ISO-8859-1"?><system
xmlns="http://www.eiffel.com/developers/xml/configuration-1-0-0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-0-0
http://www.eiffel.com/developers/xml/configuration-1-0-0.xsd"
name="exptest" uuid="0DD832E6-42FE-4607-B7C5-A07D9183E7DE">
        <target name="exptest">
                <root class="EXP_TEST" feature="make"/>
                <option warning="true">
                        <assertions precondition="true"
postcondition="true" check="true" invariant="true" loop="true"/>
                </option>
                <library name="base"
location="$ISE_LIBRARY\library\base\base.ecf"/>
                <cluster name="root_cluster"
location="\home\windl\Projects\Eiffel\ISE57\exptest\"/>
        </target>
</system>

----snip
As I need that feature in a larger project, some help wopuld be
appreciated!

Regards,
Ulrich
P.S. The bug report has the same or similar code attached as ZIP file.




 5 Posts in Topic:
ISE 5.7: built-in copy routine fails for expanded type
Ulrich Windl <Ulrich.W  2006-11-22 12:11:04 
Re: ISE 5.7: built-in copy routine fails for expanded type
Ulrich Windl <Ulrich.W  2006-12-01 15:17:57 
Re: ISE 5.7: built-in copy routine fails for expanded type
Jim Cochrane <allergic  2006-12-01 17:59:14 
Re: ISE 5.7: built-in copy routine fails for expanded type
Ulrich Windl <Ulrich.W  2006-12-11 14:40:46 
Re: ISE 5.7: built-in copy routine fails for expanded type
Jim Cochrane <allergic  2006-12-11 16:56:06 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 21:30:22 CDT 2008.