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

Side by Side Diff: src/runtime.js

Issue 1224523002: Avoid converting key to string for deleting of elements (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime.h » ('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 // 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 } 502 }
503 503
504 504
505 /* ----------------------------- 505 /* -----------------------------
506 - - - H e l p e r s - - - 506 - - - H e l p e r s - - -
507 ----------------------------- 507 -----------------------------
508 */ 508 */
509 509
510 // ECMA-262, section 11.4.1, page 46. 510 // ECMA-262, section 11.4.1, page 46.
511 DELETE = function DELETE(key, language_mode) { 511 DELETE = function DELETE(key, language_mode) {
512 return %DeleteProperty(%$toObject(this), %$toName(key), language_mode); 512 return %DeleteProperty(%$toObject(this), key, language_mode);
513 } 513 }
514 514
515 515
516 // ECMA-262, section 11.8.7, page 54. 516 // ECMA-262, section 11.8.7, page 54.
517 IN = function IN(x) { 517 IN = function IN(x) {
518 if (!IS_SPEC_OBJECT(x)) { 518 if (!IS_SPEC_OBJECT(x)) {
519 throw %MakeTypeError(kInvalidInOperatorUse, this, x); 519 throw %MakeTypeError(kInvalidInOperatorUse, this, x);
520 } 520 }
521 if (%_IsNonNegativeSmi(this)) { 521 if (%_IsNonNegativeSmi(this)) {
522 if (IS_ARRAY(x) && %_HasFastPackedElements(x)) { 522 if (IS_ARRAY(x) && %_HasFastPackedElements(x)) {
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 $toLength = ToLength; 1041 $toLength = ToLength;
1042 $toName = ToName; 1042 $toName = ToName;
1043 $toNumber = ToNumber; 1043 $toNumber = ToNumber;
1044 $toObject = ToObject; 1044 $toObject = ToObject;
1045 $toPositiveInteger = ToPositiveInteger; 1045 $toPositiveInteger = ToPositiveInteger;
1046 $toPrimitive = ToPrimitive; 1046 $toPrimitive = ToPrimitive;
1047 $toString = ToString; 1047 $toString = ToString;
1048 $toUint32 = ToUint32; 1048 $toUint32 = ToUint32;
1049 1049
1050 }) 1050 })
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698