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

Side by Side Diff: runtime/lib/mirrors.cc

Issue 160843003: Fix getField/setField optimization for private members. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: dart style Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/lib/lib.status » ('j') | 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) 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 "lib/invocation_mirror.h" 5 #include "lib/invocation_mirror.h"
6 #include "vm/bootstrap_natives.h" 6 #include "vm/bootstrap_natives.h"
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.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/exceptions.h" 10 #include "vm/exceptions.h"
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 GET_NON_NULL_NATIVE_ARGUMENT(String, expression, arguments->NativeArgAt(0)); 1304 GET_NON_NULL_NATIVE_ARGUMENT(String, expression, arguments->NativeArgAt(0));
1305 GET_NATIVE_ARGUMENT(String, private_key, arguments->NativeArgAt(1)); 1305 GET_NATIVE_ARGUMENT(String, private_key, arguments->NativeArgAt(1));
1306 1306
1307 const GrowableObjectArray& libraries = 1307 const GrowableObjectArray& libraries =
1308 GrowableObjectArray::Handle(isolate->object_store()->libraries()); 1308 GrowableObjectArray::Handle(isolate->object_store()->libraries());
1309 const int num_libraries = libraries.Length(); 1309 const int num_libraries = libraries.Length();
1310 Library& each_library = Library::Handle(); 1310 Library& each_library = Library::Handle();
1311 Library& ctxt_library = Library::Handle(); 1311 Library& ctxt_library = Library::Handle();
1312 String& library_key = String::Handle(); 1312 String& library_key = String::Handle();
1313 1313
1314 if (library_key.IsNull()) { 1314 if (private_key.IsNull()) {
1315 ctxt_library = Library::CoreLibrary(); 1315 ctxt_library = Library::CoreLibrary();
1316 } else { 1316 } else {
1317 for (int i = 0; i < num_libraries; i++) { 1317 for (int i = 0; i < num_libraries; i++) {
1318 each_library ^= libraries.At(i); 1318 each_library ^= libraries.At(i);
1319 library_key = each_library.private_key(); 1319 library_key = each_library.private_key();
1320 if (library_key.Equals(private_key)) { 1320 if (library_key.Equals(private_key)) {
1321 ctxt_library = each_library.raw(); 1321 ctxt_library = each_library.raw();
1322 break; 1322 break;
1323 } 1323 }
1324 } 1324 }
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
2117 } 2117 }
2118 2118
2119 DEFINE_NATIVE_ENTRY(TypeMirror_moreSpecificTest, 2) { 2119 DEFINE_NATIVE_ENTRY(TypeMirror_moreSpecificTest, 2) {
2120 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); 2120 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0));
2121 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); 2121 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1));
2122 return Bool::Get(a.IsMoreSpecificThan(b, NULL)).raw(); 2122 return Bool::Get(a.IsMoreSpecificThan(b, NULL)).raw();
2123 } 2123 }
2124 2124
2125 2125
2126 } // namespace dart 2126 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698