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

Side by Side Diff: src/runtime/runtime-regexp.cc

Issue 2384473002: [regexp] Port RegExpConstructResultStub to TurboFan (Closed)
Patch Set: Adapt to new constant accessor style Created 4 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
« no previous file with comments | « src/code-stubs.h ('k') | no next file » | 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 #include "src/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/conversions-inl.h" 8 #include "src/conversions-inl.h"
9 #include "src/isolate-inl.h" 9 #include "src/isolate-inl.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 } 787 }
788 788
789 789
790 RUNTIME_FUNCTION(Runtime_RegExpSource) { 790 RUNTIME_FUNCTION(Runtime_RegExpSource) {
791 SealHandleScope shs(isolate); 791 SealHandleScope shs(isolate);
792 DCHECK(args.length() == 1); 792 DCHECK(args.length() == 1);
793 CONVERT_ARG_CHECKED(JSRegExp, regexp, 0); 793 CONVERT_ARG_CHECKED(JSRegExp, regexp, 0);
794 return regexp->source(); 794 return regexp->source();
795 } 795 }
796 796
797 797 // TODO(jgruber): Remove this once all uses in regexp.js have been removed.
798 RUNTIME_FUNCTION(Runtime_RegExpConstructResult) { 798 RUNTIME_FUNCTION(Runtime_RegExpConstructResult) {
799 HandleScope handle_scope(isolate); 799 HandleScope handle_scope(isolate);
800 DCHECK(args.length() == 3); 800 DCHECK(args.length() == 3);
801 CONVERT_SMI_ARG_CHECKED(size, 0); 801 CONVERT_SMI_ARG_CHECKED(size, 0);
802 CHECK(size >= 0 && size <= FixedArray::kMaxLength); 802 CHECK(size >= 0 && size <= FixedArray::kMaxLength);
803 CONVERT_ARG_HANDLE_CHECKED(Object, index, 1); 803 CONVERT_ARG_HANDLE_CHECKED(Object, index, 1);
804 CONVERT_ARG_HANDLE_CHECKED(Object, input, 2); 804 CONVERT_ARG_HANDLE_CHECKED(Object, input, 2);
805 Handle<FixedArray> elements = isolate->factory()->NewFixedArray(size); 805 Handle<FixedArray> elements = isolate->factory()->NewFixedArray(size);
806 Handle<Map> regexp_map(isolate->native_context()->regexp_result_map()); 806 Handle<Map> regexp_map(isolate->native_context()->regexp_result_map());
807 Handle<JSObject> object = 807 Handle<JSObject> object =
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 1013
1014 1014
1015 RUNTIME_FUNCTION(Runtime_IsRegExp) { 1015 RUNTIME_FUNCTION(Runtime_IsRegExp) {
1016 SealHandleScope shs(isolate); 1016 SealHandleScope shs(isolate);
1017 DCHECK(args.length() == 1); 1017 DCHECK(args.length() == 1);
1018 CONVERT_ARG_CHECKED(Object, obj, 0); 1018 CONVERT_ARG_CHECKED(Object, obj, 0);
1019 return isolate->heap()->ToBoolean(obj->IsJSRegExp()); 1019 return isolate->heap()->ToBoolean(obj->IsJSRegExp());
1020 } 1020 }
1021 } // namespace internal 1021 } // namespace internal
1022 } // namespace v8 1022 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698