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

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

Issue 75123002: Version 1.0.0.6 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 | dart/runtime/vm/class_finalizer.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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 Exceptions::ThrowByType(Exceptions::kMirroredCompilationError, args); 45 Exceptions::ThrowByType(Exceptions::kMirroredCompilationError, args);
46 UNREACHABLE(); 46 UNREACHABLE();
47 } 47 }
48 48
49 49
50 static void ThrowInvokeError(const Error& error) { 50 static void ThrowInvokeError(const Error& error) {
51 if (FLAG_use_mirrored_compilation_error && error.IsLanguageError()) { 51 if (FLAG_use_mirrored_compilation_error && error.IsLanguageError()) {
52 // A compilation error that was delayed by lazy compilation. 52 // A compilation error that was delayed by lazy compilation.
53 const LanguageError& compilation_error = LanguageError::Cast(error); 53 const LanguageError& compilation_error = LanguageError::Cast(error);
54 String& message = String::Handle(compilation_error.message()); 54 String& message = String::Handle(compilation_error.FormatMessage());
55 ThrowMirroredCompilationError(message); 55 ThrowMirroredCompilationError(message);
56 UNREACHABLE(); 56 UNREACHABLE();
57 } 57 }
58 Exceptions::PropagateError(error); 58 Exceptions::PropagateError(error);
59 UNREACHABLE(); 59 UNREACHABLE();
60 } 60 }
61 61
62 62
63 // Conventions: 63 // Conventions:
64 // * For throwing a NSM in a class klass we use its runtime type as receiver, 64 // * For throwing a NSM in a class klass we use its runtime type as receiver,
(...skipping 1895 matching lines...) Expand 10 before | Expand all | Expand 10 after
1960 } 1960 }
1961 1961
1962 1962
1963 DEFINE_NATIVE_ENTRY(VariableMirror_type, 1) { 1963 DEFINE_NATIVE_ENTRY(VariableMirror_type, 1) {
1964 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0)); 1964 GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
1965 const Field& field = Field::Handle(ref.GetFieldReferent()); 1965 const Field& field = Field::Handle(ref.GetFieldReferent());
1966 return field.type(); 1966 return field.type();
1967 } 1967 }
1968 1968
1969 } // namespace dart 1969 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | dart/runtime/vm/class_finalizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698