michael@0: // Copyright 2009 the Sputnik authors. All rights reserved. michael@0: // This code is governed by the BSD license found in the LICENSE file. michael@0: michael@0: /** michael@0: * Every function call enters a new execution context michael@0: * michael@0: * @path ch10/10.4/S10.4_A1.1_T1.js michael@0: * @description Sequence of function calls michael@0: */ michael@0: michael@0: var y; michael@0: michael@0: function f(){ michael@0: var x; michael@0: michael@0: if(x === undefined) { michael@0: x = 0; michael@0: } else { michael@0: x = 1; michael@0: } michael@0: michael@0: return x; michael@0: } michael@0: michael@0: y = f(); michael@0: y = f(); michael@0: michael@0: if(!(y === 0)){ michael@0: $ERROR("#1: Sequenced function calls shares execution context"); michael@0: } michael@0: