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'. | 9 // ALL CAPS. The compiled code passes the first argument in 'this'. |
10 | 10 |
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
687 return i; | 687 return i; |
688 } | 688 } |
689 | 689 |
690 | 690 |
691 // NOTE: Setting the prototype for Array must take place as early as | 691 // NOTE: Setting the prototype for Array must take place as early as |
692 // possible due to code generation for array literals. When | 692 // possible due to code generation for array literals. When |
693 // generating code for a array literal a boilerplate array is created | 693 // generating code for a array literal a boilerplate array is created |
694 // that is cloned when running the code. It is essential that the | 694 // that is cloned when running the code. It is essential that the |
695 // boilerplate gets the right prototype. | 695 // boilerplate gets the right prototype. |
696 %FunctionSetPrototype($Array, new $Array(0)); | 696 %FunctionSetPrototype($Array, new $Array(0)); |
697 | |
698 | |
Michael Starzinger
2015/03/17 17:28:55
nit: Can we put in a separator comment here like t
Sven Panne
2015/03/18 08:45:55
Done.
| |
699 function StringLengthStub(name) { | |
Michael Starzinger
2015/03/17 17:28:55
nit: Also maybe make this one function all-upperca
Sven Panne
2015/03/18 08:45:55
Done.
| |
700 var receiver = this; // implicit first parameter | |
701 return %_StringLength(%_JSValueValue(receiver)); | |
702 } | |
OLD | NEW |