Commit Graph
759 Commits
Author SHA1 Message Date
Martin Carlberg e7b690205e Fixed: The property list test cases can now run on the Node engine.
The xml parser in the Node.js engine is more modern and can handle more cases. Our property list parser does not handle this. This fix makes the test cases for the property lists run on the Node.js engine.
2018-01-15 09:28:39 +01:00
Martin CarlbergandGitHub c4cbb631a9 Merge pull request #2561 from mrcarlberg/compile_with_sourcemap
Full support for source map when debugging
2017-12-11 10:52:05 +01:00
Martin Carlberg 76f2d15b1b Fixed: Added the option to only inline message send function without also compress the output javascript file.
This allows us to inline the message send function in DEBUG mode. This is great when stepping into a method in the debugger as the message send function is not a separate function. Also the stack traces in the debugger is much more compact as the message send function is not there.
2017-12-08 14:02:11 +01:00
Martin CarlbergandGitHub 436f736a8e Merge pull request #2543 from FrankReh/pullreq/cleanup/remove/property/sub_classes
Remove objj_class.sub_classes property
2017-09-22 13:03:54 +02:00
Martin Carlberg 1446e90dd9 Fixed: Use correct naming on function parameter. Also changed som comments to reflect the correct meaning of the parameter 2017-09-18 13:39:28 +02:00
Martin Carlberg 54716c03d1 Fixed: Missed new line when increment tokPos. Now we use the correct skip space function that will take care of things in correct manners. 2017-09-18 13:36:51 +02:00
Martin Carlberg 8cf79590c5 Fixed: When target was ’self’ in a message send expression the source map was showing the wrong variable. 2017-09-12 13:17:49 +02:00
Martin Carlberg 94a5995197 New: We now support source maps when compiling both from command line and in browsers.
To add source maps add the ”-S” flag to the Jake file when compiling from command line. In the browser you need to add the compiler option into your index.html file. It should look something like this:
OBJJ_COMPILER_FLAGS = [... , "SourceMap"];

All browsers has support for source maps but currently Chrome works best.
2017-09-11 12:49:59 +02:00
Martin Carlberg 033e8583db Fixed: A more robust prettify message function 2017-06-26 17:59:08 +02:00
Martin Carlberg d46b51fa9a Fixed: In Rhino a function must be declared before it is used even if it is in the same scope. 2017-06-26 17:58:13 +02:00
Martin Carlberg dd1dfdcfeb Fixed: Added a comment on tricky code line 2017-06-26 16:25:44 +02:00
Martin Carlberg c0233c803d Fixed: Removed old print statements for debugging 2017-06-26 16:24:51 +02:00
Martin Carlberg 1fa8c88f6b Fixed: Speed up of objj_msgSend function. Don’t need to use complex check if class is initialized. 2017-06-26 16:23:59 +02:00
Martin Carlberg 195b109a36 New: Added ’#include’ to the preprocessor, compiler and Cappuccino load system. Also a lot of bug fixes in the preprocessor 2017-06-26 16:19:56 +02:00
Martin Carlberg 994ac3fc8e Fixed: Support for more options to the objj tool 2017-06-26 16:04:01 +02:00
Martin Carlberg a8ec5cf5e9 New: Support to create source maps for the frameworks and applications 2017-06-26 16:03:20 +02:00
Martin Carlberg b4263aa3ec New: Make sure we can use String function ’startsWith’ and ’endsWith’ even if an older browser or Javascript engine is used. 2017-06-26 15:50:08 +02:00
Martin Carlberg 6456809a72 Fixed: Use semicolon on last line in #included files. The new preprocessor might think that the statement will continue on the next line.
Due to Javascript don’t need to have semicolon at end of statement there are times when the parser thinks the line continues on the next line.

For example we have a file.js:
var f = function(x)
{
	return x + x;
}

Now in another file we do:
#include file.js
(function(exports) {
a = 42;
})(exports.b)

There will be two different behaviors if the ’file.js’ has a semicolon at the end of the last line. This commit make sure we have the right behavior.
2017-06-26 15:45:02 +02:00
Martin Carlberg 024c0a3186 Fixed: Handle source maps if source-map.js is included from the index.html file.
To create source maps the compiler flag ”SourceMap” has to be added in the OBJJ_COMPILER_FLAGS array in the index.html file.
2017-06-22 11:05:16 +02:00
cacaodevandGitHub 9547b70743 Merge pull request #2542 from FrankReh/pullreq/cleanup/fix/unused/cachedSearchResults
Removed an unused variable: cachedSearchResults.
2017-05-30 19:29:14 +02:00
Frank Rehwinkel a0f6b815e8 Removed an unused variable: cachedSearchResults.
It is polluting the global namespace.

Seven years ago this line was added and even then the variable wasn't
being used but it was a local variable so would have been hard to spot
unless a linter should catch things like that.

Then some four years ago it was accidently converted to a global
variable because the line above it ended in a semicolon rather than
a comma.  'use strict' didn't exist at the time this file was created
and hasn't been added in general yet.
2017-05-04 16:03:11 -04:00
Frank Rehwinkel 6183f8d4e9 Fix aClass.protocol_list syntax
A long standing bug that never mattered because each class is
initialized with a protocol_list set to an empty array.  This
is not the case for the protocol objects but there the syntax
was correct already.
2017-05-04 15:58:47 -04:00
Frank Rehwinkel d98e247665 Remove objj_class.sub_classes property
From the first day this class was added to the repo, the sub_classes
property, which is initialized with an empty array, has gone unused.

