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

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

Issue 9072012: Fix issues 968 and 998 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 11 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/parser.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) 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/code_generator.h" 5 #include "vm/code_generator.h"
6 6
7 #include "vm/code_index_table.h" 7 #include "vm/code_index_table.h"
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_api_impl.h" 10 #include "vm/dart_api_impl.h"
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 // Arg0: non-closure object. 847 // Arg0: non-closure object.
848 // Arg1: arguments array. 848 // Arg1: arguments array.
849 DEFINE_RUNTIME_ENTRY(ReportObjectNotClosure, 2) { 849 DEFINE_RUNTIME_ENTRY(ReportObjectNotClosure, 2) {
850 ASSERT(arguments.Count() == 850 ASSERT(arguments.Count() ==
851 kReportObjectNotClosureRuntimeEntry.argument_count()); 851 kReportObjectNotClosureRuntimeEntry.argument_count());
852 const Instance& bad_closure = Instance::CheckedHandle(arguments.At(0)); 852 const Instance& bad_closure = Instance::CheckedHandle(arguments.At(0));
853 if (bad_closure.IsNull()) { 853 if (bad_closure.IsNull()) {
854 GrowableArray<const Object*> args; 854 GrowableArray<const Object*> args;
855 Exceptions::ThrowByType(Exceptions::kObjectNotClosure, args); 855 Exceptions::ThrowByType(Exceptions::kObjectNotClosure, args);
856 } 856 }
857 // const Array& arguments = Array::CheckedHandle(arguments.At(1));
858 OS::PrintErr("object '%s' is not a closure\n", bad_closure.ToCString());
859 GrowableArray<const Object*> args; 857 GrowableArray<const Object*> args;
860 Exceptions::ThrowByType(Exceptions::kObjectNotClosure, args); 858 Exceptions::ThrowByType(Exceptions::kObjectNotClosure, args);
861 } 859 }
862 860
863 861
864 DEFINE_RUNTIME_ENTRY(ClosureArgumentMismatch, 0) { 862 DEFINE_RUNTIME_ENTRY(ClosureArgumentMismatch, 0) {
865 ASSERT(arguments.Count() == 863 ASSERT(arguments.Count() ==
866 kClosureArgumentMismatchRuntimeEntry.argument_count()); 864 kClosureArgumentMismatchRuntimeEntry.argument_count());
867 GrowableArray<const Object*> args; 865 GrowableArray<const Object*> args;
868 Exceptions::ThrowByType(Exceptions::kClosureArgumentMismatch, args); 866 Exceptions::ThrowByType(Exceptions::kClosureArgumentMismatch, args);
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 } 1106 }
1109 } 1107 }
1110 } 1108 }
1111 // The cache is null terminated, therefore the loop above should never 1109 // The cache is null terminated, therefore the loop above should never
1112 // terminate by itself. 1110 // terminate by itself.
1113 UNREACHABLE(); 1111 UNREACHABLE();
1114 return Code::null(); 1112 return Code::null();
1115 } 1113 }
1116 1114
1117 } // namespace dart 1115 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698