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

Side by Side Diff: src/builtins/builtins-regexp-gen.cc

Issue 2769143002: [regexp] Rename result.group to result.groups (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | src/heap-symbols.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 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 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 #include "src/builtins/builtins-regexp-gen.h" 5 #include "src/builtins/builtins-regexp-gen.h"
6 6
7 #include "src/builtins/builtins-constructor-gen.h" 7 #include "src/builtins/builtins-constructor-gen.h"
8 #include "src/builtins/builtins-utils-gen.h" 8 #include "src/builtins/builtins-utils-gen.h"
9 #include "src/builtins/builtins.h" 9 #include "src/builtins/builtins.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 Node* const map = LoadContextElement( 158 Node* const map = LoadContextElement(
159 native_context, Context::SLOW_OBJECT_WITH_NULL_PROTOTYPE_MAP); 159 native_context, Context::SLOW_OBJECT_WITH_NULL_PROTOTYPE_MAP);
160 Node* const properties = 160 Node* const properties =
161 AllocateNameDictionary(NameDictionary::kInitialCapacity); 161 AllocateNameDictionary(NameDictionary::kInitialCapacity);
162 162
163 Node* const group_object = AllocateJSObjectFromMap(map, properties); 163 Node* const group_object = AllocateJSObjectFromMap(map, properties);
164 164
165 // Store it on the result as a 'group' property. 165 // Store it on the result as a 'group' property.
166 166
167 { 167 {
168 Node* const name = HeapConstant(isolate()->factory()->group_string()); 168 Node* const name = HeapConstant(isolate()->factory()->groups_string());
169 CallRuntime(Runtime::kCreateDataProperty, context, result, name, 169 CallRuntime(Runtime::kCreateDataProperty, context, result, name,
170 group_object); 170 group_object);
171 } 171 }
172 172
173 // One or more named captures exist, add a property for each one. 173 // One or more named captures exist, add a property for each one.
174 174
175 CSA_ASSERT(this, HasInstanceType(names, FIXED_ARRAY_TYPE)); 175 CSA_ASSERT(this, HasInstanceType(names, FIXED_ARRAY_TYPE));
176 Node* const names_length = LoadAndUntagFixedArrayBaseLength(names); 176 Node* const names_length = LoadAndUntagFixedArrayBaseLength(names);
177 CSA_ASSERT(this, IntPtrGreaterThan(names_length, IntPtrConstant(0))); 177 CSA_ASSERT(this, IntPtrGreaterThan(names_length, IntPtrConstant(0)));
178 178
(...skipping 2502 matching lines...) Expand 10 before | Expand all | Expand 10 after
2681 Bind(&if_matched); 2681 Bind(&if_matched);
2682 { 2682 {
2683 Node* result = 2683 Node* result =
2684 ConstructNewResultFromMatchInfo(context, regexp, match_indices, string); 2684 ConstructNewResultFromMatchInfo(context, regexp, match_indices, string);
2685 Return(result); 2685 Return(result);
2686 } 2686 }
2687 } 2687 }
2688 2688
2689 } // namespace internal 2689 } // namespace internal
2690 } // namespace v8 2690 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/heap-symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698