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

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

Issue 908433002: - Make sure to fail early if an non-stacktrace is passed into the VM (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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 | runtime/vm/dart_api_impl.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) 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 "vm/code_generator.h" 5 #include "vm/code_generator.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast.h" 8 #include "vm/ast.h"
9 #include "vm/code_patcher.h" 9 #include "vm/code_patcher.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 DEFINE_RUNTIME_ENTRY(Throw, 1) { 632 DEFINE_RUNTIME_ENTRY(Throw, 1) {
633 const Instance& exception = 633 const Instance& exception =
634 Instance::CheckedHandle(isolate, arguments.ArgAt(0)); 634 Instance::CheckedHandle(isolate, arguments.ArgAt(0));
635 Exceptions::Throw(isolate, exception); 635 Exceptions::Throw(isolate, exception);
636 } 636 }
637 637
638 638
639 DEFINE_RUNTIME_ENTRY(ReThrow, 2) { 639 DEFINE_RUNTIME_ENTRY(ReThrow, 2) {
640 const Instance& exception = 640 const Instance& exception =
641 Instance::CheckedHandle(isolate, arguments.ArgAt(0)); 641 Instance::CheckedHandle(isolate, arguments.ArgAt(0));
642 const Instance& stacktrace = 642 const Stacktrace& stacktrace =
643 Instance::CheckedHandle(isolate, arguments.ArgAt(1)); 643 Stacktrace::CheckedHandle(isolate, arguments.ArgAt(1));
644 Exceptions::ReThrow(isolate, exception, stacktrace); 644 Exceptions::ReThrow(isolate, exception, stacktrace);
645 } 645 }
646 646
647 647
648 // Patches static call in optimized code with the target's entry point. 648 // Patches static call in optimized code with the target's entry point.
649 // Compiles target if necessary. 649 // Compiles target if necessary.
650 DEFINE_RUNTIME_ENTRY(PatchStaticCall, 0) { 650 DEFINE_RUNTIME_ENTRY(PatchStaticCall, 0) {
651 DartFrameIterator iterator; 651 DartFrameIterator iterator;
652 StackFrame* caller_frame = iterator.NextFrame(); 652 StackFrame* caller_frame = iterator.NextFrame();
653 ASSERT(caller_frame != NULL); 653 ASSERT(caller_frame != NULL);
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after
1679 const intptr_t elm_size = old_data.ElementSizeInBytes(); 1679 const intptr_t elm_size = old_data.ElementSizeInBytes();
1680 const TypedData& new_data = 1680 const TypedData& new_data =
1681 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); 1681 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld));
1682 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); 1682 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size);
1683 typed_data_cell.SetAt(0, new_data); 1683 typed_data_cell.SetAt(0, new_data);
1684 arguments.SetReturn(new_data); 1684 arguments.SetReturn(new_data);
1685 } 1685 }
1686 1686
1687 1687
1688 } // namespace dart 1688 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698