6 files changed +66
-11
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright 2016 Traceur Authors.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ export { tailCall as default } from './properTailCalls.js' ;
Original file line number Diff line number Diff line change
1
+ // Copyright 2016 Traceur Authors.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ export { construct as default } from './properTailCalls.js' ;
Original file line number Diff line number Diff line change
1
+ // Copyright 2016 Traceur Authors.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ export { createContinuation as default } from './properTailCalls.js' ;
Original file line number Diff line number Diff line change
1
+ // Copyright 2016 Traceur Authors.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ export { initTailRecursiveFunction as default } from './properTailCalls.js' ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ var CONTINUATION_TYPE = Object.create(null);
20
20
21
21
var isTailRecursiveName = null ;
22
22
23
- function createContinuation ( operand , thisArg , argsArray ) {
23
+ export function createContinuation ( operand , thisArg , argsArray ) {
24
24
return [ CONTINUATION_TYPE , operand , thisArg , argsArray ] ;
25
25
}
26
26
@@ -47,7 +47,7 @@ function isTailRecursive(func) {
47
47
return ! ! getPrivate ( func , isTailRecursiveName ) ;
48
48
}
49
49
50
- function tailCall ( func , thisArg , argArray ) {
50
+ export function tailCall ( func , thisArg , argArray ) {
51
51
var continuation = argArray [ 0 ] ;
52
52
if ( isContinuation ( continuation ) ) {
53
53
continuation = $apply ( func , thisArg , continuation [ 3 ] ) ;
@@ -113,6 +113,3 @@ export function initTailRecursiveFunction(func) {
113
113
setPrivate ( func , isTailRecursiveName , true ) ;
114
114
return func ;
115
115
}
116
-
117
- export { tailCall as call } ;
118
- export { createContinuation as continuation } ;
Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- import {
16
- initTailRecursiveFunction ,
17
- call ,
18
- continuation ,
19
- construct ,
20
- } from './modules/properTailCalls.js' ;
15
+ import initTailRecursiveFunction from './modules/initTailRecursiveFunction.js' ;
16
+ import call from './modules/call.js' ;
17
+ import continuation from './modules/continuation.js' ;
18
+ import construct from './modules/construct.js' ;
21
19
22
20
$traceurRuntime . initTailRecursiveFunction = initTailRecursiveFunction ;
23
21
$traceurRuntime . call = call ;
0 commit comments