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

Side by Side Diff: runtime/vm/regexp.cc

Issue 2207883004: From Regis: Remove regexp pattern from function name to avoid crash in debug mode. Fix service obj… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 | « runtime/observatory/tests/service/test_helper.dart ('k') | runtime/vm/symbols.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 (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/regexp.h" 5 #include "vm/regexp.h"
6 6
7 #include "vm/dart_entry.h" 7 #include "vm/dart_entry.h"
8 #include "vm/regexp_assembler.h" 8 #include "vm/regexp_assembler.h"
9 #include "vm/regexp_assembler_bytecode.h" 9 #include "vm/regexp_assembler_bytecode.h"
10 #include "vm/regexp_assembler_ir.h" 10 #include "vm/regexp_assembler_ir.h"
(...skipping 5233 matching lines...) Expand 10 before | Expand all | Expand 10 after
5244 } 5244 }
5245 5245
5246 5246
5247 static void CreateSpecializedFunction(Thread* thread, Zone* zone, 5247 static void CreateSpecializedFunction(Thread* thread, Zone* zone,
5248 const RegExp& regexp, 5248 const RegExp& regexp,
5249 intptr_t specialization_cid, 5249 intptr_t specialization_cid,
5250 const Object& owner) { 5250 const Object& owner) {
5251 const intptr_t kParamCount = RegExpMacroAssembler::kParamCount; 5251 const intptr_t kParamCount = RegExpMacroAssembler::kParamCount;
5252 5252
5253 Function& fn = Function::Handle(zone, Function::New( 5253 Function& fn = Function::Handle(zone, Function::New(
5254 // Append the regexp pattern to the function name. 5254 Symbols::ColonMatcher(),
5255 String::Handle(zone, Symbols::New(thread,
5256 String::Handle(zone, String::Concat(
5257 String::Handle(zone, String::Concat(
5258 Symbols::ColonMatcher(),
5259 Symbols::ColonSpace(), Heap::kOld)),
5260 String::Handle(regexp.pattern()), Heap::kOld)))),
5261 RawFunction::kIrregexpFunction, 5255 RawFunction::kIrregexpFunction,
5262 true, // Static. 5256 true, // Static.
5263 false, // Not const. 5257 false, // Not const.
5264 false, // Not abstract. 5258 false, // Not abstract.
5265 false, // Not external. 5259 false, // Not external.
5266 false, // Not native. 5260 false, // Not native.
5267 owner, 5261 owner,
5268 TokenPosition::kMinSource)); 5262 TokenPosition::kMinSource));
5269 5263
5270 // TODO(zerny): Share these arrays between all irregexp functions. 5264 // TODO(zerny): Share these arrays between all irregexp functions.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
5329 regexp, kExternalOneByteStringCid, owner); 5323 regexp, kExternalOneByteStringCid, owner);
5330 CreateSpecializedFunction(thread, zone, 5324 CreateSpecializedFunction(thread, zone,
5331 regexp, kExternalTwoByteStringCid, owner); 5325 regexp, kExternalTwoByteStringCid, owner);
5332 } 5326 }
5333 5327
5334 return regexp.raw(); 5328 return regexp.raw();
5335 } 5329 }
5336 5330
5337 5331
5338 } // namespace dart 5332 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/test_helper.dart ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698