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

Side by Side Diff: src/builtins/builtins-string.cc

Issue 2808023002: [regexp] Ensure there are no shape changes on the fast path (Closed)
Patch Set: Rebase and backmerge second part Created 3 years, 8 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/builtins/builtins-regexp.cc ('k') | src/regexp/regexp-utils.cc » ('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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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.h" 5 #include "src/builtins/builtins-regexp.h"
6 #include "src/builtins/builtins-utils.h" 6 #include "src/builtins/builtins-utils.h"
7 #include "src/builtins/builtins.h" 7 #include "src/builtins/builtins.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stub-assembler.h" 9 #include "src/code-stub-assembler.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 Branch(WordEqual(proto_map, initial_proto_initial_map), &out, &next); 1217 Branch(WordEqual(proto_map, initial_proto_initial_map), &out, &next);
1218 1218
1219 Bind(&next); 1219 Bind(&next);
1220 } 1220 }
1221 1221
1222 // Take the fast path for RegExps. 1222 // Take the fast path for RegExps.
1223 { 1223 {
1224 Label stub_call(this), slow_lookup(this); 1224 Label stub_call(this), slow_lookup(this);
1225 1225
1226 RegExpBuiltinsAssembler regexp_asm(state()); 1226 RegExpBuiltinsAssembler regexp_asm(state());
1227 regexp_asm.BranchIfFastRegExp(context, object_map, &stub_call, 1227 regexp_asm.BranchIfFastRegExp(context, object, object_map, &stub_call,
1228 &slow_lookup); 1228 &slow_lookup);
1229 1229
1230 Bind(&stub_call); 1230 Bind(&stub_call);
1231 Return(regexp_call()); 1231 Return(regexp_call());
1232 1232
1233 Bind(&slow_lookup); 1233 Bind(&slow_lookup);
1234 } 1234 }
1235 1235
1236 GotoIf(IsNullOrUndefined(object), &out); 1236 GotoIf(IsNullOrUndefined(object), &out);
1237 1237
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
2170 2170
2171 BUILTIN(StringPrototypeToUpperCase) { 2171 BUILTIN(StringPrototypeToUpperCase) {
2172 HandleScope scope(isolate); 2172 HandleScope scope(isolate);
2173 TO_THIS_STRING(string, "String.prototype.toUpperCase"); 2173 TO_THIS_STRING(string, "String.prototype.toUpperCase");
2174 return ConvertCase(string, isolate, 2174 return ConvertCase(string, isolate,
2175 isolate->runtime_state()->to_upper_mapping()); 2175 isolate->runtime_state()->to_upper_mapping());
2176 } 2176 }
2177 2177
2178 } // namespace internal 2178 } // namespace internal
2179 } // namespace v8 2179 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins-regexp.cc ('k') | src/regexp/regexp-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698