Chromium Code Reviews| 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 5084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5095 } | 5095 } |
| 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 Symbols::IrregExp(), | 5105 // Append the regexp pattern to the function name. |
| 5106 String::ZoneHandle(isolate, String::Concat( | |
| 5107 String::ZoneHandle(isolate, String::Concat( | |
|
Florian Schneider
2015/01/13 13:06:28
Why use a ZoneHandle here?
zerny-google
2015/01/13 13:24:51
Replaced with just String::Handle
| |
| 5108 Symbols::Irregexp(), | |
| 5109 Symbols::ColonSpace(), Heap::kOld)), | |
| 5110 String::Handle(regexp.pattern()), Heap::kOld)), | |
| 5106 RawFunction::kIrregexpFunction, | 5111 RawFunction::kIrregexpFunction, |
| 5107 true, // Static. | 5112 true, // Static. |
| 5108 false, // Not const. | 5113 false, // Not const. |
| 5109 false, // Not abstract. | 5114 false, // Not abstract. |
| 5110 false, // Not external. | 5115 false, // Not external. |
| 5111 false, // Not native. | 5116 false, // Not native. |
| 5112 owner, | 5117 owner, |
| 5113 0)); // No token position. | 5118 0)); // No token position. |
| 5114 | 5119 |
| 5115 // TODO(zerny): Share these arrays between all irregexp functions. | 5120 // TODO(zerny): Share these arrays between all irregexp functions. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5162 CreateSpecializedFunction(isolate, regexp, kOneByteStringCid, owner); | 5167 CreateSpecializedFunction(isolate, regexp, kOneByteStringCid, owner); |
| 5163 CreateSpecializedFunction(isolate, regexp, kTwoByteStringCid, owner); | 5168 CreateSpecializedFunction(isolate, regexp, kTwoByteStringCid, owner); |
| 5164 CreateSpecializedFunction(isolate, regexp, kExternalOneByteStringCid, owner); | 5169 CreateSpecializedFunction(isolate, regexp, kExternalOneByteStringCid, owner); |
| 5165 CreateSpecializedFunction(isolate, regexp, kExternalTwoByteStringCid, owner); | 5170 CreateSpecializedFunction(isolate, regexp, kExternalTwoByteStringCid, owner); |
| 5166 | 5171 |
| 5167 return regexp.raw(); | 5172 return regexp.raw(); |
| 5168 } | 5173 } |
| 5169 | 5174 |
| 5170 | 5175 |
| 5171 } // namespace dart | 5176 } // namespace dart |
| OLD | NEW |