1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-19 19:55:30 +08:00
Commit Graph

409 Commits

Author SHA1 Message Date
Robert Krimen
36acf405fb Fix (intermittently) failing Date tests due to local timezone dependency 2013-04-16 17:59:59 -07:00
Robert Krimen
9beae809c9 Fix Math.atan() test 2013-04-15 10:26:30 -07:00
Robert Krimen
9184233705 Bundle terst dependency (github.com/robertkrimen/terst) 2013-04-15 10:20:34 -07:00
Robert Krimen
896c393235 Add Math.abs 2013-03-17 22:17:21 -07:00
Robert Krimen
8486fe2d1c Add escape/unescape 2013-03-17 22:06:08 -07:00
Robert Krimen
7b0eac16f9 Add Number.toPrecision 2013-03-07 08:42:48 -08:00
Robert Krimen
e5f0da1420 Add Number.toExponential 2013-03-07 08:34:12 -08:00
Robert Krimen
2e7e3e17fd Add Number.toFixed 2013-03-07 08:22:23 -08:00
Robert Krimen
260b2a48bf Fix (band-aid) Go/JavaScript cross-boundary error transformation 2013-03-06 12:07:26 -08:00
Robert Krimen
d0132833fb SyntaxError => ReferenceError 2013-03-06 11:58:39 -08:00
Robert Krimen
bada1b6b24 Fix passing the wrong value to calculateBinaryOperation
Was passing left instead of leftValue
2013-03-05 18:10:14 -08:00
Robert Krimen
283dffe841 Can delete an undefined reference 2013-03-05 17:49:15 -08:00
Robert Krimen
d1c4cf79ab Fix always passing in the global object as this for eval
Should be passing in the this of the parent execution context instead
2013-03-05 14:41:50 -08:00
Robert Krimen
f3da7237f2 Add Object.getPrototypeOf 2013-03-05 12:03:33 -08:00
Robert Krimen
299495ba0a Set callee property of Arguments object 2013-03-05 09:08:46 -08:00
Robert Krimen
fef122900f Add Function.bind 2013-03-01 13:08:10 -08:00
Robert Krimen
bef32b9223 Enumerate (consistently) in definition order 2013-02-28 14:41:48 -08:00
Robert Krimen
d68cd0afe2 Establish eval execution context with the global object 2013-02-27 21:42:30 -08:00
Robert Krimen
16a30ee951 Differentiate between direct and indirect eval 2013-02-27 21:23:21 -08:00
Robert Krimen
252e132594 Add Math.round 2013-02-27 15:50:52 -08:00
Robert Krimen
5baaa111e1 Add Math.sqrt 2013-02-27 15:33:00 -08:00
Robert Krimen
ea55b5b655 Add Math.tan 2013-02-27 15:11:48 -08:00
Robert Krimen
d24dc0eba3 Add Math.sin 2013-02-27 15:08:53 -08:00
Robert Krimen
fdcc597591 Add Math.log 2013-02-27 15:03:24 -08:00
Robert Krimen
fc55f7c7d9 Remove cruft from arguments 2013-02-25 13:34:37 -08:00
Robert Krimen
c5f05dd873 Rework _reference interface to correspond to ECMA more closely 2013-02-25 13:26:12 -08:00
Robert Krimen
5a7981beb6 Object, Function, String, TypeError, etc. are not enumerable 2013-02-24 16:21:47 -08:00
Robert Krimen
30dbca3307 NaN, Infinity, undefined, etc. are not be enumerable 2013-02-24 14:28:24 -08:00
Robert Krimen
03cd7ef8f7 Functions declared in a function should replace parameters 2013-02-24 14:28:16 -08:00
Robert Krimen
321cc0dca8 Add _argumentsStash, with better conforming arguments behavior:
1. Can not delete a function parameter
    2. Deleting the index of an arguments object simply
       removes the link to that function parameter
2013-02-24 14:28:07 -08:00
Robert Krimen
840fde7610 Switch function environment to be declarative...
...instead of object.
Also, make sure arguments passed through to function are not deletable.
2013-02-23 14:47:18 -08:00
Robert Krimen
38b9c8071f Mutable bindings should not be deletable by default 2013-02-23 14:24:19 -08:00
Robert Krimen
614b345e7a Add Math.cos 2013-02-23 13:57:39 -08:00
Robert Krimen
7cf2fbb996 Add Math.atan2 2013-02-22 20:25:52 -08:00
Robert Krimen
738d76671b Add Math.atan 2013-02-22 20:07:45 -08:00
Robert Krimen
0b44f24f33 Add Math.asin 2013-02-22 20:04:47 -08:00
Robert Krimen
db71564bb4 Add Math.acos 2013-02-22 20:01:43 -08:00
Robert Krimen
b364451afe Fix and tests for Math.pow 2013-02-22 19:57:48 -08:00
Robert Krimen
b53c800965 Shuffle builtinMath_* 2013-02-22 19:43:13 -08:00
Robert Krimen
4dc7948e1c Streamline Math.ceil 2013-02-22 19:39:40 -08:00
Robert Krimen
47659bc0b3 Streamline Math.floor 2013-02-22 19:38:04 -08:00
Robert Krimen
44f53fe29a Add Math.exp 2013-02-22 19:36:11 -08:00
Robert Krimen
ad625cdddd Strip leading 0s from exponent 2013-02-22 13:43:43 -08:00
Robert Krimen
393b9384a5 Fit number (exponent/decimal) formatting to ECMA-262 (slightly better) 2013-02-22 11:50:04 -08:00
Robert Krimen
ed8569f1ad Use math.Copysign for unary negation 2013-02-22 11:49:41 -08:00
Robert Krimen
a24b29ebfe Fix toString(-0) 2013-02-21 19:02:29 -08:00
Robert Krimen
3c9faa2810 Fix String.char*At to look at utf16 version 2013-02-21 14:25:04 -08:00
Robert Krimen
bf322e56ee Fix subtle range bug in String.substring (uint => int64)
Was looking for negative in the following calculation:

uint(0) - uint(3) => uint(0)
2013-02-20 16:24:01 -08:00
Robert Krimen
ec902a6452 Split builtin.go out to builtin_*.go 2013-02-20 15:58:45 -08:00
Robert Krimen
4e4e89c894 Fix bug in String.slice with a (go) slice bounds violation
Basically, check that start is less than length before trying
to take a slice.

Also, rename valueToArrayIndex to valueToRangeIndex to reflect
the fact that it does not always return a value that is valid
index (value could be length)
2013-02-20 15:58:43 -08:00