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
Robert Krimen
d1cea5ac62
Fix numberToStringRadix to return "NaN"
2013-02-20 15:55:12 -08:00
Robert Krimen
ae1fa3daef
Fix indexOf to use safer _toInteger
2013-02-19 17:14:34 -08:00
Robert Krimen
d6fe0918fe
Fix Number.toString to handle Infinity, NaN better
...
Still broken in other ways, but a little better
2013-02-19 14:11:57 -08:00
Robert Krimen
95d7d729ad
Add floatToString and streamline toString
...
floatToString does not properly implement ECMA-262 9.8.1 yet
2013-02-19 13:42:26 -08:00
Robert Krimen
e06ac35b32
Add _integer and _toInteger
...
A safer toInteger, which it will eventually replace
2013-02-18 17:43:18 -08:00
Robert Krimen
a8a7c323e8
Better testing for toUint16/32/Int32
2013-02-18 16:26:35 -08:00
Robert Krimen
bdaa00884d
toU16/U32/I32 => toUint16/Uint32/Int32
2013-02-18 15:58:48 -08:00
Robert Krimen
e4583ba25f
Add future keywords checking
2013-02-17 22:39:43 -08:00
Robert Krimen
d297d3c508
Add Number.toString
2013-02-05 11:36:07 -08:00
Robert Krimen
809a0a0ba6
Split tests out of one big massive file
2013-02-05 08:56:08 -08:00
Robert Krimen
de3f9d4592
Prevent slurp of underscore entirely if disabled
2013-02-04 22:10:52 -08:00
Robert Krimen
15aadd333c
Upgrade underscore to 1.4.4, including tests
2013-02-04 21:58:47 -08:00
Robert Krimen
aaa90bf65c
Fix HasInstace (instanceof) to return false
...
Should not TypeError panic on a non-Object
2013-02-04 15:21:00 -08:00
Robert Krimen
795cc4935d
Add remarks about ToValue & Otto.ToValue
2013-02-04 10:41:17 -08:00
Robert Krimen
a879744c20
Add Go <=> JavaScript type interaction
...
Via reflection for struct, map, and slice/array
Fix #10
2013-02-04 10:31:44 -08:00
Robert Krimen
96601bf274
Reorganize (type_*) code layout
2013-02-04 07:41:38 -08:00
Robert Krimen
e5ff4cef59
Add delete to type_array
2013-02-04 07:30:53 -08:00
Robert Krimen
38f6d71ff2
Remove remarks about UTF-16 incompatibility
2013-01-27 10:29:57 -08:00
Robert Krimen
3240efeb62
Convert string to utf16 for length, indexing, etc.
...
This change is internal to String objects
2013-01-25 14:57:55 -08:00
Robert Krimen
8044e8ae38
Adjust Makefile (test-synopsis)
2013-01-25 10:46:58 -08:00
Robert Krimen
4750432d5c
Recognize erroneous "\x..", "\u...." as errors
...
For example, "\x0G" is not valid
2013-01-25 10:33:19 -08:00
Robert Krimen
3696636fce
Move test262 & more into a separate distribution
2013-01-25 10:14:14 -08:00
Robert Krimen
20d2e8bba6
gofmt
...
Ugh.
2013-01-25 09:59:42 -08:00
Robert Krimen
a13a891d92
Minor .test262 adjustments
2013-01-24 23:56:48 -08:00