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

Side by Side Diff: src/v8natives.js

Issue 7018001: Micro-optimize passing of args to HasLocalProperty. (Closed)
Patch Set: Created 9 years, 7 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
« src/macros.py ('K') | « src/macros.py ('k') | no next file » | 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 227
228 228
229 // ECMA-262 - 15.2.4.4 229 // ECMA-262 - 15.2.4.4
230 function ObjectValueOf() { 230 function ObjectValueOf() {
231 return ToObject(this); 231 return ToObject(this);
232 } 232 }
233 233
234 234
235 // ECMA-262 - 15.2.4.5 235 // ECMA-262 - 15.2.4.5
236 function ObjectHasOwnProperty(V) { 236 function ObjectHasOwnProperty(V) {
237 return %HasLocalProperty(ToObject(this), ToString(V)); 237 return %HasLocalProperty(TO_OBJECT_INLINE(this), TO_STRING_INLINE(V));
238 } 238 }
239 239
240 240
241 // ECMA-262 - 15.2.4.6 241 // ECMA-262 - 15.2.4.6
242 function ObjectIsPrototypeOf(V) { 242 function ObjectIsPrototypeOf(V) {
243 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) { 243 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
244 throw MakeTypeError("called_on_null_or_undefined", 244 throw MakeTypeError("called_on_null_or_undefined",
245 ["Object.prototype.isPrototypeOf"]); 245 ["Object.prototype.isPrototypeOf"]);
246 } 246 }
247 if (!IS_SPEC_OBJECT(V)) return false; 247 if (!IS_SPEC_OBJECT(V)) return false;
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 // ---------------------------------------------------------------------------- 1312 // ----------------------------------------------------------------------------
1313 1313
1314 function SetupFunction() { 1314 function SetupFunction() {
1315 InstallFunctions($Function.prototype, DONT_ENUM, $Array( 1315 InstallFunctions($Function.prototype, DONT_ENUM, $Array(
1316 "bind", FunctionBind, 1316 "bind", FunctionBind,
1317 "toString", FunctionToString 1317 "toString", FunctionToString
1318 )); 1318 ));
1319 } 1319 }
1320 1320
1321 SetupFunction(); 1321 SetupFunction();
OLDNEW
« src/macros.py ('K') | « src/macros.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698