Commit Graph

88 Commits

Author SHA1 Message Date
antonm@google.com b919b0c4ae Remove semicolon.
R=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10860064

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11048 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 14:11:56 +00:00
antonm@google.com 689c8a2fc5 Split to dart conversion and argument expression logic.
R=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10827046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11043 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 13:53:12 +00:00
antonm@google.com f220c80640 Preparing Chrome roll.
TBR=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10860038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10940 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 11:05:47 +00:00
antonm@google.com fbca909095 Autogenerate typed array toDart methods.
TBR=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10829357

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10830 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 16:30:55 +00:00
antonm@google.com 8a68bcf033 Proper dispatch in the presence of optional arguments.
Formerly for the methods like foo([Optional] x, [Opional] y), the following
dispatcher was emitted:

foo([x = _null, y = _null]) {
  if (y === _null) {
    return _foo_1(x);  // WRONG!
  }
  if (x === _null) {
    return _foo_2();
  }
  return _foo_3(x, y);
}

Now correct code is emitted:

foo([x = _null, y = _null]) {
  if (y !== _null) {
    return _foo_1(x, y);
  }
  if (x !== _null) {
    return _foo_2(x);
  }
  return _foo_3();
}

TBR=podivilov@chromium.org
BUG=4487

Review URL: https://chromiumcodereview.appspot.com//10832300

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10661 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 18:14:57 +00:00
antonm@google.com 946ae9f792 Support typed arrays constructor templates.
TBR=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10834271

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10501 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 12:55:21 +00:00
antonm@google.com f697b7f0b3 Minor refactoring to streamline the logic.
TBR=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10830038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9959 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 19:20:57 +00:00
antonm@google.com c42f43099e Reapply the fix.
TBR=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10833036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9942 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 15:28:48 +00:00
antonm@google.com bc4831e99f Unify null treatment.
Always use WithNullCheck suffix instead of a special flag.

TBR=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10829037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9940 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 14:59:48 +00:00
antonm@google.com da56474cea Quick fix to make bbs green.
TBR=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10833035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9938 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 14:48:26 +00:00
antonm@google.com 537abe2e71 Unify processing of the cases when argument is declared optional in IDLs and is not optional in WebKit.
R=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10828031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9937 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 14:16:02 +00:00
antonm@google.com c8e6b41aa3 Minor rework of argument emission.
Inline the method and minor cosmetics.

TBR=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10834008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9894 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 17:14:20 +00:00
antonm@google.com dc479ea389 Automatically support fancy Console methods.
TBR=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10821010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9887 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 15:29:14 +00:00
antonm@google.com b2c06f655d Use nested emitter idiom.
TBR=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10824012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9886 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 14:08:30 +00:00
antonm@google.com 318574c80a Refactor invocation emission.
Now cpp_arguments are built inside a single method and invocation
is emitted in the main mega-method.

TBR=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10822009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9885 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 13:41:50 +00:00
antonm@google.com a8daaa9d6a Emit parameters directly, w/o auxilary emitter.
TBR=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10820011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9884 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 13:09:51 +00:00
antonm@google.com 43c4f2d2cd Minor refactoring.
TBR=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10824010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9883 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 12:56:46 +00:00
antonm@google.com 64cc3e0925 Refactor callback emission.
Move most of the logic into common part.

Review URL: https://chromiumcodereview.appspot.com//10818037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9882 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 12:43:07 +00:00
antonm@google.com a924800b14 WebKit recently has been changed to pass context as 1st argument.
Review URL: https://chromiumcodereview.appspot.com//10810055

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9803 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-23 09:25:07 +00:00
podivilov@google.com ba33c7f62a Support proper emission of V8Scope handles.
R=antonm@google.com

Review URL: https://chromiumcodereview.appspot.com//10807007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9732 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-18 10:35:47 +00:00
podivilov@google.com 6b19d0e60a Properly generate MutationCallback in dart:html.
* add support for custom callbacks (MutationCallback.handleEvent is custom)
* add MutationRecordArray to type registry, so MutationCallback.handleEvent
is not removed because of unknown parameter type

R=antonm@google.com,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10785035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9713 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-17 17:30:18 +00:00
antonm@google.com f1c0c9e09c Simplify head emission a bit.
R=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10779013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9666 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 15:46:42 +00:00
antonm@google.com 2a49674b9c Make runtime_check arg not optional.
Review URL: https://chromiumcodereview.appspot.com//10783019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9665 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 15:39:57 +00:00
podivilov@google.com 29f943e1af Extract interfaces and members renaming logic to a new HtmlRenamer class.
R=antonm@google.com,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10703194

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9660 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 13:02:27 +00:00
podivilov@google.com 23cf5e33c2 Stop passing HtmlSystemShared around and move html renaming to IDLTypeInfo.
R=antonm@google.com,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10698108

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9636 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 16:28:43 +00:00
podivilov@google.com f7cc41b276 Introduce TypeRegistry class.
This is needed to optionally associate additional state like html renames
map with IDLTypeInfo instances.

R=antonm@google.com,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10702202

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9634 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 16:16:17 +00:00
podivilov@google.com 80d8de3dda Replace 'NativeTraits' typedef with 'isNode', 'isActive', and 'isEventTarget' static boolean fields.
'isEventTarget' field is needed to implement proper GC semantics for non-node event target listeners.
'isNode'+'isActive' is a direct replacement of 'NativeTraits' typedef.

