From 0f5b36e9c5649fe4ff5c1c8d02c38451a75e976f Mon Sep 17 00:00:00 2001 From: Martin Carlberg Date: Wed, 9 Apr 2014 17:02:28 +0200 Subject: [PATCH] Fixed: Code generated in test cases is corrected for the fast msgSend function --- .../Preprocessor/OutputTests/Messages/colon-selector.js | 2 +- .../OutputTests/Messages/keyword-in-selector.js | 2 +- .../OutputTests/Messages/multiple-parameters.js | 2 +- .../Preprocessor/OutputTests/Messages/no-parameters.js | 2 +- .../Preprocessor/OutputTests/Messages/one-parameter.js | 2 +- .../OutputTests/Messages/ternary-operator-argument.js | 6 +++--- .../Preprocessor/OutputTests/Misc/parenthesis-return.js | 5 +++-- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Tests/Objective-J/Preprocessor/OutputTests/Messages/colon-selector.js b/Tests/Objective-J/Preprocessor/OutputTests/Messages/colon-selector.js index aff484c53..07ce0e2ee 100644 --- a/Tests/Objective-J/Preprocessor/OutputTests/Messages/colon-selector.js +++ b/Tests/Objective-J/Preprocessor/OutputTests/Messages/colon-selector.js @@ -1,2 +1,2 @@ -objj_msgSend(object, ":", argument); +((___r1=object),___r1==null?null:___r1.isa.objj_msgSend1(___r1,":",argument)); diff --git a/Tests/Objective-J/Preprocessor/OutputTests/Messages/keyword-in-selector.js b/Tests/Objective-J/Preprocessor/OutputTests/Messages/keyword-in-selector.js index bb6a71ee7..35a123ac4 100644 --- a/Tests/Objective-J/Preprocessor/OutputTests/Messages/keyword-in-selector.js +++ b/Tests/Objective-J/Preprocessor/OutputTests/Messages/keyword-in-selector.js @@ -1 +1 @@ -objj_msgSend(object,"for:in:nil:",a,b,nil); \ No newline at end of file +((___r1=object),___r1==null?null:___r1.isa.objj_msgSend3(___r1,"for:in:nil:",a,b,nil)); \ No newline at end of file diff --git a/Tests/Objective-J/Preprocessor/OutputTests/Messages/multiple-parameters.js b/Tests/Objective-J/Preprocessor/OutputTests/Messages/multiple-parameters.js index 1f88bb343..bd35709fe 100644 --- a/Tests/Objective-J/Preprocessor/OutputTests/Messages/multiple-parameters.js +++ b/Tests/Objective-J/Preprocessor/OutputTests/Messages/multiple-parameters.js @@ -1,2 +1,2 @@ -objj_msgSend(object, "label:label2:label3:label4:", argument, argument2, argument3, argument4); +((___r1=object),___r1==null?null:___r1.isa.objj_msgSend(___r1,"label:label2:label3:label4:",argument,argument2,argument3,argument4)); diff --git a/Tests/Objective-J/Preprocessor/OutputTests/Messages/no-parameters.js b/Tests/Objective-J/Preprocessor/OutputTests/Messages/no-parameters.js index e66a87e46..b96b0c15d 100644 --- a/Tests/Objective-J/Preprocessor/OutputTests/Messages/no-parameters.js +++ b/Tests/Objective-J/Preprocessor/OutputTests/Messages/no-parameters.js @@ -1,2 +1,2 @@ -objj_msgSend(object, "message"); +((___r1=object),___r1==null?null:___r1.isa.objj_msgSend0(___r1,"message")); diff --git a/Tests/Objective-J/Preprocessor/OutputTests/Messages/one-parameter.js b/Tests/Objective-J/Preprocessor/OutputTests/Messages/one-parameter.js index 99386a35c..a69f22f5e 100644 --- a/Tests/Objective-J/Preprocessor/OutputTests/Messages/one-parameter.js +++ b/Tests/Objective-J/Preprocessor/OutputTests/Messages/one-parameter.js @@ -1,2 +1,2 @@ -objj_msgSend(object, "label:", argument); +((___r1=object),___r1==null?null:___r1.isa.objj_msgSend1(___r1,"label:",argument)); diff --git a/Tests/Objective-J/Preprocessor/OutputTests/Messages/ternary-operator-argument.js b/Tests/Objective-J/Preprocessor/OutputTests/Messages/ternary-operator-argument.js index bdd50a691..f5d8ca3e7 100644 --- a/Tests/Objective-J/Preprocessor/OutputTests/Messages/ternary-operator-argument.js +++ b/Tests/Objective-J/Preprocessor/OutputTests/Messages/ternary-operator-argument.js @@ -1,4 +1,4 @@ -objj_msgSend(object, "label:", condition ? true : false); -objj_msgSend(object, "label:", condition ? true : false); -objj_msgSend(object, "label:", condition ? true : false); +((___r1=object),___r1==null?null:___r1.isa.objj_msgSend1(___r1,"label:",condition?true:false)); +((___r1=object),___r1==null?null:___r1.isa.objj_msgSend1(___r1,"label:",condition?true:false)); +((___r1=object),___r1==null?null:___r1.isa.objj_msgSend1(___r1,"label:",condition?true:false)); diff --git a/Tests/Objective-J/Preprocessor/OutputTests/Misc/parenthesis-return.js b/Tests/Objective-J/Preprocessor/OutputTests/Misc/parenthesis-return.js index 6664877bc..d09cbb0de 100644 --- a/Tests/Objective-J/Preprocessor/OutputTests/Misc/parenthesis-return.js +++ b/Tests/Objective-J/Preprocessor/OutputTests/Misc/parenthesis-return.js @@ -1,3 +1,4 @@ x=function(){ -return objj_msgSend(someIval,"someMethod"); -} \ No newline at end of file +return ((_1=someIval),_1==null?null:_1.isa.objj_msgSend0(_1,"someMethod")); +var _1; +}; \ No newline at end of file