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

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

Issue 11417058: Revert "Remove NullPointerException." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « runtime/lib/string.cc ('k') | runtime/vm/exceptions.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) 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 "vm/code_generator.h" 5 #include "vm/code_generator.h"
6 6
7 #include "vm/assembler_macros.h" 7 #include "vm/assembler_macros.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 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 DEFINE_RUNTIME_ENTRY(ReportObjectNotClosure, 2) { 1372 DEFINE_RUNTIME_ENTRY(ReportObjectNotClosure, 2) {
1373 ASSERT(arguments.ArgCount() == 1373 ASSERT(arguments.ArgCount() ==
1374 kReportObjectNotClosureRuntimeEntry.argument_count()); 1374 kReportObjectNotClosureRuntimeEntry.argument_count());
1375 const Instance& instance = Instance::CheckedHandle(arguments.ArgAt(0)); 1375 const Instance& instance = Instance::CheckedHandle(arguments.ArgAt(0));
1376 const Array& function_args = Array::CheckedHandle(arguments.ArgAt(1)); 1376 const Array& function_args = Array::CheckedHandle(arguments.ArgAt(1));
1377 const String& function_name = String::Handle(Symbols::Call()); 1377 const String& function_name = String::Handle(Symbols::Call());
1378 GrowableArray<const Object*> dart_arguments(5); 1378 GrowableArray<const Object*> dart_arguments(5);
1379 if (instance.IsNull()) { 1379 if (instance.IsNull()) {
1380 dart_arguments.Add(&function_name); 1380 dart_arguments.Add(&function_name);
1381 dart_arguments.Add(&function_args); 1381 dart_arguments.Add(&function_args);
1382 Exceptions::ThrowByType(Exceptions::kNullThrown, dart_arguments); 1382 Exceptions::ThrowByType(Exceptions::kNullPointer, dart_arguments);
1383 UNREACHABLE(); 1383 UNREACHABLE();
1384 } 1384 }
1385 1385
1386 // TODO(regis): Resolve and invoke "call" method, if existing. 1386 // TODO(regis): Resolve and invoke "call" method, if existing.
1387 1387
1388 const Object& null_object = Object::Handle(); 1388 const Object& null_object = Object::Handle();
1389 dart_arguments.Add(&instance); 1389 dart_arguments.Add(&instance);
1390 dart_arguments.Add(&function_name); 1390 dart_arguments.Add(&function_name);
1391 dart_arguments.Add(&function_args); 1391 dart_arguments.Add(&function_args);
1392 dart_arguments.Add(&null_object); 1392 dart_arguments.Add(&null_object);
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 intptr_t line, column; 1944 intptr_t line, column;
1945 script.GetTokenLocation(token_pos, &line, &column); 1945 script.GetTokenLocation(token_pos, &line, &column);
1946 String& line_string = String::Handle(script.GetLine(line)); 1946 String& line_string = String::Handle(script.GetLine(line));
1947 OS::Print(" Function: %s\n", top_function.ToFullyQualifiedCString()); 1947 OS::Print(" Function: %s\n", top_function.ToFullyQualifiedCString());
1948 OS::Print(" Line %"Pd": '%s'\n", line, line_string.ToCString()); 1948 OS::Print(" Line %"Pd": '%s'\n", line, line_string.ToCString());
1949 } 1949 }
1950 } 1950 }
1951 1951
1952 1952
1953 } // namespace dart 1953 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/string.cc ('k') | runtime/vm/exceptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698