| 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_assembler_ir.h" | 5 #include "vm/regexp_assembler_ir.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 | 428 |
| 429 ConstantInstr* IRRegExpMacroAssembler::WordCharacterMapConstant() const { | 429 ConstantInstr* IRRegExpMacroAssembler::WordCharacterMapConstant() const { |
| 430 const Library& lib = Library::Handle(Z, Library::CoreLibrary()); | 430 const Library& lib = Library::Handle(Z, Library::CoreLibrary()); |
| 431 const Class& regexp_class = Class::Handle(Z, | 431 const Class& regexp_class = Class::Handle(Z, |
| 432 lib.LookupClassAllowPrivate(Symbols::JSSyntaxRegExp())); | 432 lib.LookupClassAllowPrivate(Symbols::JSSyntaxRegExp())); |
| 433 const Field& word_character_field = Field::ZoneHandle(Z, | 433 const Field& word_character_field = Field::ZoneHandle(Z, |
| 434 regexp_class.LookupStaticField(Symbols::_wordCharacterMap())); | 434 regexp_class.LookupStaticField(Symbols::_wordCharacterMap())); |
| 435 ASSERT(!word_character_field.IsNull()); | 435 ASSERT(!word_character_field.IsNull()); |
| 436 | 436 |
| 437 if (word_character_field.IsUninitialized()) { | 437 if (word_character_field.IsUninitialized()) { |
| 438 ASSERT(!Compiler::IsBackgroundCompilation()); |
| 438 word_character_field.EvaluateInitializer(); | 439 word_character_field.EvaluateInitializer(); |
| 439 } | 440 } |
| 440 ASSERT(!word_character_field.IsUninitialized()); | 441 ASSERT(!word_character_field.IsUninitialized()); |
| 441 | 442 |
| 442 return new(Z) ConstantInstr( | 443 return new(Z) ConstantInstr( |
| 443 Instance::ZoneHandle(Z, word_character_field.StaticValue())); | 444 Instance::ZoneHandle(Z, word_character_field.StaticValue())); |
| 444 } | 445 } |
| 445 | 446 |
| 446 | 447 |
| 447 ComparisonInstr* IRRegExpMacroAssembler::Comparison( | 448 ComparisonInstr* IRRegExpMacroAssembler::Comparison( |
| (...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1927 index_val, | 1928 index_val, |
| 1928 characters, | 1929 characters, |
| 1929 specialization_cid_, | 1930 specialization_cid_, |
| 1930 TokenPosition::kNoSource)); | 1931 TokenPosition::kNoSource)); |
| 1931 } | 1932 } |
| 1932 | 1933 |
| 1933 | 1934 |
| 1934 #undef __ | 1935 #undef __ |
| 1935 | 1936 |
| 1936 } // namespace dart | 1937 } // namespace dart |
| OLD | NEW |