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

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

Issue 2797993002: [regexp] Ensure there are no shape changes on the fast path (Closed)
Patch Set: Add test 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-gen.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 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 #include "src/builtins/builtins-utils-gen.h" 6 #include "src/builtins/builtins-utils-gen.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/objects.h" 10 #include "src/objects.h"
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 Branch(WordEqual(proto_map, initial_proto_initial_map), &out, &next); 962 Branch(WordEqual(proto_map, initial_proto_initial_map), &out, &next);
963 963
964 Bind(&next); 964 Bind(&next);
965 } 965 }
966 966
967 // Take the fast path for RegExps. 967 // Take the fast path for RegExps.
968 { 968 {
969 Label stub_call(this), slow_lookup(this); 969 Label stub_call(this), slow_lookup(this);
970 970
971 RegExpBuiltinsAssembler regexp_asm(state()); 971 RegExpBuiltinsAssembler regexp_asm(state());
972 regexp_asm.BranchIfFastRegExp(context, object_map, &stub_call, 972 regexp_asm.BranchIfFastRegExp(context, object, object_map, &stub_call,
973 &slow_lookup); 973 &slow_lookup);
974 974
975 Bind(&stub_call); 975 Bind(&stub_call);
976 Return(regexp_call()); 976 Return(regexp_call());
977 977
978 Bind(&slow_lookup); 978 Bind(&slow_lookup);
979 } 979 }
980 980
981 GotoIf(IsNullOrUndefined(object), &out); 981 GotoIf(IsNullOrUndefined(object), &out);
982 982
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1653 CallRuntime(Runtime::kThrowIncompatibleMethodReceiver, context, 1653 CallRuntime(Runtime::kThrowIncompatibleMethodReceiver, context,
1654 HeapConstant(factory()->NewStringFromAsciiChecked( 1654 HeapConstant(factory()->NewStringFromAsciiChecked(
1655 "String Iterator.prototype.next", TENURED)), 1655 "String Iterator.prototype.next", TENURED)),
1656 iterator); 1656 iterator);
1657 Unreachable(); 1657 Unreachable();
1658 } 1658 }
1659 } 1659 }
1660 1660
1661 } // namespace internal 1661 } // namespace internal
1662 } // namespace v8 1662 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins-regexp-gen.cc ('k') | src/regexp/regexp-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698