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

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

Issue 14652008: Fix error reporting when calling static methods and closures withh mismatched arguments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/dart_api_impl_test.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/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/code_descriptors.h" 9 #include "vm/code_descriptors.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 3222 matching lines...) Expand 10 before | Expand all | Expand 10 after
3233 arguments->Add(PushArgument(receiver_value)); 3233 arguments->Add(PushArgument(receiver_value));
3234 // String memberName. 3234 // String memberName.
3235 const String& member_name = String::ZoneHandle(Symbols::New(function_name)); 3235 const String& member_name = String::ZoneHandle(Symbols::New(function_name));
3236 Value* member_name_value = Bind(new ConstantInstr(member_name)); 3236 Value* member_name_value = Bind(new ConstantInstr(member_name));
3237 arguments->Add(PushArgument(member_name_value)); 3237 arguments->Add(PushArgument(member_name_value));
3238 // Smi invocation_type. 3238 // Smi invocation_type.
3239 Value* invocation_type_value = Bind(new ConstantInstr( 3239 Value* invocation_type_value = Bind(new ConstantInstr(
3240 Smi::ZoneHandle(Smi::New(invocation_type)))); 3240 Smi::ZoneHandle(Smi::New(invocation_type))));
3241 arguments->Add(PushArgument(invocation_type_value)); 3241 arguments->Add(PushArgument(invocation_type_value));
3242 // List arguments. 3242 // List arguments.
3243 // TODO(regis): Pass arguments.
3243 Value* arguments_value = Bind(new ConstantInstr(Array::ZoneHandle())); 3244 Value* arguments_value = Bind(new ConstantInstr(Array::ZoneHandle()));
3244 arguments->Add(PushArgument(arguments_value)); 3245 arguments->Add(PushArgument(arguments_value));
3245 // List argumentNames. 3246 // List argumentNames.
3246 Value* argument_names_value = 3247 Value* argument_names_value =
3247 Bind(new ConstantInstr(Array::ZoneHandle())); 3248 Bind(new ConstantInstr(Array::ZoneHandle()));
3248 arguments->Add(PushArgument(argument_names_value)); 3249 arguments->Add(PushArgument(argument_names_value));
3249 // List existingArgumentNames. 3250 // List existingArgumentNames.
3250 Value* existing_argument_names_value = 3251 Value* existing_argument_names_value =
3251 Bind(new ConstantInstr(Array::ZoneHandle())); 3252 Bind(new ConstantInstr(Array::ZoneHandle()));
3252 arguments->Add(PushArgument(existing_argument_names_value)); 3253 arguments->Add(PushArgument(existing_argument_names_value));
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
3372 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 3373 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
3373 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 3374 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
3374 OS::SNPrint(chars, len, kFormat, function_name, reason); 3375 OS::SNPrint(chars, len, kFormat, function_name, reason);
3375 const Error& error = Error::Handle( 3376 const Error& error = Error::Handle(
3376 LanguageError::New(String::Handle(String::New(chars)))); 3377 LanguageError::New(String::Handle(String::New(chars))));
3377 Isolate::Current()->long_jump_base()->Jump(1, error); 3378 Isolate::Current()->long_jump_base()->Jump(1, error);
3378 } 3379 }
3379 3380
3380 3381
3381 } // namespace dart 3382 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698