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

Side by Side Diff: src/harmony-typedarray.js

Issue 1126213002: Wrap runtime.js in a function. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 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
« no previous file with comments | « src/harmony-regexp.js ('k') | src/i18n.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 (function() { 5 (function() {
6 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 if (%IsSloppyModeFunction(mapfn)) receiver = UNDEFINED; 48 if (%IsSloppyModeFunction(mapfn)) receiver = UNDEFINED;
49 } else if (!IS_UNDEFINED(receiver)) { 49 } else if (!IS_UNDEFINED(receiver)) {
50 needs_wrapper = SHOULD_CREATE_WRAPPER(f, receiver); 50 needs_wrapper = SHOULD_CREATE_WRAPPER(f, receiver);
51 } 51 }
52 52
53 var stepping = DEBUG_IS_ACTIVE && %DebugCallbackSupportsStepping(f); 53 var stepping = DEBUG_IS_ACTIVE && %DebugCallbackSupportsStepping(f);
54 for (var i = 0; i < length; i++) { 54 for (var i = 0; i < length; i++) {
55 var element = this[i]; 55 var element = this[i];
56 // Prepare break slots for debugger step in. 56 // Prepare break slots for debugger step in.
57 if (stepping) %DebugPrepareStepInIfStepping(f); 57 if (stepping) %DebugPrepareStepInIfStepping(f);
58 var new_receiver = needs_wrapper ? ToObject(receiver) : receiver; 58 var new_receiver = needs_wrapper ? $toObject(receiver) : receiver;
59 %_CallFunction(new_receiver, TO_OBJECT_INLINE(element), i, this, f); 59 %_CallFunction(new_receiver, TO_OBJECT_INLINE(element), i, this, f);
60 } 60 }
61 } 61 }
62 62
63 // ES6 draft 08-24-14, section 22.2.2.2 63 // ES6 draft 08-24-14, section 22.2.2.2
64 function NAMEOf() { // length == 0 64 function NAMEOf() { // length == 0
65 var length = %_ArgumentsLength(); 65 var length = %_ArgumentsLength();
66 var array = new this(length); 66 var array = new this(length);
67 for (var i = 0; i < length; i++) { 67 for (var i = 0; i < length; i++) {
68 array[i] = %_Arguments(i); 68 array[i] = %_Arguments(i);
(...skipping 14 matching lines...) Expand all
83 83
84 // Set up non-enumerable functions on the prototype object. 84 // Set up non-enumerable functions on the prototype object.
85 $installFunctions(GlobalNAME.prototype, DONT_ENUM, [ 85 $installFunctions(GlobalNAME.prototype, DONT_ENUM, [
86 "forEach", NAMEForEach 86 "forEach", NAMEForEach
87 ]); 87 ]);
88 endmacro 88 endmacro
89 89
90 TYPED_ARRAYS(EXTEND_TYPED_ARRAY) 90 TYPED_ARRAYS(EXTEND_TYPED_ARRAY)
91 91
92 })(); 92 })();
OLDNEW
« no previous file with comments | « src/harmony-regexp.js ('k') | src/i18n.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698