Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: src/v8natives.js

Issue 9415010: Make built-ins strict mode conforming, and support a --use-strict flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Yang's comments. Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/uri.js ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 10 matching lines...) Expand all
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 // This file relies on the fact that the following declarations have been made 28 // This file relies on the fact that the following declarations have been made
29 // 29 //
30 // in runtime.js: 30 // in runtime.js:
31 // const $Object = global.Object; 31 // var $Object = global.Object;
32 // const $Boolean = global.Boolean; 32 // var $Boolean = global.Boolean;
33 // const $Number = global.Number; 33 // var $Number = global.Number;
34 // const $Function = global.Function; 34 // var $Function = global.Function;
35 // const $Array = global.Array; 35 // var $Array = global.Array;
36 // const $NaN = 0/0; 36 // var $NaN = 0/0;
37 // 37 //
38 // in math.js: 38 // in math.js:
39 // const $floor = MathFloor 39 // var $floor = MathFloor
40 40
41 const $isNaN = GlobalIsNaN; 41 var $isNaN = GlobalIsNaN;
42 const $isFinite = GlobalIsFinite; 42 var $isFinite = GlobalIsFinite;
43 43
44 // ---------------------------------------------------------------------------- 44 // ----------------------------------------------------------------------------
45 45
46 46
47 // Helper function used to install functions on objects. 47 // Helper function used to install functions on objects.
48 function InstallFunctions(object, attributes, functions) { 48 function InstallFunctions(object, attributes, functions) {
49 if (functions.length >= 8) { 49 if (functions.length >= 8) {
50 %OptimizeObjectForAddingMultipleProperties(object, functions.length >> 1); 50 %OptimizeObjectForAddingMultipleProperties(object, functions.length >> 1);
51 } 51 }
52 for (var i = 0; i < functions.length; i += 2) { 52 for (var i = 0; i < functions.length; i += 2) {
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 1646
1647 function SetUpFunction() { 1647 function SetUpFunction() {
1648 %CheckIsBootstrapping(); 1648 %CheckIsBootstrapping();
1649 InstallFunctions($Function.prototype, DONT_ENUM, $Array( 1649 InstallFunctions($Function.prototype, DONT_ENUM, $Array(
1650 "bind", FunctionBind, 1650 "bind", FunctionBind,
1651 "toString", FunctionToString 1651 "toString", FunctionToString
1652 )); 1652 ));
1653 } 1653 }
1654 1654
1655 SetUpFunction(); 1655 SetUpFunction();
OLDNEW
« no previous file with comments | « src/uri.js ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698