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

Side by Side Diff: src/jsregexp.cc

Issue 6696042: Adding 'isolates' argument to LOG to get rid of multiple TLS fetches in profiling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/isolates
Patch Set: Addressing code review feedback + rebase Created 9 years, 9 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
« no previous file with comments | « src/isolate.cc ('k') | src/log.h » ('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-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 111
112 Handle<Object> RegExpImpl::Compile(Handle<JSRegExp> re, 112 Handle<Object> RegExpImpl::Compile(Handle<JSRegExp> re,
113 Handle<String> pattern, 113 Handle<String> pattern,
114 Handle<String> flag_str) { 114 Handle<String> flag_str) {
115 Isolate* isolate = re->GetIsolate(); 115 Isolate* isolate = re->GetIsolate();
116 JSRegExp::Flags flags = RegExpFlagsFromString(flag_str); 116 JSRegExp::Flags flags = RegExpFlagsFromString(flag_str);
117 CompilationCache* compilation_cache = isolate->compilation_cache(); 117 CompilationCache* compilation_cache = isolate->compilation_cache();
118 Handle<FixedArray> cached = compilation_cache->LookupRegExp(pattern, flags); 118 Handle<FixedArray> cached = compilation_cache->LookupRegExp(pattern, flags);
119 bool in_cache = !cached.is_null(); 119 bool in_cache = !cached.is_null();
120 LOG(RegExpCompileEvent(re, in_cache)); 120 LOG(isolate, RegExpCompileEvent(re, in_cache));
121 121
122 Handle<Object> result; 122 Handle<Object> result;
123 if (in_cache) { 123 if (in_cache) {
124 re->set_data(*cached); 124 re->set_data(*cached);
125 return re; 125 return re;
126 } 126 }
127 pattern = FlattenGetString(pattern); 127 pattern = FlattenGetString(pattern);
128 CompilationZoneScope zone_scope(DELETE_ON_EXIT); 128 CompilationZoneScope zone_scope(DELETE_ON_EXIT);
129 PostponeInterruptsScope postpone(isolate); 129 PostponeInterruptsScope postpone(isolate);
130 RegExpCompileData parse_result; 130 RegExpCompileData parse_result;
(...skipping 5226 matching lines...) Expand 10 before | Expand all | Expand 10 after
5357 } 5357 }
5358 5358
5359 return compiler.Assemble(&macro_assembler, 5359 return compiler.Assemble(&macro_assembler,
5360 node, 5360 node,
5361 data->capture_count, 5361 data->capture_count,
5362 pattern); 5362 pattern);
5363 } 5363 }
5364 5364
5365 5365
5366 }} // namespace v8::internal 5366 }} // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698