Ms2ger
aed95dfd94
Move the assignment outside the if when dealing with optional arguments.
2014-05-05 11:36:52 +02:00
Ms2ger
d14efebb5c
Move the assignment of 'None' in the no-argument-passed case into an else branch.
...
This is the only case where we assign into an argument local twice, so removing
it will allow us to make that binding immutable.
2014-05-05 11:36:52 +02:00
Ms2ger
cb2723c4ed
Remove getJSToNativeConversionTemplate's initialValue return value.
...
This commit does not change the generated code.
2014-05-05 11:36:49 +02:00
Ms2ger
455465f3c6
Move the handling of default values in getJSToNativeConversionTemplate into handleOptional.
...
This is a first step towards moving responsibility for default values into the
caller, which should improve their code (in particular for the dictionary
codegen.
This also introduces a Dictionary::empty function, whose implementation is a
hack. The implementation will be improved once its codegen has access to the
raw default values.
Besides dictionaries, this commit does not change the generated code.
2014-05-05 11:29:46 +02:00
Ms2ger
e53c768b9e
Use CGIfWrapper in instantiateJSToNativeConversionTemplate.
2014-05-05 11:21:13 +02:00
Ms2ger
2db1ce72f0
Remove references to unused substitution variables in getJSToNativeConversionTemplate.
2014-05-05 11:21:13 +02:00
Glenn Watson
71f3f5894e
Prevent unused result warning in codegen. Always expect success for now.
2014-05-05 11:04:05 +10:00
Ms2ger
0ff8610727
Reorder some comparisons to avoid allocating strings for them.
2014-05-04 10:17:06 +02:00
Ms2ger
25542e3f7e
Replace most ~"string"s with "string".to_owned().
2014-05-04 09:39:07 +02:00
Ms2ger
243814022e
Replace all ~"" with "".to_owned().
2014-05-03 22:17:45 +02:00
Josh Matthews
91278da9dd
Address review comments.
2014-05-03 14:18:31 -04:00
Josh Matthews
46a33b4b38
Fix up the virtual method unsoundness.
2014-05-03 14:18:31 -04:00
Josh Matthews
895e9ee37f
Make dictionaries contain Root<T> values instead of JS<T>, ensuring that they will not be collected while the dictionary is alive.
2014-05-03 14:18:31 -04:00
Josh Matthews
0f2d0b1dc3
Address review comments.
2014-05-03 14:18:31 -04:00
Josh Matthews
7b3e6d1f21
Remove all root collections.
2014-05-03 14:18:31 -04:00
Josh Matthews
aaf0a61194
Store per-ScriptTask RootCollection in TLS and use that in favour of per-frame collections.
2014-05-03 14:18:31 -04:00
Josh Matthews
a09a4bd297
Root Temporary values for the duration of their lifetime.
2014-05-03 14:18:31 -04:00
Josh Matthews
522d3f167b
s/Unrooted/Temporary/g
2014-05-03 14:18:31 -04:00
Josh Matthews
bbfed38168
Move stack roots into Root types instead of RootCollection, removing the aribtrary 10 roots per stack frame restriction.
2014-05-03 14:18:31 -04:00
Josh Matthews
109410900c
Move all methods on T to JSRef<T> or JS<T> as appropriate.
2014-05-03 14:18:30 -04:00
Josh Matthews
7daa97c7e5
Remove abstract_self.
2014-05-03 14:18:30 -04:00
Josh Matthews
76783b029e
Move WebIDL methods to traits implemented by JSRef types.
2014-05-03 14:18:30 -04:00
Josh Matthews
dfdda0098a
Remove JS::get/get_mut to enforce sound rooting practices.
2014-05-03 14:18:30 -04:00
Josh Matthews
d7b96db33c
Implement safe rooting strategy via Unrooted, Root, JSRef, and JS.
2014-05-03 14:18:30 -04:00
Josh Matthews
ffdc3f5b32
Turn on GC all the time. Fix rooting errors during parsing and storing timers. Fix borrow errors during tracing.
2014-05-03 14:18:30 -04:00
bors-servo
897c54351a
auto merge of #2301 : Manishearth/servo/xhr-bytestring, r=Ms2ger
...
I had used DOMString in place of ByteString while implementing the XHR webidl, now that we have ByteString, I'll switch to that.
Blocks #2282
2014-05-03 10:55:28 -04:00
Manish Goregaokar
a4c5df3494
Use ByteString in XHR
2014-05-03 19:39:11 +05:30
bors-servo
812d70942f
auto merge of #2295 : Ms2ger/servo/JSCLASS_DOM_GLOBAL, r=jdm
...
It seems unlikely that this will ever be hit, but potentially hard to
figure out if it ever is hit.
2014-05-03 05:37:15 -04:00
Ms2ger
599d76fa6e
Add JSCLASS_DOM_GLOBAL to DOM global classes, and assert it is used.
...
It seems unlikely that this will ever be hit, but potentially hard to
figure out if it ever is hit.
2014-05-03 10:37:46 +02:00
Manish Goregaokar
619da07a4f
Webidl and basic implementation of XHR object
2014-05-03 14:00:20 +05:30
Tetsuharu OHZEKI
31cf10c006
Node::GetParentElement should use and_then instead of filtered/map.
2014-05-02 13:22:50 +09:00
bors-servo
b36b779d24
auto merge of #2290 : saneyuki/servo/export, r=jdm
...
- Fix #2128
- Take over from #2220
I didn't change `InterfaceTypes.rs` to `type.rs` because `type` is very common name which might be troublesome.
2014-05-01 23:34:39 -04:00
Ms2ger
8c879c8bf8
Implement WebIDL codegen for ByteString.
2014-05-01 22:02:53 +02:00
Ms2ger
541d581c32
Change some isString() checks in the WebIDL codegen to isDOMString() checks.
2014-05-01 21:11:12 +02:00
Ms2ger
05150f82e1
Add missing ByteString support in the WebIDL parser.
2014-05-01 20:58:17 +02:00
Ms2ger
0df5d95eb3
Change some isString() checks in the WebIDL parser to isDOMString() checks.
2014-05-01 20:56:10 +02:00
Tetsuharu OHZEKI
78856c87a4
Remove the 'pub use self::BindingDeclarations::*;' export.
2014-05-01 18:49:16 +09:00
Gulshan Singh
b1f4e04ee2
Removed unnecessary return and moved crate import to script.rs
2014-04-30 14:38:11 -04:00
Gulshan Singh
af548696bb
Make TimeStamp in event.rs return the actual timestamp
2014-04-30 13:35:15 -04:00
Ms2ger
844d48e0af
Merge UnionConversions() into UnionTypes().
...
It's not very useful to have one but not the other, so it makes more sense
to deal with them together.
2014-04-29 21:33:27 +02:00
Ms2ger
c51879767e
Reuse getTypes in UnionConversions().
...
This should be equivalent, except that the removed code ignores return
values (which we currently don't support).
2014-04-29 21:18:56 +02:00
Ms2ger
19166b2f53
Remove C++-specific union codegen code.
2014-04-29 21:17:52 +02:00
Ms2ger
55ed05f2c7
Use Vec for the remaining ~[T]s in script.
2014-04-28 23:06:26 +02:00
Ms2ger
cc7d04702d
Use Vec in Node mutation methods.
2014-04-28 23:06:26 +02:00
Ms2ger
02bcf97fd0
Make get_content_boxes return Vec.
2014-04-28 23:06:26 +02:00
Ms2ger
558986c87e
Make chain in eventdispatcher.rs use Vec.
2014-04-28 23:06:26 +02:00
Ms2ger
39ad37d8b6
Make open_elements in htmlserializer.rs use Vec.
2014-04-28 23:06:26 +02:00
Ms2ger
3ecfb9197f
Remove unused support for passing extra arguments for timers.
2014-04-28 23:06:25 +02:00
Ms2ger
674fd893cb
Make simple NodeLists use Vec.
2014-04-28 23:06:25 +02:00
Ms2ger
a1ec0cec11
Make TreeIterator::nodes a Vec.
2014-04-28 23:06:25 +02:00