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

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

Issue 10143004: Map malformed function result type and malformed function parameter type to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.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 "vm/code_generator.h" 5 #include "vm/code_generator.h"
6 6
7 #include "vm/code_patcher.h" 7 #include "vm/code_patcher.h"
8 #include "vm/compiler.h" 8 #include "vm/compiler.h"
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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 String::Handle(type.Name()).ToCString()); 344 String::Handle(type.Name()).ToCString());
345 } 345 }
346 DartFrameIterator iterator; 346 DartFrameIterator iterator;
347 DartFrame* caller_frame = iterator.NextFrame(); 347 DartFrame* caller_frame = iterator.NextFrame();
348 ASSERT(caller_frame != NULL); 348 ASSERT(caller_frame != NULL);
349 const Function& function = Function::Handle( 349 const Function& function = Function::Handle(
350 caller_frame->LookupDartFunction()); 350 caller_frame->LookupDartFunction());
351 OS::Print(" -> Function %s\n", function.ToFullyQualifiedCString()); 351 OS::Print(" -> Function %s\n", function.ToFullyQualifiedCString());
352 } 352 }
353 if (!result.value() && !malformed_error.IsNull()) { 353 if (!result.value() && !malformed_error.IsNull()) {
354 ASSERT(FLAG_enable_type_checks);
355 // Throw a dynamic type error only if the instanceof test fails. 354 // Throw a dynamic type error only if the instanceof test fails.
356 String& malformed_error_message = String::Handle( 355 String& malformed_error_message = String::Handle(
357 String::New(malformed_error.ToErrorCString())); 356 String::New(malformed_error.ToErrorCString()));
358 const String& no_name = String::Handle(String::NewSymbol("")); 357 const String& no_name = String::Handle(String::NewSymbol(""));
359 Exceptions::CreateAndThrowTypeError( 358 Exceptions::CreateAndThrowTypeError(
360 location, no_name, no_name, no_name, malformed_error_message); 359 location, no_name, no_name, no_name, malformed_error_message);
361 UNREACHABLE(); 360 UNREACHABLE();
362 } 361 }
363 // Update cache: add class of instance and result. 362 // Update cache: add class of instance and result.
364 if (type.IsInstantiated() && 363 if (type.IsInstantiated() &&
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 } 1394 }
1396 } 1395 }
1397 } 1396 }
1398 // The cache is null terminated, therefore the loop above should never 1397 // The cache is null terminated, therefore the loop above should never
1399 // terminate by itself. 1398 // terminate by itself.
1400 UNREACHABLE(); 1399 UNREACHABLE();
1401 return Code::null(); 1400 return Code::null();
1402 } 1401 }
1403 1402
1404 } // namespace dart 1403 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698