| OLD | NEW |
| 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_ast.h" | 9 #include "vm/regexp_ast.h" |
| 10 #include "vm/unibrow-inl.h" | 10 #include "vm/unibrow-inl.h" |
| (...skipping 5085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5096 | 5096 |
| 5097 | 5097 |
| 5098 static void CreateSpecializedFunction(Isolate* isolate, | 5098 static void CreateSpecializedFunction(Isolate* isolate, |
| 5099 const JSRegExp& regexp, | 5099 const JSRegExp& regexp, |
| 5100 intptr_t specialization_cid, | 5100 intptr_t specialization_cid, |
| 5101 const Object& owner) { | 5101 const Object& owner) { |
| 5102 const intptr_t kParamCount = RegExpMacroAssembler::kParamCount; | 5102 const intptr_t kParamCount = RegExpMacroAssembler::kParamCount; |
| 5103 | 5103 |
| 5104 Function& fn = Function::Handle(isolate, Function::New( | 5104 Function& fn = Function::Handle(isolate, Function::New( |
| 5105 // Append the regexp pattern to the function name. | 5105 // Append the regexp pattern to the function name. |
| 5106 String::Handle(isolate, String::Concat( | 5106 String::Handle(isolate, Symbols::New( |
| 5107 String::Handle(isolate, String::Concat( | 5107 String::Handle(isolate, String::Concat( |
| 5108 Symbols::Irregexp(), | 5108 String::Handle(isolate, String::Concat( |
| 5109 Symbols::ColonSpace(), Heap::kOld)), | 5109 Symbols::Irregexp(), |
| 5110 String::Handle(regexp.pattern()), Heap::kOld)), | 5110 Symbols::ColonSpace(), Heap::kOld)), |
| 5111 String::Handle(regexp.pattern()), Heap::kOld)))), |
| 5111 RawFunction::kIrregexpFunction, | 5112 RawFunction::kIrregexpFunction, |
| 5112 true, // Static. | 5113 true, // Static. |
| 5113 false, // Not const. | 5114 false, // Not const. |
| 5114 false, // Not abstract. | 5115 false, // Not abstract. |
| 5115 false, // Not external. | 5116 false, // Not external. |
| 5116 false, // Not native. | 5117 false, // Not native. |
| 5117 owner, | 5118 owner, |
| 5118 0)); // No token position. | 5119 0)); // No token position. |
| 5119 | 5120 |
| 5120 // TODO(zerny): Share these arrays between all irregexp functions. | 5121 // TODO(zerny): Share these arrays between all irregexp functions. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5167 CreateSpecializedFunction(isolate, regexp, kOneByteStringCid, owner); | 5168 CreateSpecializedFunction(isolate, regexp, kOneByteStringCid, owner); |
| 5168 CreateSpecializedFunction(isolate, regexp, kTwoByteStringCid, owner); | 5169 CreateSpecializedFunction(isolate, regexp, kTwoByteStringCid, owner); |
| 5169 CreateSpecializedFunction(isolate, regexp, kExternalOneByteStringCid, owner); | 5170 CreateSpecializedFunction(isolate, regexp, kExternalOneByteStringCid, owner); |
| 5170 CreateSpecializedFunction(isolate, regexp, kExternalTwoByteStringCid, owner); | 5171 CreateSpecializedFunction(isolate, regexp, kExternalTwoByteStringCid, owner); |
| 5171 | 5172 |
| 5172 return regexp.raw(); | 5173 return regexp.raw(); |
| 5173 } | 5174 } |
| 5174 | 5175 |
| 5175 | 5176 |
| 5176 } // namespace dart | 5177 } // namespace dart |
| OLD | NEW |