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

Side by Side Diff: src/array.js

Issue 6447: Update v8natives to use InstallFunctions to get the correct function... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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 | « no previous file | src/date-delay.js » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 if (!IS_UNDEFINED(current) || i in this) { 895 if (!IS_UNDEFINED(current) || i in this) {
896 if (current === element) return i; 896 if (current === element) return i;
897 } 897 }
898 } 898 }
899 return -1; 899 return -1;
900 } 900 }
901 901
902 902
903 // ------------------------------------------------------------------- 903 // -------------------------------------------------------------------
904 904
905 function InstallFunctions(prototype, attributes, functions) {
906 for (var i = 0; i < functions.length; i += 2) {
907 var key = functions[i];
908 var f = functions[i + 1];
909 %FunctionSetName(f, key);
910 %SetProperty(prototype, key, f, attributes);
911 }
912 }
913
914 905
915 function UpdateFunctionLengths(lengths) { 906 function UpdateFunctionLengths(lengths) {
916 for (var key in lengths) { 907 for (var key in lengths) {
917 %FunctionSetLength(this[key], lengths[key]); 908 %FunctionSetLength(this[key], lengths[key]);
918 } 909 }
919 } 910 }
920 911
921 912
922 // ------------------------------------------------------------------- 913 // -------------------------------------------------------------------
923 914
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 ArrayEvery: 1, 950 ArrayEvery: 1,
960 ArrayMap: 1, 951 ArrayMap: 1,
961 ArrayIndexOf: 1, 952 ArrayIndexOf: 1,
962 ArrayLastIndexOf: 1, 953 ArrayLastIndexOf: 1,
963 ArrayPush: 1 954 ArrayPush: 1
964 }); 955 });
965 } 956 }
966 957
967 958
968 SetupArray(); 959 SetupArray();
OLDNEW
« no previous file with comments | « no previous file | src/date-delay.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698