OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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/kernel_reader.h" | 5 #include "vm/kernel_reader.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
10 #include "vm/kernel_binary.h" | 10 #include "vm/kernel_binary.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 class SimpleExpressionConverter { | 26 class SimpleExpressionConverter { |
27 public: | 27 public: |
28 SimpleExpressionConverter(TranslationHelper* helper, | 28 SimpleExpressionConverter(TranslationHelper* helper, |
29 StreamingFlowGraphBuilder* builder) | 29 StreamingFlowGraphBuilder* builder) |
30 : translation_helper_(*helper), | 30 : translation_helper_(*helper), |
31 zone_(translation_helper_.zone()), | 31 zone_(translation_helper_.zone()), |
32 simple_value_(NULL), | 32 simple_value_(NULL), |
33 builder_(builder) {} | 33 builder_(builder) {} |
34 | 34 |
35 | |
36 bool IsSimple(intptr_t kernel_offset) { | 35 bool IsSimple(intptr_t kernel_offset) { |
37 AlternativeReadingScope alt(builder_->reader_, kernel_offset); | 36 AlternativeReadingScope alt(builder_->reader_, kernel_offset); |
38 uint8_t payload = 0; | 37 uint8_t payload = 0; |
39 Tag tag = builder_->ReadTag(&payload); // read tag. | 38 Tag tag = builder_->ReadTag(&payload); // read tag. |
40 switch (tag) { | 39 switch (tag) { |
41 case kBigIntLiteral: | 40 case kBigIntLiteral: |
42 simple_value_ = &Integer::ZoneHandle( | 41 simple_value_ = &Integer::ZoneHandle( |
43 Z, Integer::New( | 42 Z, Integer::New( |
44 H.DartString(builder_->ReadStringReference(), | 43 H.DartString(builder_->ReadStringReference(), |
45 Heap::kOld))); // read index into string table. | 44 Heap::kOld))); // read index into string table. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 const dart::Instance& SimpleValue() { return *simple_value_; } | 90 const dart::Instance& SimpleValue() { return *simple_value_; } |
92 dart::Zone* zone() const { return zone_; } | 91 dart::Zone* zone() const { return zone_; } |
93 | 92 |
94 private: | 93 private: |
95 TranslationHelper& translation_helper_; | 94 TranslationHelper& translation_helper_; |
96 dart::Zone* zone_; | 95 dart::Zone* zone_; |
97 dart::Instance* simple_value_; | 96 dart::Instance* simple_value_; |
98 StreamingFlowGraphBuilder* builder_; | 97 StreamingFlowGraphBuilder* builder_; |
99 }; | 98 }; |
100 | 99 |
101 | |
102 RawArray* KernelReader::MakeFunctionsArray() { | 100 RawArray* KernelReader::MakeFunctionsArray() { |
103 const intptr_t len = functions_.length(); | 101 const intptr_t len = functions_.length(); |
104 const Array& res = Array::Handle(zone_, Array::New(len, Heap::kOld)); | 102 const Array& res = Array::Handle(zone_, Array::New(len, Heap::kOld)); |
105 for (intptr_t i = 0; i < len; i++) { | 103 for (intptr_t i = 0; i < len; i++) { |
106 res.SetAt(i, *functions_[i]); | 104 res.SetAt(i, *functions_[i]); |
107 } | 105 } |
108 return res.raw(); | 106 return res.raw(); |
109 } | 107 } |
110 | 108 |
111 | |
112 RawLibrary* BuildingTranslationHelper::LookupLibraryByKernelLibrary( | 109 RawLibrary* BuildingTranslationHelper::LookupLibraryByKernelLibrary( |
113 NameIndex library) { | 110 NameIndex library) { |
114 return reader_->LookupLibrary(library).raw(); | 111 return reader_->LookupLibrary(library).raw(); |
115 } | 112 } |
116 | 113 |
117 | |
118 RawClass* BuildingTranslationHelper::LookupClassByKernelClass(NameIndex klass) { | 114 RawClass* BuildingTranslationHelper::LookupClassByKernelClass(NameIndex klass) { |
119 return reader_->LookupClass(klass).raw(); | 115 return reader_->LookupClass(klass).raw(); |
120 } | 116 } |
121 | 117 |
122 | |
123 KernelReader::KernelReader(Program* program) | 118 KernelReader::KernelReader(Program* program) |
124 : program_(program), | 119 : program_(program), |
125 thread_(dart::Thread::Current()), | 120 thread_(dart::Thread::Current()), |
126 zone_(thread_->zone()), | 121 zone_(thread_->zone()), |
127 isolate_(thread_->isolate()), | 122 isolate_(thread_->isolate()), |
128 scripts_(Array::ZoneHandle(zone_)), | 123 scripts_(Array::ZoneHandle(zone_)), |
129 translation_helper_(this, thread_), | 124 translation_helper_(this, thread_), |
130 builder_(&translation_helper_, | 125 builder_(&translation_helper_, |
131 zone_, | 126 zone_, |
132 program_->kernel_data(), | 127 program_->kernel_data(), |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 Z, TypedData::New(kTypedDataUint32ArrayCid, count, Heap::kOld)); | 161 Z, TypedData::New(kTypedDataUint32ArrayCid, count, Heap::kOld)); |
167 for (intptr_t i = 0; i < count; ++i) { | 162 for (intptr_t i = 0; i < count; ++i) { |
168 names.SetUint32(i << 2, reader.ReadUInt()); | 163 names.SetUint32(i << 2, reader.ReadUInt()); |
169 } | 164 } |
170 | 165 |
171 H.SetStringOffsets(offsets); | 166 H.SetStringOffsets(offsets); |
172 H.SetStringData(data); | 167 H.SetStringData(data); |
173 H.SetCanonicalNames(names); | 168 H.SetCanonicalNames(names); |
174 } | 169 } |
175 | 170 |
176 | |
177 Object& KernelReader::ReadProgram() { | 171 Object& KernelReader::ReadProgram() { |
178 LongJumpScope jump; | 172 LongJumpScope jump; |
179 if (setjmp(*jump.Set()) == 0) { | 173 if (setjmp(*jump.Set()) == 0) { |
180 intptr_t length = program_->library_count(); | 174 intptr_t length = program_->library_count(); |
181 for (intptr_t i = 0; i < length; i++) { | 175 for (intptr_t i = 0; i < length; i++) { |
182 ReadLibrary(library_offset(i)); | 176 ReadLibrary(library_offset(i)); |
183 } | 177 } |
184 | 178 |
185 for (intptr_t i = 0; i < length; i++) { | 179 for (intptr_t i = 0; i < length; i++) { |
186 dart::Library& library = LookupLibrary(library_canonical_name(i)); | 180 dart::Library& library = LookupLibrary(library_canonical_name(i)); |
(...skipping 18 matching lines...) Expand all Loading... |
205 } | 199 } |
206 | 200 |
207 // Either class finalization failed or we caught a compile error. | 201 // Either class finalization failed or we caught a compile error. |
208 // In both cases sticky error would be set. | 202 // In both cases sticky error would be set. |
209 Error& error = Error::Handle(Z); | 203 Error& error = Error::Handle(Z); |
210 error = thread_->sticky_error(); | 204 error = thread_->sticky_error(); |
211 thread_->clear_sticky_error(); | 205 thread_->clear_sticky_error(); |
212 return error; | 206 return error; |
213 } | 207 } |
214 | 208 |
215 | |
216 void KernelReader::ReadLibrary(intptr_t kernel_offset) { | 209 void KernelReader::ReadLibrary(intptr_t kernel_offset) { |
217 builder_.SetOffset(kernel_offset); | 210 builder_.SetOffset(kernel_offset); |
218 LibraryHelper library_helper(&builder_); | 211 LibraryHelper library_helper(&builder_); |
219 library_helper.ReadUntilIncluding(LibraryHelper::kCanonicalName); | 212 library_helper.ReadUntilIncluding(LibraryHelper::kCanonicalName); |
220 dart::Library& library = LookupLibrary(library_helper.canonical_name_); | 213 dart::Library& library = LookupLibrary(library_helper.canonical_name_); |
221 if (library.Loaded()) return; | 214 if (library.Loaded()) return; |
222 | 215 |
223 library_helper.ReadUntilIncluding(LibraryHelper::kName); | 216 library_helper.ReadUntilIncluding(LibraryHelper::kName); |
224 library.SetName(H.DartSymbol(library_helper.name_index_)); | 217 library.SetName(H.DartSymbol(library_helper.name_index_)); |
225 | 218 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 intptr_t procedure_count = builder_.ReadListLength(); // read list length. | 288 intptr_t procedure_count = builder_.ReadListLength(); // read list length. |
296 for (intptr_t i = 0; i < procedure_count; ++i) { | 289 for (intptr_t i = 0; i < procedure_count; ++i) { |
297 ReadProcedure(library, toplevel_class, false); | 290 ReadProcedure(library, toplevel_class, false); |
298 } | 291 } |
299 | 292 |
300 toplevel_class.SetFunctions(Array::Handle(MakeFunctionsArray())); | 293 toplevel_class.SetFunctions(Array::Handle(MakeFunctionsArray())); |
301 | 294 |
302 classes.Add(toplevel_class, Heap::kOld); | 295 classes.Add(toplevel_class, Heap::kOld); |
303 } | 296 } |
304 | 297 |
305 | |
306 void KernelReader::ReadPreliminaryClass(dart::Class* klass, | 298 void KernelReader::ReadPreliminaryClass(dart::Class* klass, |
307 ClassHelper* class_helper, | 299 ClassHelper* class_helper, |
308 intptr_t type_parameter_count) { | 300 intptr_t type_parameter_count) { |
309 // Note: This assumes that ClassHelper is exactly at the position where | 301 // Note: This assumes that ClassHelper is exactly at the position where |
310 // the length of the type parameters have been read, and that the order in | 302 // the length of the type parameters have been read, and that the order in |
311 // the binary is as follows: [...], kTypeParameters, kSuperClass, kMixinType, | 303 // the binary is as follows: [...], kTypeParameters, kSuperClass, kMixinType, |
312 // kImplementedClasses, [...]. | 304 // kImplementedClasses, [...]. |
313 | 305 |
314 // First setup the type parameters, so if any of the following code uses it | 306 // First setup the type parameters, so if any of the following code uses it |
315 // (in a recursive way) we're fine. | 307 // (in a recursive way) we're fine. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 T.BuildTypeWithoutFinalization(); // read ith type. | 370 T.BuildTypeWithoutFinalization(); // read ith type. |
379 if (type.IsMalformed()) H.ReportError("Malformed interface type."); | 371 if (type.IsMalformed()) H.ReportError("Malformed interface type."); |
380 interfaces.SetAt(i, type); | 372 interfaces.SetAt(i, type); |
381 } | 373 } |
382 class_helper->SetJustRead(ClassHelper::kImplementedClasses); | 374 class_helper->SetJustRead(ClassHelper::kImplementedClasses); |
383 klass->set_interfaces(interfaces); | 375 klass->set_interfaces(interfaces); |
384 | 376 |
385 if (class_helper->is_abstract_) klass->set_is_abstract(); | 377 if (class_helper->is_abstract_) klass->set_is_abstract(); |
386 } | 378 } |
387 | 379 |
388 | |
389 dart::Class& KernelReader::ReadClass(const dart::Library& library, | 380 dart::Class& KernelReader::ReadClass(const dart::Library& library, |
390 const dart::Class& toplevel_class) { | 381 const dart::Class& toplevel_class) { |
391 ClassHelper class_helper(&builder_); | 382 ClassHelper class_helper(&builder_); |
392 intptr_t class_offset = builder_.ReaderOffset(); | 383 intptr_t class_offset = builder_.ReaderOffset(); |
393 class_helper.ReadUntilIncluding(ClassHelper::kCanonicalName); | 384 class_helper.ReadUntilIncluding(ClassHelper::kCanonicalName); |
394 dart::Class& klass = LookupClass(class_helper.canonical_name_); | 385 dart::Class& klass = LookupClass(class_helper.canonical_name_); |
395 | 386 |
396 // The class needs to have a script because all the functions in the class | 387 // The class needs to have a script because all the functions in the class |
397 // will inherit it. The predicate Function::IsOptimizable uses the absence of | 388 // will inherit it. The predicate Function::IsOptimizable uses the absence of |
398 // a script to detect test functions that should not be optimized. | 389 // a script to detect test functions that should not be optimized. |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 if (FLAG_enable_mirrors && class_helper.annotation_count_ > 0) { | 523 if (FLAG_enable_mirrors && class_helper.annotation_count_ > 0) { |
533 library.AddClassMetadata(klass, toplevel_class, TokenPosition::kNoSource, | 524 library.AddClassMetadata(klass, toplevel_class, TokenPosition::kNoSource, |
534 class_offset); | 525 class_offset); |
535 } | 526 } |
536 | 527 |
537 class_helper.ReadUntilExcluding(ClassHelper::kEnd); | 528 class_helper.ReadUntilExcluding(ClassHelper::kEnd); |
538 | 529 |
539 return klass; | 530 return klass; |
540 } | 531 } |
541 | 532 |
542 | |
543 void KernelReader::ReadProcedure(const dart::Library& library, | 533 void KernelReader::ReadProcedure(const dart::Library& library, |
544 const dart::Class& owner, | 534 const dart::Class& owner, |
545 bool in_class) { | 535 bool in_class) { |
546 intptr_t procedure_offset = builder_.ReaderOffset(); | 536 intptr_t procedure_offset = builder_.ReaderOffset(); |
547 ProcedureHelper procedure_helper(&builder_); | 537 ProcedureHelper procedure_helper(&builder_); |
548 | 538 |
549 bool member_is_procedure = false; | 539 bool member_is_procedure = false; |
550 bool is_factory_procedure = false; | 540 bool is_factory_procedure = false; |
551 intptr_t member_type_parameters = 0; | 541 intptr_t member_type_parameters = 0; |
552 intptr_t member_type_parameters_offset_start = -1; | 542 intptr_t member_type_parameters_offset_start = -1; |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 script_class, field_helper->position_)); | 795 script_class, field_helper->position_)); |
806 functions_.Add(&setter); | 796 functions_.Add(&setter); |
807 setter.set_end_token_pos(field_helper->end_position_); | 797 setter.set_end_token_pos(field_helper->end_position_); |
808 setter.set_kernel_offset(field_offset); | 798 setter.set_kernel_offset(field_offset); |
809 setter.set_result_type(Object::void_type()); | 799 setter.set_result_type(Object::void_type()); |
810 setter.set_is_debuggable(false); | 800 setter.set_is_debuggable(false); |
811 SetupFieldAccessorFunction(klass, setter); | 801 SetupFieldAccessorFunction(klass, setter); |
812 } | 802 } |
813 } | 803 } |
814 | 804 |
815 | |
816 void KernelReader::SetupFieldAccessorFunction(const dart::Class& klass, | 805 void KernelReader::SetupFieldAccessorFunction(const dart::Class& klass, |
817 const dart::Function& function) { | 806 const dart::Function& function) { |
818 bool is_setter = function.IsImplicitSetterFunction(); | 807 bool is_setter = function.IsImplicitSetterFunction(); |
819 bool is_method = !function.IsStaticFunction(); | 808 bool is_method = !function.IsStaticFunction(); |
820 intptr_t parameter_count = (is_method ? 1 : 0) + (is_setter ? 1 : 0); | 809 intptr_t parameter_count = (is_method ? 1 : 0) + (is_setter ? 1 : 0); |
821 | 810 |
822 function.SetNumOptionalParameters(0, false); | 811 function.SetNumOptionalParameters(0, false); |
823 function.set_num_fixed_parameters(parameter_count); | 812 function.set_num_fixed_parameters(parameter_count); |
824 function.set_parameter_types( | 813 function.set_parameter_types( |
825 Array::Handle(Z, Array::New(parameter_count, Heap::kOld))); | 814 Array::Handle(Z, Array::New(parameter_count, Heap::kOld))); |
826 function.set_parameter_names( | 815 function.set_parameter_names( |
827 Array::Handle(Z, Array::New(parameter_count, Heap::kOld))); | 816 Array::Handle(Z, Array::New(parameter_count, Heap::kOld))); |
828 | 817 |
829 intptr_t pos = 0; | 818 intptr_t pos = 0; |
830 if (is_method) { | 819 if (is_method) { |
831 function.SetParameterTypeAt(pos, T.ReceiverType(klass)); | 820 function.SetParameterTypeAt(pos, T.ReceiverType(klass)); |
832 function.SetParameterNameAt(pos, Symbols::This()); | 821 function.SetParameterNameAt(pos, Symbols::This()); |
833 pos++; | 822 pos++; |
834 } | 823 } |
835 if (is_setter) { | 824 if (is_setter) { |
836 function.SetParameterTypeAt(pos, AbstractType::dynamic_type()); | 825 function.SetParameterTypeAt(pos, AbstractType::dynamic_type()); |
837 function.SetParameterNameAt(pos, Symbols::Value()); | 826 function.SetParameterNameAt(pos, Symbols::Value()); |
838 pos++; | 827 pos++; |
839 } | 828 } |
840 } | 829 } |
841 | 830 |
842 | |
843 dart::Library& KernelReader::LookupLibrary(NameIndex library) { | 831 dart::Library& KernelReader::LookupLibrary(NameIndex library) { |
844 dart::Library* handle = NULL; | 832 dart::Library* handle = NULL; |
845 if (!libraries_.Lookup(library, &handle)) { | 833 if (!libraries_.Lookup(library, &handle)) { |
846 const dart::String& url = H.DartSymbol(H.CanonicalNameString(library)); | 834 const dart::String& url = H.DartSymbol(H.CanonicalNameString(library)); |
847 handle = | 835 handle = |
848 &dart::Library::Handle(Z, dart::Library::LookupLibrary(thread_, url)); | 836 &dart::Library::Handle(Z, dart::Library::LookupLibrary(thread_, url)); |
849 if (handle->IsNull()) { | 837 if (handle->IsNull()) { |
850 *handle = dart::Library::New(url); | 838 *handle = dart::Library::New(url); |
851 handle->Register(thread_); | 839 handle->Register(thread_); |
852 } | 840 } |
853 ASSERT(!handle->IsNull()); | 841 ASSERT(!handle->IsNull()); |
854 libraries_.Insert(library, handle); | 842 libraries_.Insert(library, handle); |
855 } | 843 } |
856 return *handle; | 844 return *handle; |
857 } | 845 } |
858 | 846 |
859 | |
860 dart::Class& KernelReader::LookupClass(NameIndex klass) { | 847 dart::Class& KernelReader::LookupClass(NameIndex klass) { |
861 dart::Class* handle = NULL; | 848 dart::Class* handle = NULL; |
862 if (!classes_.Lookup(klass, &handle)) { | 849 if (!classes_.Lookup(klass, &handle)) { |
863 dart::Library& library = LookupLibrary(H.CanonicalNameParent(klass)); | 850 dart::Library& library = LookupLibrary(H.CanonicalNameParent(klass)); |
864 const dart::String& name = H.DartClassName(klass); | 851 const dart::String& name = H.DartClassName(klass); |
865 handle = &dart::Class::Handle(Z, library.LookupClass(name)); | 852 handle = &dart::Class::Handle(Z, library.LookupClass(name)); |
866 if (handle->IsNull()) { | 853 if (handle->IsNull()) { |
867 *handle = dart::Class::New(library, name, Script::Handle(Z), | 854 *handle = dart::Class::New(library, name, Script::Handle(Z), |
868 TokenPosition::kNoSource); | 855 TokenPosition::kNoSource); |
869 library.AddClass(*handle); | 856 library.AddClass(*handle); |
870 } | 857 } |
871 // Insert the class in the cache before calling ReadPreliminaryClass so | 858 // Insert the class in the cache before calling ReadPreliminaryClass so |
872 // we do not risk allocating the class again by calling LookupClass | 859 // we do not risk allocating the class again by calling LookupClass |
873 // recursively from ReadPreliminaryClass for the same class. | 860 // recursively from ReadPreliminaryClass for the same class. |
874 classes_.Insert(klass, handle); | 861 classes_.Insert(klass, handle); |
875 } | 862 } |
876 return *handle; | 863 return *handle; |
877 } | 864 } |
878 | 865 |
879 | |
880 RawFunction::Kind KernelReader::GetFunctionType( | 866 RawFunction::Kind KernelReader::GetFunctionType( |
881 Procedure::ProcedureKind procedure_kind) { | 867 Procedure::ProcedureKind procedure_kind) { |
882 intptr_t lookuptable[] = { | 868 intptr_t lookuptable[] = { |
883 RawFunction::kRegularFunction, // Procedure::kMethod | 869 RawFunction::kRegularFunction, // Procedure::kMethod |
884 RawFunction::kGetterFunction, // Procedure::kGetter | 870 RawFunction::kGetterFunction, // Procedure::kGetter |
885 RawFunction::kSetterFunction, // Procedure::kSetter | 871 RawFunction::kSetterFunction, // Procedure::kSetter |
886 RawFunction::kRegularFunction, // Procedure::kOperator | 872 RawFunction::kRegularFunction, // Procedure::kOperator |
887 RawFunction::kConstructor, // Procedure::kFactory | 873 RawFunction::kConstructor, // Procedure::kFactory |
888 }; | 874 }; |
889 intptr_t kind = static_cast<int>(procedure_kind); | 875 intptr_t kind = static_cast<int>(procedure_kind); |
890 if (kind == Procedure::kIncompleteProcedure) { | 876 if (kind == Procedure::kIncompleteProcedure) { |
891 return RawFunction::kSignatureFunction; | 877 return RawFunction::kSignatureFunction; |
892 } else { | 878 } else { |
893 ASSERT(0 <= kind && kind <= Procedure::kFactory); | 879 ASSERT(0 <= kind && kind <= Procedure::kFactory); |
894 return static_cast<RawFunction::Kind>(lookuptable[kind]); | 880 return static_cast<RawFunction::Kind>(lookuptable[kind]); |
895 } | 881 } |
896 } | 882 } |
897 | 883 |
898 | |
899 ParsedFunction* ParseStaticFieldInitializer(Zone* zone, | 884 ParsedFunction* ParseStaticFieldInitializer(Zone* zone, |
900 const dart::Field& field) { | 885 const dart::Field& field) { |
901 Thread* thread = Thread::Current(); | 886 Thread* thread = Thread::Current(); |
902 | 887 |
903 dart::String& init_name = dart::String::Handle(zone, field.name()); | 888 dart::String& init_name = dart::String::Handle(zone, field.name()); |
904 init_name = Symbols::FromConcat(thread, Symbols::InitPrefix(), init_name); | 889 init_name = Symbols::FromConcat(thread, Symbols::InitPrefix(), init_name); |
905 | 890 |
906 // Create a static initializer. | 891 // Create a static initializer. |
907 const Object& owner = Object::Handle(field.RawOwner()); | 892 const Object& owner = Object::Handle(field.RawOwner()); |
908 const Function& initializer_fun = Function::ZoneHandle( | 893 const Function& initializer_fun = Function::ZoneHandle( |
909 zone, | 894 zone, |
910 dart::Function::New(init_name, RawFunction::kImplicitStaticFinalGetter, | 895 dart::Function::New(init_name, RawFunction::kImplicitStaticFinalGetter, |
911 true, // is_static | 896 true, // is_static |
912 false, // is_const | 897 false, // is_const |
913 false, // is_abstract | 898 false, // is_abstract |
914 false, // is_external | 899 false, // is_external |
915 false, // is_native | 900 false, // is_native |
916 owner, TokenPosition::kNoSource)); | 901 owner, TokenPosition::kNoSource)); |
917 initializer_fun.set_kernel_offset(field.kernel_offset()); | 902 initializer_fun.set_kernel_offset(field.kernel_offset()); |
918 initializer_fun.set_result_type(AbstractType::Handle(zone, field.type())); | 903 initializer_fun.set_result_type(AbstractType::Handle(zone, field.type())); |
919 initializer_fun.set_is_debuggable(false); | 904 initializer_fun.set_is_debuggable(false); |
920 initializer_fun.set_is_reflectable(false); | 905 initializer_fun.set_is_reflectable(false); |
921 initializer_fun.set_is_inlinable(false); | 906 initializer_fun.set_is_inlinable(false); |
922 return new (zone) ParsedFunction(thread, initializer_fun); | 907 return new (zone) ParsedFunction(thread, initializer_fun); |
923 } | 908 } |
924 | 909 |
925 | |
926 } // namespace kernel | 910 } // namespace kernel |
927 } // namespace dart | 911 } // namespace dart |
928 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 912 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
OLD | NEW |