R=antonm@google.com

Review URL: https://chromiumcodereview.appspot.com//10741002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9501 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-10 10:51:46 +00:00
podivilov@google.com fb4ba0921a Cleanup attributes generation in dart:html.
R=antonm@google.com,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10704102

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9436 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-06 11:41:20 +00:00
podivilov@google.com f266bcbc9e Split backend.AddMembers call into series of backend.AddAtribute/backend.AddOperation calls.
R=antonm@google.com,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10697080

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9425 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-06 07:38:07 +00:00
podivilov@google.com a785e89775 Do not split attributes on getters and setters in databasebuilder.
So we don't have to combine them again in generator.

R=antonm@google.com,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10704100

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9414 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-05 09:00:42 +00:00
podivilov@google.com 441eb00329 Extract common FactoryProviders generation logic.
R=antonm@google.com,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10704096

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9402 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-04 12:08:57 +00:00
podivilov@google.com 1b590a6185 Unfork html events generation in dart2js and dartium.
R=antonm@google.com,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10698049

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9342 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 11:39:16 +00:00
antonm@google.com d28a8ee1d8 Support Chrome roll.
TBR=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10700078

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9340 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 11:12:07 +00:00
podivilov@google.com 793232d1eb Extract common logic for element factory constructors generation.
R=antonm@google.com,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10696035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9292 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 15:42:56 +00:00
podivilov@google.com 0adfc6082e Create implementation file emitter in HtmlDartInterfaceGenerator.
That way we can start emitting common parts in HtmlDartInterfaceGenerator.

R=antonm@google.com,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10696033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9290 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 15:41:17 +00:00
podivilov@google.com c3977d7b22 Get rid of DOMWrapperBase and DOMTypeBase.
These types are not needed anymore.

R=antonm@google.com

Review URL: https://chromiumcodereview.appspot.com//10659033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9242 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 10:21:25 +00:00
podivilov@google.com e9e1df043e Make HtmlFrogSystem and NativeImplementationSystem the backends for HtmlInterfacesSystem and remove HtmlDartiumSystem.
This will allow easy code reuse between all existing html systems.

R=antonm@google.com,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10704008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9240 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 10:01:50 +00:00
podivilov@google.com 20fe182f7a Make per-interface generators an implementation detail of a system.
DartGenerator shouldn't know about per-interface generators
as it stiffles further refactoring and makes code reuse harder.

R=antonm@google.com,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10700006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9239 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 09:37:12 +00:00
podivilov@google.com f5a2e9cec8 Build fix for r9154.
TBR=antonm@google.com

Review URL: https://chromiumcodereview.appspot.com//10692006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9155 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 10:11:50 +00:00
antonm@google.com 756f43f13c Sort includes to follow WebKit style.
R=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10657045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9127 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 19:16:34 +00:00
antonm@google.com 8957fb37e7 Support V8EnabledAtRuntime in constructors.
R=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10669031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9107 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 12:42:54 +00:00
antonm@google.com 918aab3705 Restore forgotten negation.
TBR=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10667019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9082 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 18:47:20 +00:00
antonm@google.com d40b9e584c Support proper propagation of enabled per context and at runtime attributes.
And support enabled per context in native generator.

R=podivilov@chromium.org

Review URL: https://chromiumcodereview.appspot.com//10636027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9072 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 17:58:03 +00:00
antonm@google.com 85a0c9635c Proper support for IDL arrays in generators.
R=podivilov@chromium.org,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10584031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8969 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 10:43:11 +00:00
sra@google.com 8931de0b9d Fix DataView constructor and byte accessors.
Custom constructor is not yet implemented for Dartium.

Try again with Dartium and FF tests suppressed.

Review URL: https://chromiumcodereview.appspot.com//10540175

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8707 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 04:01:40 +00:00
sra@google.com f13edb18ec Revert "Fix DataView constructor and byte accessors."
Review URL: https://chromiumcodereview.appspot.com//10548065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8706 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 03:24:23 +00:00
sra@google.com 790589d941 Fix DataView constructor and byte accessors.
Custom constructor is not yet implemented for Dartium.

Review URL: https://chromiumcodereview.appspot.com//10539170

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8705 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 03:10:07 +00:00
podivilov@google.com a93c755ea2 Use original WebKit IDL database for dart:html generation.
This will allow us to use the same database to generate both frog and native implementations.

R=antonm@google.com,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10542036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8458 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 18:03:10 +00:00
podivilov@google.com 0b807ba37b Move interface members traverse logic to BaseGenerator.
AddMembers(merged_interface) will be used by systemhtml to add
all the members from HTMLElement to Element.

R=antonm@google.com,sra@google.com

Review URL: https://chromiumcodereview.appspot.com//10532027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8438 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 13:47:01 +00:00
podivilov@google.com 3ace6e9de0 Fix dart to native dispatch.
R=antonm@google.com,sra@google.com
TEST=indexeddb_3_test

Review URL: https://chromiumcodereview.appspot.com//10543023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8341 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 15:12:18 +00:00