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
d71e43e712
Remove a pointless argument to generate_file in GlobalGen.py.
2014-03-11 13:24:10 +01:00
Ms2ger
6c3f67d719
Remove some C++-related code in BindingGen.py.
2014-03-11 13:16:00 +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
Ms2ger
84b0f45ed5
Use FooValue() functions.
2014-03-09 18:51:38 +01:00
Ms2ger
9fbfb1909c
Move JSVal into the jsval module.
2014-03-08 18:49:55 +01:00
Ms2ger
b18c5e518b
Split JSValConvertible into two traits.
...
Later, we'll want to implement variations of the conversion *from* JS, but
not the conversion *to* JS.
2014-03-08 11:13:08 +01:00
bors-servo
2238d81b53
auto merge of #1838 : brunoabinader/servo/htmlcollection-live, r=jdm
2014-03-07 15:43:24 -05:00
Ms2ger
9003d212b0
Remove a pointless argIsPointer local variable.
2014-03-07 20:14:54 +01:00
bors-servo
3a31372217
auto merge of #1850 : Ms2ger/servo/init-interface, r=jdm
...
This allows Rust to check that we've actually initialized all cases.
2014-03-07 11:34:26 -05:00
bors-servo
810699c47d
auto merge of #1851 : Ms2ger/servo/optional-jsval, r=jdm
...
Right now, we silently default to null, which is somewhat fishy.
2014-03-07 11:07:29 -05:00
Bruno de Oliveira Abinader
38ba71ceb1
Replaced Document::createHTMLDocument in favor of HTMLCollection helpers
2014-03-07 11:10:56 -04:00
Bruno de Oliveira Abinader
d010861b75
Implemented {Document,Element}.getElementsByClassName
2014-03-07 11:10:56 -04:00
Bruno de Oliveira Abinader
e1499b610e
Implemented {Document,Element}.getElementsByTagNameNS
2014-03-07 11:10:56 -04:00
Bruno de Oliveira Abinader
d22dbb53ca
Implemented {Document,Element}.getElementsByTagName
2014-03-07 11:10:55 -04:00
bors-servo
bdb551638e
auto merge of #1848 : Ms2ger/servo/refactor-primitive-fromjsval, r=jdm
...
Probably best read commit-by-commit.
2014-03-07 10:01:36 -05:00
Ms2ger
971a4c58bb
Pass Option<JSVal> for optional JSVals.
2014-03-07 12:40:25 +01:00
Ms2ger
4fa12841e7
Don't initialize nullable interface arguments to None in codegen.
...
This allows Rust to check that we've actually initialized all cases.
2014-03-07 11:28:29 +01:00
bors-servo
4a47145e69
auto merge of #1787 : hgentry/servo/mozilla-servo, r=jdm
...
Fixes #1779 . Most of them were able to be replaced without issue.
2014-03-06 23:55:30 -05:00
hgentry
9b1213ed4d
Removed glob imports from CodegenRust.py
...
Removed glob imports from CodegenRust.py (code review changes)
Removed many glob imports from CodegenRust.py (code review changes)
Removed glob imports from CodegenRust.py (cleanup)
2014-03-06 20:32:47 -05:00
Ms2ger
3a0b7fe621
Common up some more code in the handling of default values for primitive types.
2014-03-06 23:07:42 +01:00
Ms2ger
9fba4bcfba
Simplify the code flow in the conversion to primitive types so that default values are handled together.
2014-03-06 22:56:10 +01:00
Ms2ger
922d191948
Common up some code in the conversion to nullable and non-nullable primitive types.
2014-03-06 22:52:57 +01:00
Ms2ger
54a59b9d38
Avoid a type error with a non-null default value for an optional nullable string argument.
2014-03-06 22:42:26 +01:00
Ms2ger
716e1ce144
Avoid a type error with a non-null default value for an optional nullable primitive argument.
2014-03-06 22:26:12 +01:00
Ms2ger
8b5778993a
Inline dataLoc in the one place that can see it and the one place that can't.
2014-03-06 22:20:47 +01:00
Ms2ger
57be68ca8b
Stop sticking a Page in the JSContext's private.
2014-03-05 21:04:57 +01:00
Ms2ger
14f679d455
Remove some dead code from CGCreateInterfaceObjectsMethod.
2014-03-05 20:01:58 +01:00
bors-servo
cfbcb5c62b
auto merge of #1821 : Ms2ger/servo/result-JSValConvertible, r=jdm
2014-03-05 12:19:33 -05:00
bors-servo
5eb7d1cf30
auto merge of #1814 : Ms2ger/servo/more-primitive-setters, r=jdm
2014-03-05 09:55:35 -05:00
bors-servo
da6a571f9e
auto merge of #1811 : Ms2ger/servo/Wrap_, r=jdm
2014-03-05 09:31:44 -05:00
Ms2ger
81a9b54bf8
Return Result from JSValConvertible::from_jsval.
2014-03-04 22:44:55 +01:00
bors-servo
d9cf8cc4cc
auto merge of #1812 : Ms2ger/servo/ResolveProperty, r=metajack
2014-03-04 14:49:40 -05:00
Ms2ger
1608f842e9
Rewrite the codegen for nullable primitives to use JSValConvertible.
2014-03-04 18:55:58 +01:00
bors-servo
a6410e86b3
auto merge of #1810 : Ms2ger/servo/test-binding, r=jdm
2014-03-04 12:05:57 -05:00
Ms2ger
d063601ba0
Implement support for returning nullable primitive types.
2014-03-04 17:30:19 +01:00