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

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

Issue 249533003: Support evaluation of expressions in context of a stack frame (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/include/dart_debugger_api.h ('k') | runtime/vm/compiler_test.cc » ('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 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1438 for (int i = 0; i < num_libraries; i++) { 1438 for (int i = 0; i < num_libraries; i++) {
1439 each_library ^= libraries.At(i); 1439 each_library ^= libraries.At(i);
1440 library_key = each_library.private_key(); 1440 library_key = each_library.private_key();
1441 if (library_key.Equals(private_key)) { 1441 if (library_key.Equals(private_key)) {
1442 ctxt_library = each_library.raw(); 1442 ctxt_library = each_library.raw();
1443 break; 1443 break;
1444 } 1444 }
1445 } 1445 }
1446 } 1446 }
1447 ASSERT(!ctxt_library.IsNull()); 1447 ASSERT(!ctxt_library.IsNull());
1448 return ctxt_library.Evaluate(expression); 1448 return ctxt_library.Evaluate(expression,
1449 Array::empty_array(),
1450 Array::empty_array());
1449 } 1451 }
1450 1452
1451 DEFINE_NATIVE_ENTRY(TypedefMirror_declaration, 1) { 1453 DEFINE_NATIVE_ENTRY(TypedefMirror_declaration, 1) {
1452 GET_NON_NULL_NATIVE_ARGUMENT(Type, type, arguments->NativeArgAt(0)); 1454 GET_NON_NULL_NATIVE_ARGUMENT(Type, type, arguments->NativeArgAt(0));
1453 const Class& cls = Class::Handle(type.type_class()); 1455 const Class& cls = Class::Handle(type.type_class());
1454 // We represent typedefs as non-canonical signature classes. 1456 // We represent typedefs as non-canonical signature classes.
1455 ASSERT(cls.IsSignatureClass() && !cls.IsCanonicalSignatureClass()); 1457 ASSERT(cls.IsSignatureClass() && !cls.IsCanonicalSignatureClass());
1456 return CreateTypedefMirror(cls, 1458 return CreateTypedefMirror(cls,
1457 AbstractType::Handle(cls.DeclarationType()), 1459 AbstractType::Handle(cls.DeclarationType()),
1458 Bool::True(), // is_declaration 1460 Bool::True(), // is_declaration
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
2246 } 2248 }
2247 2249
2248 DEFINE_NATIVE_ENTRY(TypeMirror_moreSpecificTest, 2) { 2250 DEFINE_NATIVE_ENTRY(TypeMirror_moreSpecificTest, 2) {
2249 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); 2251 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0));
2250 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); 2252 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1));
2251 return Bool::Get(a.IsMoreSpecificThan(b, NULL)).raw(); 2253 return Bool::Get(a.IsMoreSpecificThan(b, NULL)).raw();
2252 } 2254 }
2253 2255
2254 2256
2255 } // namespace dart 2257 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/include/dart_debugger_api.h ('k') | runtime/vm/compiler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698