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

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

Issue 1374723002: Introduce LiteralsArray to hide it's implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix build break. Created 5 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/runtime/runtime-literals.cc ('k') | src/x64/lithium-codegen-x64.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 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 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 Handle<Object> result; 978 Handle<Object> result;
979 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 979 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
980 isolate, result, RegExpImpl::Compile(regexp, source, flags)); 980 isolate, result, RegExpImpl::Compile(regexp, source, flags));
981 return *result; 981 return *result;
982 } 982 }
983 983
984 984
985 RUNTIME_FUNCTION(Runtime_MaterializeRegExpLiteral) { 985 RUNTIME_FUNCTION(Runtime_MaterializeRegExpLiteral) {
986 HandleScope scope(isolate); 986 HandleScope scope(isolate);
987 DCHECK(args.length() == 4); 987 DCHECK(args.length() == 4);
988 CONVERT_ARG_HANDLE_CHECKED(FixedArray, literals, 0); 988 CONVERT_ARG_HANDLE_CHECKED(LiteralsArray, literals, 0);
989 CONVERT_SMI_ARG_CHECKED(index, 1); 989 CONVERT_SMI_ARG_CHECKED(index, 1);
990 CONVERT_ARG_HANDLE_CHECKED(String, pattern, 2); 990 CONVERT_ARG_HANDLE_CHECKED(String, pattern, 2);
991 CONVERT_ARG_HANDLE_CHECKED(String, flags, 3); 991 CONVERT_ARG_HANDLE_CHECKED(String, flags, 3);
992 992
993 Handle<JSFunction> constructor = isolate->regexp_function(); 993 Handle<JSFunction> constructor = isolate->regexp_function();
994 // Compute the regular expression literal. 994 // Compute the regular expression literal.
995 Handle<Object> regexp; 995 Handle<Object> regexp;
996 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 996 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
997 isolate, regexp, 997 isolate, regexp,
998 RegExpImpl::CreateRegExpLiteral(constructor, pattern, flags)); 998 RegExpImpl::CreateRegExpLiteral(constructor, pattern, flags));
999 literals->set(index, *regexp); 999 literals->set_literal(index, *regexp);
1000 return *regexp; 1000 return *regexp;
1001 } 1001 }
1002 1002
1003 1003
1004 // Only called from Runtime_RegExpExecMultiple so it doesn't need to maintain 1004 // Only called from Runtime_RegExpExecMultiple so it doesn't need to maintain
1005 // separate last match info. See comment on that function. 1005 // separate last match info. See comment on that function.
1006 template <bool has_capture> 1006 template <bool has_capture>
1007 static Object* SearchRegExpMultiple(Isolate* isolate, Handle<String> subject, 1007 static Object* SearchRegExpMultiple(Isolate* isolate, Handle<String> subject,
1008 Handle<JSRegExp> regexp, 1008 Handle<JSRegExp> regexp,
1009 Handle<JSArray> last_match_array, 1009 Handle<JSArray> last_match_array,
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 1179
1180 1180
1181 RUNTIME_FUNCTION(Runtime_IsRegExp) { 1181 RUNTIME_FUNCTION(Runtime_IsRegExp) {
1182 SealHandleScope shs(isolate); 1182 SealHandleScope shs(isolate);
1183 DCHECK(args.length() == 1); 1183 DCHECK(args.length() == 1);
1184 CONVERT_ARG_CHECKED(Object, obj, 0); 1184 CONVERT_ARG_CHECKED(Object, obj, 0);
1185 return isolate->heap()->ToBoolean(obj->IsJSRegExp()); 1185 return isolate->heap()->ToBoolean(obj->IsJSRegExp());
1186 } 1186 }
1187 } // namespace internal 1187 } // namespace internal
1188 } // namespace v8 1188 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-literals.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698