Skip to content

Commit

Permalink
stub: add basic binary opereators js-js#10
Browse files Browse the repository at this point in the history
  • Loading branch information
a8m committed Dec 24, 2014
1 parent fc0ca6f commit b39a233
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/js/platform/base/stub.js
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ function binaryStubs() {
});
}, this);

var ops = [ '<', '<=' ];
var ops = [ '<', '<=', '>', '>=', '==', '!=' ];
ops.forEach(function(op) {
this.declareStub('binary/' + op, function() {/*
block BinaryLogic -> LeftSmi, LeftNonSmi
Expand All @@ -664,6 +664,14 @@ function binaryStubs() {
smiCompare %"<", left, right
#elif op === '<='
smiCompare %"<=", left, right
#elif op === '>'
smiCompare %"<", right, left
#elif op === '>='
smiCompare %"<=", right, left
#elif op === '=='
smiCompare %"==", right, left
#elif op === '!='
smiCompare %"!=", right, left
#endif
block True
Expand Down

0 comments on commit b39a233

Please sign in to comment.