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

Side by Side Diff: src/jsregexp.cc

Issue 8133020: Simplify calling generated code from the runtime. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | Annotate | Revision Log
« src/ic.cc ('K') | « src/ic.cc ('k') | src/messages.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 62
63 namespace v8 { 63 namespace v8 {
64 namespace internal { 64 namespace internal {
65 65
66 Handle<Object> RegExpImpl::CreateRegExpLiteral(Handle<JSFunction> constructor, 66 Handle<Object> RegExpImpl::CreateRegExpLiteral(Handle<JSFunction> constructor,
67 Handle<String> pattern, 67 Handle<String> pattern,
68 Handle<String> flags, 68 Handle<String> flags,
69 bool* has_pending_exception) { 69 bool* has_pending_exception) {
70 // Call the construct code with 2 arguments. 70 // Call the construct code with 2 arguments.
71 Object** argv[2] = { Handle<Object>::cast(pattern).location(), 71 Handle<Object> argv[] = { pattern, flags };
72 Handle<Object>::cast(flags).location() }; 72 return Execution::New(constructor, ARRAY_SIZE(argv), argv,
73 return Execution::New(constructor, 2, argv, has_pending_exception); 73 has_pending_exception);
74 } 74 }
75 75
76 76
77 static JSRegExp::Flags RegExpFlagsFromString(Handle<String> str) { 77 static JSRegExp::Flags RegExpFlagsFromString(Handle<String> str) {
78 int flags = JSRegExp::NONE; 78 int flags = JSRegExp::NONE;
79 for (int i = 0; i < str->length(); i++) { 79 for (int i = 0; i < str->length(); i++) {
80 switch (str->Get(i)) { 80 switch (str->Get(i)) {
81 case 'i': 81 case 'i':
82 flags |= JSRegExp::IGNORE_CASE; 82 flags |= JSRegExp::IGNORE_CASE;
83 break; 83 break;
(...skipping 5249 matching lines...) Expand 10 before | Expand all | Expand 10 after
5333 } 5333 }
5334 5334
5335 return compiler.Assemble(&macro_assembler, 5335 return compiler.Assemble(&macro_assembler,
5336 node, 5336 node,
5337 data->capture_count, 5337 data->capture_count,
5338 pattern); 5338 pattern);
5339 } 5339 }
5340 5340
5341 5341
5342 }} // namespace v8::internal 5342 }} // namespace v8::internal
OLDNEW
« src/ic.cc ('K') | « src/ic.cc ('k') | src/messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698