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

Side by Side Diff: src/runtime.js

Issue 894683003: Introduce LanguageMode, drop StrictMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased (w/ conflicts) Created 5 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
« no previous file with comments | « src/preparser.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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } 305 }
306 306
307 307
308 308
309 /* ----------------------------- 309 /* -----------------------------
310 - - - H e l p e r s - - - 310 - - - H e l p e r s - - -
311 ----------------------------- 311 -----------------------------
312 */ 312 */
313 313
314 // ECMA-262, section 11.4.1, page 46. 314 // ECMA-262, section 11.4.1, page 46.
315 function DELETE(key, strict) { 315 function DELETE(key, language_mode) {
316 return %DeleteProperty(%ToObject(this), %ToName(key), strict); 316 return %DeleteProperty(%ToObject(this), %ToName(key), language_mode);
317 } 317 }
318 318
319 319
320 // ECMA-262, section 11.8.7, page 54. 320 // ECMA-262, section 11.8.7, page 54.
321 function IN(x) { 321 function IN(x) {
322 if (!IS_SPEC_OBJECT(x)) { 322 if (!IS_SPEC_OBJECT(x)) {
323 throw %MakeTypeError('invalid_in_operator_use', [this, x]); 323 throw %MakeTypeError('invalid_in_operator_use', [this, x]);
324 } 324 }
325 if (%_IsNonNegativeSmi(this)) { 325 if (%_IsNonNegativeSmi(this)) {
326 if (IS_ARRAY(x) && %_HasFastPackedElements(x)) { 326 if (IS_ARRAY(x) && %_HasFastPackedElements(x)) {
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 return i; 687 return i;
688 } 688 }
689 689
690 690
691 // NOTE: Setting the prototype for Array must take place as early as 691 // NOTE: Setting the prototype for Array must take place as early as
692 // possible due to code generation for array literals. When 692 // possible due to code generation for array literals. When
693 // generating code for a array literal a boilerplate array is created 693 // generating code for a array literal a boilerplate array is created
694 // that is cloned when running the code. It is essential that the 694 // that is cloned when running the code. It is essential that the
695 // boilerplate gets the right prototype. 695 // boilerplate gets the right prototype.
696 %FunctionSetPrototype($Array, new $Array(0)); 696 %FunctionSetPrototype($Array, new $Array(0));
OLDNEW
« no previous file with comments | « src/preparser.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698