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

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

Issue 2517953002: Revert "Merge of source position information from kernel-sdk." (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « runtime/vm/bootstrap_nocore.cc ('k') | runtime/vm/kernel.h » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/exceptions.h" 5 #include "vm/exceptions.h"
6 6
7 #include "platform/address_sanitizer.h" 7 #include "platform/address_sanitizer.h"
8 8
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 const Array& args = Array::Handle(zone, Array::New(4)); 499 const Array& args = Array::Handle(zone, Array::New(4));
500 500
501 ExceptionType exception_type = 501 ExceptionType exception_type =
502 (bound_error_msg.IsNull() && 502 (bound_error_msg.IsNull() &&
503 (dst_name.raw() == Symbols::InTypeCast().raw())) 503 (dst_name.raw() == Symbols::InTypeCast().raw()))
504 ? kCast 504 ? kCast
505 : kType; 505 : kType;
506 506
507 DartFrameIterator iterator; 507 DartFrameIterator iterator;
508 const Script& script = Script::Handle(zone, GetCallerScript(&iterator)); 508 const Script& script = Script::Handle(zone, GetCallerScript(&iterator));
509 intptr_t line = -1; 509 intptr_t line;
510 intptr_t column = -1; 510 intptr_t column = -1;
511 ASSERT(!script.IsNull()); 511 if (script.HasSource()) {
512 if (location.IsReal()) {
513 script.GetTokenLocation(location, &line, &column); 512 script.GetTokenLocation(location, &line, &column);
513 } else {
514 script.GetTokenLocation(location, &line, NULL);
514 } 515 }
515 // Initialize '_url', '_line', and '_column' arguments. 516 // Initialize '_url', '_line', and '_column' arguments.
516 args.SetAt(0, String::Handle(zone, script.url())); 517 args.SetAt(0, String::Handle(zone, script.url()));
517 args.SetAt(1, Smi::Handle(zone, Smi::New(line))); 518 args.SetAt(1, Smi::Handle(zone, Smi::New(line)));
518 args.SetAt(2, Smi::Handle(zone, Smi::New(column))); 519 args.SetAt(2, Smi::Handle(zone, Smi::New(column)));
519 520
520 // Construct '_errorMsg'. 521 // Construct '_errorMsg'.
521 const GrowableObjectArray& pieces = 522 const GrowableObjectArray& pieces =
522 GrowableObjectArray::Handle(zone, GrowableObjectArray::New(20)); 523 GrowableObjectArray::Handle(zone, GrowableObjectArray::New(20));
523 524
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 class_name = &Symbols::_CompileTimeError(); 783 class_name = &Symbols::_CompileTimeError();
783 break; 784 break;
784 } 785 }
785 786
786 return DartLibraryCalls::InstanceCreate(library, *class_name, 787 return DartLibraryCalls::InstanceCreate(library, *class_name,
787 *constructor_name, arguments); 788 *constructor_name, arguments);
788 } 789 }
789 790
790 791
791 } // namespace dart 792 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap_nocore.cc ('k') | runtime/vm/kernel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698