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

Side by Side Diff: src/runtime.cc

Issue 11600: * Rename to Irregexp throughout.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/regexp2000/
Patch Set: Created 12 years 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 | Annotate | Revision Log
« no previous file with comments | « src/regexp-macro-assembler-re2k.cc ('k') | test/cctest/test-regexp.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 779
780 static Object* Runtime_RegExpExec(Arguments args) { 780 static Object* Runtime_RegExpExec(Arguments args) {
781 HandleScope scope; 781 HandleScope scope;
782 ASSERT(args.length() == 3); 782 ASSERT(args.length() == 3);
783 CONVERT_CHECKED(JSRegExp, raw_regexp, args[0]); 783 CONVERT_CHECKED(JSRegExp, raw_regexp, args[0]);
784 Handle<JSRegExp> regexp(raw_regexp); 784 Handle<JSRegExp> regexp(raw_regexp);
785 CONVERT_CHECKED(String, raw_subject, args[1]); 785 CONVERT_CHECKED(String, raw_subject, args[1]);
786 Handle<String> subject(raw_subject); 786 Handle<String> subject(raw_subject);
787 Handle<Object> index(args[2]); 787 Handle<Object> index(args[2]);
788 ASSERT(index->IsNumber()); 788 ASSERT(index->IsNumber());
789 return *RegExpImpl::Exec(regexp, subject, index); 789 Handle<Object> result = RegExpImpl::Exec(regexp, subject, index);
790 if (result.is_null()) return Failure::Exception();
791 return *result;
790 } 792 }
791 793
792 794
793 static Object* Runtime_RegExpExecGlobal(Arguments args) { 795 static Object* Runtime_RegExpExecGlobal(Arguments args) {
794 HandleScope scope; 796 HandleScope scope;
795 ASSERT(args.length() == 2); 797 ASSERT(args.length() == 2);
796 CONVERT_CHECKED(JSRegExp, raw_regexp, args[0]); 798 CONVERT_CHECKED(JSRegExp, raw_regexp, args[0]);
797 Handle<JSRegExp> regexp(raw_regexp); 799 Handle<JSRegExp> regexp(raw_regexp);
798 CONVERT_CHECKED(String, raw_subject, args[1]); 800 CONVERT_CHECKED(String, raw_subject, args[1]);
799 Handle<String> subject(raw_subject); 801 Handle<String> subject(raw_subject);
800 return *RegExpImpl::ExecGlobal(regexp, subject); 802 return *RegExpImpl::ExecGlobal(regexp, subject);
Christian Plesner Hansen 2008/11/24 14:52:03 What about this one?
801 } 803 }
802 804
803 805
804 static Object* Runtime_MaterializeRegExpLiteral(Arguments args) { 806 static Object* Runtime_MaterializeRegExpLiteral(Arguments args) {
805 HandleScope scope; 807 HandleScope scope;
806 ASSERT(args.length() == 4); 808 ASSERT(args.length() == 4);
807 CONVERT_ARG_CHECKED(FixedArray, literals, 0); 809 CONVERT_ARG_CHECKED(FixedArray, literals, 0);
808 int index = Smi::cast(args[1])->value(); 810 int index = Smi::cast(args[1])->value();
809 Handle<String> pattern = args.at<String>(2); 811 Handle<String> pattern = args.at<String>(2);
810 Handle<String> flags = args.at<String>(3); 812 Handle<String> flags = args.at<String>(3);
(...skipping 5061 matching lines...) Expand 10 before | Expand all | Expand 10 after
5872 } else { 5874 } else {
5873 // Handle last resort GC and make sure to allow future allocations 5875 // Handle last resort GC and make sure to allow future allocations
5874 // to grow the heap without causing GCs (if possible). 5876 // to grow the heap without causing GCs (if possible).
5875 Counters::gc_last_resort_from_js.Increment(); 5877 Counters::gc_last_resort_from_js.Increment();
5876 Heap::CollectAllGarbage(); 5878 Heap::CollectAllGarbage();
5877 } 5879 }
5878 } 5880 }
5879 5881
5880 5882
5881 } } // namespace v8::internal 5883 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/regexp-macro-assembler-re2k.cc ('k') | test/cctest/test-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698