OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |