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

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

Issue 1868803002: Use symbols when looking up fields in a class (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
« runtime/vm/object.cc ('K') | « runtime/vm/parser_test.cc ('k') | no next file » | 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_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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 return new(Z) ConstantInstr( 424 return new(Z) ConstantInstr(
425 String::ZoneHandle(Z, String::New(value, Heap::kOld))); 425 String::ZoneHandle(Z, String::New(value, Heap::kOld)));
426 } 426 }
427 427
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::_RegExp())); 432 lib.LookupClassAllowPrivate(Symbols::_RegExp()));
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.LookupStaticFieldAllowPrivate(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 ASSERT(!Compiler::IsBackgroundCompilation());
439 word_character_field.EvaluateInitializer(); 439 word_character_field.EvaluateInitializer();
440 } 440 }
441 ASSERT(!word_character_field.IsUninitialized()); 441 ASSERT(!word_character_field.IsUninitialized());
442 442
443 return new(Z) ConstantInstr( 443 return new(Z) ConstantInstr(
444 Instance::ZoneHandle(Z, word_character_field.StaticValue())); 444 Instance::ZoneHandle(Z, word_character_field.StaticValue()));
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1928 index_val, 1928 index_val,
1929 characters, 1929 characters,
1930 specialization_cid_, 1930 specialization_cid_,
1931 TokenPosition::kNoSource)); 1931 TokenPosition::kNoSource));
1932 } 1932 }
1933 1933
1934 1934
1935 #undef __ 1935 #undef __
1936 1936
1937 } // namespace dart 1937 } // namespace dart
OLDNEW
« runtime/vm/object.cc ('K') | « runtime/vm/parser_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698