| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This files contains runtime support implemented in JavaScript. | 5 // This files contains runtime support implemented in JavaScript. |
| 6 | 6 |
| 7 // CAUTION: Some of the functions specified in this file are called | 7 // CAUTION: Some of the functions specified in this file are called |
| 8 // directly from compiled code. These are the functions with names in | 8 // directly from compiled code. These are the functions with names in |
| 9 // ALL CAPS. The compiled code passes the first argument in 'this' and | 9 // ALL CAPS. The compiled code passes the first argument in 'this'. |
| 10 // it does not push the function onto the stack. This means that you | |
| 11 // cannot use contexts in all these functions. | |
| 12 | 10 |
| 13 | 11 |
| 14 /* ----------------------------------- | 12 /* ----------------------------------- |
| 15 - - - C o m p a r i s o n - - - | 13 - - - C o m p a r i s o n - - - |
| 16 ----------------------------------- | 14 ----------------------------------- |
| 17 */ | 15 */ |
| 18 | 16 |
| 19 // The following declarations are shared with other native JS files. | 17 // The following declarations are shared with other native JS files. |
| 20 // They are all declared at this one spot to avoid redeclaration errors. | 18 // They are all declared at this one spot to avoid redeclaration errors. |
| 21 var $Object = global.Object; | 19 var $Object = global.Object; |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 return i; | 654 return i; |
| 657 } | 655 } |
| 658 | 656 |
| 659 | 657 |
| 660 // NOTE: Setting the prototype for Array must take place as early as | 658 // NOTE: Setting the prototype for Array must take place as early as |
| 661 // possible due to code generation for array literals. When | 659 // possible due to code generation for array literals. When |
| 662 // generating code for a array literal a boilerplate array is created | 660 // generating code for a array literal a boilerplate array is created |
| 663 // that is cloned when running the code. It is essential that the | 661 // that is cloned when running the code. It is essential that the |
| 664 // boilerplate gets the right prototype. | 662 // boilerplate gets the right prototype. |
| 665 %FunctionSetPrototype($Array, new $Array(0)); | 663 %FunctionSetPrototype($Array, new $Array(0)); |
| OLD | NEW |