| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/parser.h" | 5 #include "vm/parser.h" |
| 6 #include "vm/flags.h" | 6 #include "vm/flags.h" |
| 7 | 7 |
| 8 #ifndef DART_PRECOMPILED_RUNTIME | 8 #ifndef DART_PRECOMPILED_RUNTIME |
| 9 | 9 |
| 10 #include "lib/invocation_mirror.h" | 10 #include "lib/invocation_mirror.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 // finalized yet. | 154 // finalized yet. |
| 155 return a.raw(); | 155 return a.raw(); |
| 156 } | 156 } |
| 157 | 157 |
| 158 | 158 |
| 159 void ParsedFunction::AddToGuardedFields(const Field* field) const { | 159 void ParsedFunction::AddToGuardedFields(const Field* field) const { |
| 160 if ((field->guarded_cid() == kDynamicCid) || | 160 if ((field->guarded_cid() == kDynamicCid) || |
| 161 (field->guarded_cid() == kIllegalCid)) { | 161 (field->guarded_cid() == kIllegalCid)) { |
| 162 return; | 162 return; |
| 163 } | 163 } |
| 164 |
| 164 for (intptr_t j = 0; j < guarded_fields_->length(); j++) { | 165 for (intptr_t j = 0; j < guarded_fields_->length(); j++) { |
| 165 if ((*guarded_fields_)[j]->raw() == field->raw()) { | 166 if ((*guarded_fields_)[j]->Original() == field->Original()) { |
| 166 return; | 167 return; |
| 167 } | 168 } |
| 168 } | 169 } |
| 169 guarded_fields_->Add(&Field::ZoneHandle(Z, field->Original())); | 170 |
| 171 // Note: the list of guarded fields must contain copies during background |
| 172 // compilation because we will look at their guarded_cid when copying |
| 173 // the array of guarded fields from callee into the caller during |
| 174 // inlining. |
| 175 ASSERT(!field->IsOriginal() || Thread::Current()->IsMutatorThread()); |
| 176 guarded_fields_->Add(&Field::ZoneHandle(Z, field->raw())); |
| 170 } | 177 } |
| 171 | 178 |
| 172 | 179 |
| 173 LocalVariable* ParsedFunction::EnsureExpressionTemp() { | 180 LocalVariable* ParsedFunction::EnsureExpressionTemp() { |
| 174 if (!has_expression_temp_var()) { | 181 if (!has_expression_temp_var()) { |
| 175 LocalVariable* temp = | 182 LocalVariable* temp = |
| 176 new (Z) LocalVariable(function_.token_pos(), | 183 new (Z) LocalVariable(function_.token_pos(), |
| 177 Symbols::ExprTemp(), | 184 Symbols::ExprTemp(), |
| 178 Object::dynamic_type()); | 185 Object::dynamic_type()); |
| 179 ASSERT(temp != NULL); | 186 ASSERT(temp != NULL); |
| (...skipping 14320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14500 const ArgumentListNode& function_args, | 14507 const ArgumentListNode& function_args, |
| 14501 const LocalVariable* temp_for_last_arg, | 14508 const LocalVariable* temp_for_last_arg, |
| 14502 bool is_super_invocation) { | 14509 bool is_super_invocation) { |
| 14503 UNREACHABLE(); | 14510 UNREACHABLE(); |
| 14504 return NULL; | 14511 return NULL; |
| 14505 } | 14512 } |
| 14506 | 14513 |
| 14507 } // namespace dart | 14514 } // namespace dart |
| 14508 | 14515 |
| 14509 #endif // DART_PRECOMPILED_RUNTIME | 14516 #endif // DART_PRECOMPILED_RUNTIME |
| OLD | NEW |