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

Side by Side Diff: src/v8natives.js

Issue 7839028: Avoid size increase of snapshot. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 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 | test/mjsunit/builtins.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 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 %SetProperty(prototype, fields[i], void 0, DONT_ENUM | DONT_DELETE); 90 %SetProperty(prototype, fields[i], void 0, DONT_ENUM | DONT_DELETE);
91 } 91 }
92 } 92 }
93 for (var i = 0; i < methods.length; i += 2) { 93 for (var i = 0; i < methods.length; i += 2) {
94 var key = methods[i]; 94 var key = methods[i];
95 var f = methods[i + 1]; 95 var f = methods[i + 1];
96 %SetProperty(prototype, key, f, DONT_ENUM | DONT_DELETE | READ_ONLY); 96 %SetProperty(prototype, key, f, DONT_ENUM | DONT_DELETE | READ_ONLY);
97 %SetNativeFlag(f); 97 %SetNativeFlag(f);
98 } 98 }
99 prototype.__proto__ = null; 99 prototype.__proto__ = null;
100 %PreventExtensions(prototype);
101 %ToFastProperties(prototype); 100 %ToFastProperties(prototype);
102
103 var desc = GetOwnProperty(constructor, "prototype");
104 desc.setWritable(false);
105 desc.setConfigurable(false);
106 DefineOwnProperty(constructor, "prototype", desc, false);
107 } 101 }
108 102
109 103
110 // ---------------------------------------------------------------------------- 104 // ----------------------------------------------------------------------------
111 105
112 106
113 // ECMA 262 - 15.1.4 107 // ECMA 262 - 15.1.4
114 function GlobalIsNaN(number) { 108 function GlobalIsNaN(number) {
115 if (!IS_NUMBER(number)) number = NonNumberToNumber(number); 109 if (!IS_NUMBER(number)) number = NonNumberToNumber(number);
116 return NUMBER_IS_NAN(number); 110 return NUMBER_IS_NAN(number);
(...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 1534
1541 function SetUpFunction() { 1535 function SetUpFunction() {
1542 %CheckIsBootstrapping(); 1536 %CheckIsBootstrapping();
1543 InstallFunctions($Function.prototype, DONT_ENUM, $Array( 1537 InstallFunctions($Function.prototype, DONT_ENUM, $Array(
1544 "bind", FunctionBind, 1538 "bind", FunctionBind,
1545 "toString", FunctionToString 1539 "toString", FunctionToString
1546 )); 1540 ));
1547 } 1541 }
1548 1542
1549 SetUpFunction(); 1543 SetUpFunction();
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/builtins.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698