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

Side by Side Diff: src/string-iterator.js

Issue 664333003: Add remaining @@toStringTag symbols to builtins (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Make heap-snapshot-generator not explode Created 6 years, 2 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 | « src/runtime/runtime-function.cc ('k') | src/typedarray.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 'use strict'; 5 'use strict';
6 6
7 7
8 // This file relies on the fact that the following declaration has been made 8 // This file relies on the fact that the following declaration has been made
9 // in runtime.js: 9 // in runtime.js:
10 // var $String = global.String; 10 // var $String = global.String;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 %FunctionSetPrototype(StringIterator, new $Object()); 81 %FunctionSetPrototype(StringIterator, new $Object());
82 %FunctionSetInstanceClassName(StringIterator, 'String Iterator'); 82 %FunctionSetInstanceClassName(StringIterator, 'String Iterator');
83 83
84 InstallFunctions(StringIterator.prototype, DONT_ENUM, $Array( 84 InstallFunctions(StringIterator.prototype, DONT_ENUM, $Array(
85 'next', StringIteratorNext 85 'next', StringIteratorNext
86 )); 86 ));
87 %FunctionSetName(StringIteratorIterator, '[Symbol.iterator]'); 87 %FunctionSetName(StringIteratorIterator, '[Symbol.iterator]');
88 %AddNamedProperty(StringIterator.prototype, symbolIterator, 88 %AddNamedProperty(StringIterator.prototype, symbolIterator,
89 StringIteratorIterator, DONT_ENUM); 89 StringIteratorIterator, DONT_ENUM);
90 %AddNamedProperty(StringIterator.prototype, symbolToStringTag,
91 "String Iterator", READ_ONLY | DONT_ENUM);
90 } 92 }
91 SetUpStringIterator(); 93 SetUpStringIterator();
92 94
93 95
94 // 21.1.3.27 String.prototype [ @@iterator ]( ) 96 // 21.1.3.27 String.prototype [ @@iterator ]( )
95 function StringPrototypeIterator() { 97 function StringPrototypeIterator() {
96 return CreateStringIterator(this); 98 return CreateStringIterator(this);
97 } 99 }
98 100
99 101
100 function ExtendStringPrototypeWithIterator() { 102 function ExtendStringPrototypeWithIterator() {
101 %CheckIsBootstrapping(); 103 %CheckIsBootstrapping();
102 104
103 %FunctionSetName(StringPrototypeIterator, '[Symbol.iterator]'); 105 %FunctionSetName(StringPrototypeIterator, '[Symbol.iterator]');
104 %AddNamedProperty($String.prototype, symbolIterator, 106 %AddNamedProperty($String.prototype, symbolIterator,
105 StringPrototypeIterator, DONT_ENUM); 107 StringPrototypeIterator, DONT_ENUM);
106 } 108 }
107 ExtendStringPrototypeWithIterator(); 109 ExtendStringPrototypeWithIterator();
OLDNEW
« no previous file with comments | « src/runtime/runtime-function.cc ('k') | src/typedarray.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698