Removing it.  A little less code.  A little subsequent processing
and memory used.
2017-05-04 15:57:14 -04:00
Martin Carlberg d0cd976246 Fixed: Get class method instead of instance method
When asking a protocol for a specific class method we asked each super protocol for an instance method.

Thanks Frank for finding this!
2017-04-11 12:30:16 +02:00
Martin Carlberg 9ad2995168 Fixed: Some Javascript minifiers will convert ”\u2028” to a string with the actual line separator inside. It is not valid Javascript to have the actual character inside a string literal.
Instead of fixing bugs in different minifiers it is easier to rewrite this small function. The same applies to \u2029
2016-04-07 10:32:47 +02:00
Martin Carlberg 51fc6518e1 Fixed: Removed some trailing white spaces 2016-04-07 10:32:46 +02:00
Martin Carlberg 530db4e904 Fixed: Merged in the same parser and compiler that is used in the objj-runtime that is running on node.
The life will be easier to have the same in both environments.
Warnings and errors now don’t use read only properties for line and column information. So the test cases in Toolstest.j now work in modern JS engines.
It is also easier to set options for the compiler.
2016-04-07 10:32:46 +02:00
Martin Carlberg e38d6c9f9e Fixed: //@ sourceURL=... is deprecated since many years ago.
We have not changed it for support of older browsers.
Chrome version 51 and above writes a warning about it
in the console so it is time now.
2016-03-07 13:44:29 +01:00
Martin Carlberg 16dea2ee09 Fixed: Allow build in directory with space in path 2016-02-03 17:26:24 +01:00
Alexandre Wilhelm 0508b70658 Refactored: refactoring of the file CFHTTPRequest.js 2015-12-02 11:32:04 -08:00
Alexandre Wilhelm 04f8545397 Merge pull request #2368 from Rosch/master
Fix startup on IE10
2015-12-02 11:25:59 -08:00
cacaodev 633f985360 CFHTTPRequest : removed unused variable. 2015-12-02 17:51:49 +01:00
Antoine Mercadal 3cf0d60f5d Merge pull request #2399 from mrcarlberg/default_include_method_types
Default include type signatures for all kind of builds
2015-11-23 13:38:14 -08:00
Martin Carlberg c2f95f7953 Fixed: Runtime method argument functions will now comply to how Objective-C runtime works. 2015-11-23 10:48:15 +01:00
Martin Carlberg 141d737ca5 Fixed: Removed old function instead of mark it deprecated 2015-11-20 14:54:11 +01:00
Martin Carlberg d0fd53a2ca Added: Function method_getNumberOfArguments 2015-11-20 14:53:46 +01:00
Martin Carlberg 3e0a6ea2cf Fixed: Return NULL when out of bounce 2015-11-20 14:52:53 +01:00
Martin Carlberg b132a66707 Fixed: Compiler option 'IncludeTypeSignatures' is default turn on for all type of builds. It can optionally be turned off. 2015-11-20 12:33:00 +01:00
Martin Carlberg e4560df62f Fixed: Use correct property in decorator 2015-11-10 11:31:04 +01:00
Martin Carlberg 920daf7fde Fixed: Marked function 'method_getTypes' as deprecated 2015-11-10 11:30:29 +01:00
Martin Carlberg ad1a15faaa New: Added runtime functions 'method_copyReturnType' and 'method_copyArgumentType'. 2015-11-10 11:29:52 +01:00
Martin Carlberg 9fc892f723 Fixed: Check if ’OBJJ_COMPILER_FLAGS’ exists in a correct way 2015-10-26 14:47:51 +01:00
Martin Carlberg 3844b88f7e Fixed: The browser can’t promise when a javascript block will execute so compiler flags can be set after the files are compiled. This implementation works all the time. 2015-10-09 16:06:53 +02:00
Martin Carlberg e45e31d223 Fixed: Introduce ’jake install-inline’ task to generate the cappuccino framework with objj_msgSend function inlined. Also introduced options in ’index-debug.html’ templates to allow inline of objj_msgSend function when compiling in browser. 2015-10-06 13:34:28 +02:00
Martin Carlberg 101261ca63 Fixed: Optionally inline objj_msgSend function. Generate faster code for Array and Dictionary Literals. 2015-10-06 13:30:09 +02:00
Martin Carlberg 4ba9a19b5c Fixed: Speed improvements in objj_msgSend and objj_msgSendSuper functions. More efficient implementation of objj_method. 2015-10-06 13:27:10 +02:00
Roland Schwingel dd4de9822f Adjustment for (a)sync request with timeout to work on IE and other browsers 2015-09-23 19:16:20 +02:00
Roland Schwingel 55181cec8c Set timeout in XHR requests AFTER they are opened to get them to work with IE 2015-09-17 14:45:35 +02:00
Alexandre Wilhelm bb9408b5d0 Merge branch 'master' into Localization 2015-08-27 15:16:12 -07:00
Roland Schwingel 1eb12d4fa0 Damned... corrected formatting 2015-08-20 14:57:28 +02:00