Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358329 - JS: Support overloaded system library functions
Summary: JS: Support overloaded system library functions
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 357992 358029
  Show dependency tree
 
Reported: 2011-09-20 22:55 EDT by Scott Greer CLA
Modified: 2017-02-23 14:16 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Greer CLA 2011-09-20 22:55:11 EDT
This is to essentially replicate RBD's handling of overloaded functions such as String.clip, for which there are two variants.    Rather than implement general-purpose support for function overloading, RBD's JS gen simply special cases these parts and these functions.  

There are a number of bugs emerging which require this support.
Comment 1 Scott Greer CLA 2011-09-20 22:57:58 EDT
See SystemFunctionInvocationGenerator.java for RBD's implementation....
Comment 2 Scott Greer CLA 2011-09-28 18:34:34 EDT
I have an implementation which I will commit now so that the system functions will work in JS gen, however, see this bug for the details of the eventual solution:  https://bugs.eclipse.org/bugs/show_bug.cgi?id=359315
Comment 3 Scott Greer CLA 2011-09-29 11:55:29 EDT
Fixed by implementing the following:
1.  Use existing function "aliasing" logic to handle the generation of declarations and invocations for overloaded functions
2.  Detect whether a function is overloaded by scanning a part for like-named functions.
3.  Compute a "mangled" alias for the function name that factors in the type and number of args.
Comment 4 Lisa Lasher CLA 2011-11-04 11:45:43 EDT
Closing this work item