Commit graph

215 commits

Author SHA1 Message Date
lpy
f6d912a94f Remove |unused| field from DOMClass.(fixes #1960) 2014-03-22 15:17:44 +08:00
bors-servo
54da52fa77 auto merge of #1950 : Ms2ger/servo/nullable-string-with-null-default, r=jdm 2014-03-21 06:49:34 -04:00
Ms2ger
6ee2e29e62 Make unwrap and unwrap_object less generic. 2014-03-20 23:26:22 +01:00
Ms2ger
a4fc6961a8 Remove support for non-castable arguments. 2014-03-20 23:17:46 +01:00
Ms2ger
acffed2dcd Fix code generation for a null default value for nullable string arguments. 2014-03-20 22:51:31 +01:00
Ms2ger
077243caa7 Stop returning None from getRetvalDeclarationForType and update documentation. 2014-03-20 21:14:28 +01:00
Ms2ger
322893009d Make the result and result_fallible variables immutable. 2014-03-20 21:06:55 +01:00
Ms2ger
eec2e10d9c Remove the declareResult argument to CGCallGenerator's constructor. 2014-03-20 20:34:52 +01:00
Ms2ger
ad086ba7da Use CGIfElseWrapper in a few more places. 2014-03-20 20:32:16 +01:00
Ms2ger
904e8eaf17 Remove the codeToSetNull argument to wrapObjectTemplate. 2014-03-20 20:27:30 +01:00
Ms2ger
022dfa0a5e Remove the preSuccess and postSuccess arguments to getJSToNativeConversionTemplate.
They were used for unions until 06f9afdad5.
2014-03-20 20:16:39 +01:00
Ms2ger
4ba093939a Remove unused import of std::intrinsics::uninit. 2014-03-20 20:16:38 +01:00
bors-servo
8317122068 auto merge of #1864 : saneyuki/servo/split_cast_to, r=jdm
fix #1836
2014-03-20 10:58:36 -04:00
Tetsuharu OHZEKI
0fccf5e386 Split TCast::to into TCast::to_unchecked and TCast::to. 2014-03-20 23:41:59 +09:00
bors-servo
2fb8c84bac auto merge of #1943 : lpy/servo/issue1933, r=jdm
see #1933
2014-03-20 10:19:30 -04:00
bors-servo
9e53b4d828 auto merge of #1945 : Ms2ger/servo/1196-isDefinitelyObject, r=jdm
... and fix nearby whitespace (fixes #1196).
2014-03-20 09:40:32 -04:00
Ms2ger
bdfd89508a Pass the isDefinitelyObject argument to wrapObjectTemplate and fix nearby whitespace (fixes #1196). 2014-03-20 11:53:01 +01:00
bors-servo
19a7c429a1 auto merge of #1944 : lpy/servo/issue1938, r=Ms2ger
see #1938
2014-03-20 06:34:32 -04:00
lpy
34b73837d3 Rename squirrel_away_unboxed to squirrel_away_unique.(fixes #1938) 2014-03-20 17:14:31 +08:00
lpy
1abdd9c526 Force infallible binding methods to return void.(fixes #1933) 2014-03-20 16:24:15 +08:00
bors-servo
ad826efd6d auto merge of #1909 : Ms2ger/servo/optional-defaults, r=jdm
...(fixes #1813).
2014-03-19 23:55:40 -04:00
bors-servo
7f188500a1 auto merge of #1915 : Ms2ger/servo/wrap-return-js, r=jdm
This lets us avoid the sketchy tricks in JS::new and Window::new, where we
kept an unsafe pointer to the native object across the Wrap call that
consumed the owned pointer.
2014-03-19 19:01:48 -04:00
bors-servo
26f9543e60 auto merge of #1910 : Ms2ger/servo/dead-arg-CGAbstractMethod, r=jdm 2014-03-19 18:37:51 -04:00
Ms2ger
59bcabb75e Pass Option<T> for optional primitive arguments without a default value (fixes #1813). 2014-03-19 19:05:59 +01:00
Lars Bergstrom
a6100563a6 Rust upgrade for new master rebase 2014-03-18 22:00:48 -05:00
Josh Matthews
64c0de9fe7 Warning police. 2014-03-18 09:31:22 -05:00
Josh Matthews
f279abbf9f Remove all traces of Box representation from bindings. Work around file read runtime problem. 2014-03-18 09:30:35 -05:00
Lars Bergstrom
bbac8aa5c3 Rust upgrades 2014-03-18 09:30:35 -05:00
Tetsuharu OHZEKI
620755b95f Expose named constants in bindings. 2014-03-16 13:50:33 +09:00
Tom Schuster
a8362e103a Implement named constants in bindings 2014-03-14 18:15:49 +01:00
Ms2ger
4ad3b6ccd1 Return a JS<T> from *Binding::Wrap rather than a JSObject.
This lets us avoid the sketchy tricks in JS::new and Window::new, where we
kept an unsafe pointer to the native object across the Wrap call that
consumed the owned pointer.
2014-03-14 13:06:51 +01:00
Ms2ger
b610ce0cd2 Remove a dead argument from CGAbstractMethod methods. 2014-03-13 23:07:39 +01:00
Ms2ger
c7e09c0570 Remove support for returning values through outparams. 2014-03-12 18:26:25 +01:00
Ms2ger
dd160b6392 Merge CGThing.declare and CGThing.define.
This distincion is carried over from the C++ codegen, but it has no meaning
in Rust.
2014-03-11 21:22:43 +01:00
Ms2ger
06f9afdad5 Completely rewrite the code to convert JSVals to unions.
This code works correctly for the two unions currently in use, and raises
exceptions in codegen for most other cases. I will implement those cases when
the need arises.
2014-03-11 19:44:07 +01:00
Ms2ger
256a5cbf9f Replace GetReflector by an implementation of ToJSValConvertible. 2014-03-11 17:23:48 +01:00
Ms2ger
b32c157904 Reorder GetProtoObject. 2014-03-11 13:04:22 +01:00
Ms2ger
d08ad3c243 Cleanup and simplify CGImports. 2014-03-11 12:56:04 +01:00
Ms2ger
c97408969e Cleanup the code in PrototypeList(). 2014-03-11 12:45:43 +01:00
Ms2ger
f7a847c581 Stop pointlessly indenting GetProtoObject. 2014-03-11 12:15:54 +01:00
Ms2ger
d1f5b0971d Remove some dead code from CGAbstractMethod._decorators. 2014-03-11 11:51:03 +01:00
Ms2ger
e54a17bfea Remove unused CGAbstractStaticMethod class. 2014-03-11 11:46:04 +01:00
bors-servo
92f295bc07 auto merge of #1877 : Ms2ger/servo/dead-codegen-code, r=jdm 2014-03-10 15:37:51 -04:00
Ms2ger
e0e0ba4c93 Remove code from codegen that is nowhere close to working. 2014-03-10 20:10:03 +01:00
Ms2ger
58382471d5 Replace jsval_to_str and jsval_to_domstring with a FromJSValConvertible implementation. 2014-03-10 16:31:13 +01:00
Ms2ger
17411db8ca Replace str_to_jsval and domstring_to_jsval by a ToJSValConvertible implementation. 2014-03-10 16:31:13 +01:00
Ms2ger
476699a114 Allow passing options to FromJSValConvertible::from_jsval. 2014-03-10 16:31:13 +01:00
Ms2ger
5f9e649491 Pass a JSContext to ToJSValConvertible::to_jsval. 2014-03-10 16:31:13 +01:00
bors-servo
52ab85c45d auto merge of #1861 : Ms2ger/servo/split-JSValConvertible, r=jdm
Later, we'll want to implement variations of the conversion *from* JS, but
not the conversion *to* JS.
2014-03-10 11:01:52 -04:00
Ms2ger
9709dce07a Use the JSVal member functions to replace JSVAL_IS_* and JSVAL_TO_*. 2014-03-09 18:52:05 +01:00