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

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

Issue 1722733002: In background compilation make a copy of Field in order to freeze its state (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: e Created 4 years, 9 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "lib/stacktrace.h" 10 #include "lib/stacktrace.h"
(...skipping 4301 matching lines...) Expand 10 before | Expand all | Expand 10 after
4312 CURRENT_FUNC); 4312 CURRENT_FUNC);
4313 } 4313 }
4314 field = lib.LookupFieldAllowPrivate(field_name); 4314 field = lib.LookupFieldAllowPrivate(field_name);
4315 if (field.IsNull()) { 4315 if (field.IsNull()) {
4316 // No field found and no ambiguity error. Check for a getter in the lib. 4316 // No field found and no ambiguity error. Check for a getter in the lib.
4317 const String& getter_name = 4317 const String& getter_name =
4318 String::Handle(Z, Field::GetterName(field_name)); 4318 String::Handle(Z, Field::GetterName(field_name));
4319 getter = lib.LookupFunctionAllowPrivate(getter_name); 4319 getter = lib.LookupFunctionAllowPrivate(getter_name);
4320 } else if (!field.IsNull() && field.IsUninitialized()) { 4320 } else if (!field.IsNull() && field.IsUninitialized()) {
4321 // A field was found. Check for a getter in the field's owner classs. 4321 // A field was found. Check for a getter in the field's owner classs.
4322 const Class& cls = Class::Handle(Z, field.owner()); 4322 const Class& cls = Class::Handle(Z, field.Owner());
4323 const String& getter_name = String::Handle(Z, 4323 const String& getter_name = String::Handle(Z,
4324 Field::GetterName(field_name)); 4324 Field::GetterName(field_name));
4325 getter = cls.LookupStaticFunctionAllowPrivate(getter_name); 4325 getter = cls.LookupStaticFunctionAllowPrivate(getter_name);
4326 } 4326 }
4327 4327
4328 if (!getter.IsNull()) { 4328 if (!getter.IsNull()) {
4329 // Invoke the getter and return the result. 4329 // Invoke the getter and return the result.
4330 return Api::NewHandle( 4330 return Api::NewHandle(
4331 T, DartEntry::InvokeFunction(getter, Object::empty_array())); 4331 T, DartEntry::InvokeFunction(getter, Object::empty_array()));
4332 } 4332 }
(...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after
6166 return Api::Success(); 6166 return Api::Success();
6167 } 6167 }
6168 #endif // DART_PRECOMPILER 6168 #endif // DART_PRECOMPILER
6169 6169
6170 6170
6171 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { 6171 DART_EXPORT bool Dart_IsRunningPrecompiledCode() {
6172 return Dart::IsRunningPrecompiledCode(); 6172 return Dart::IsRunningPrecompiledCode();
6173 } 6173 }
6174 6174
6175 } // namespace dart 6175 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698