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

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

Issue 11342027: Handle super call to unary operators (Closed) Base URL: http://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/vm/ast.h ('k') | runtime/vm/parser.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/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "vm/ast_printer.h" 7 #include "vm/ast_printer.h"
8 #include "vm/code_descriptors.h" 8 #include "vm/code_descriptors.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 2651 matching lines...) Expand 10 before | Expand all | Expand 10 after
2662 EffectGraphVisitor for_finally_block(owner(), temp_index()); 2662 EffectGraphVisitor for_finally_block(owner(), temp_index());
2663 node->finally_block()->Visit(&for_finally_block); 2663 node->finally_block()->Visit(&for_finally_block);
2664 Append(for_finally_block); 2664 Append(for_finally_block);
2665 } 2665 }
2666 } 2666 }
2667 2667
2668 2668
2669 // Looks up dynamic method noSuchMethod in target_class 2669 // Looks up dynamic method noSuchMethod in target_class
2670 // (including its super class chain) and builds a static call to it. 2670 // (including its super class chain) and builds a static call to it.
2671 StaticCallInstr* EffectGraphVisitor::BuildStaticNoSuchMethodCall( 2671 StaticCallInstr* EffectGraphVisitor::BuildStaticNoSuchMethodCall(
2672 const Class& target_class, 2672 const Class& target_class,
2673 AstNode* receiver, 2673 AstNode* receiver,
2674 const String& method_name, 2674 const String& method_name,
2675 ArgumentListNode* method_arguments) { 2675 ArgumentListNode* method_arguments) {
2676 const String& no_such_method_name = 2676 const String& no_such_method_name =
2677 String::ZoneHandle(Symbols::NoSuchMethod()); 2677 String::ZoneHandle(Symbols::NoSuchMethod());
2678 const Function& no_such_method_func = Function::ZoneHandle( 2678 const Function& no_such_method_func = Function::ZoneHandle(
2679 Resolver::ResolveDynamicAnyArgs(target_class, no_such_method_name)); 2679 Resolver::ResolveDynamicAnyArgs(target_class, no_such_method_name));
2680 // We are guaranteed to find noSuchMethod of class Object. 2680 // We are guaranteed to find noSuchMethod of class Object.
2681 ASSERT(!no_such_method_func.IsNull()); 2681 ASSERT(!no_such_method_func.IsNull());
2682 2682
2683 const intptr_t args_pos = method_arguments->token_pos(); 2683 const intptr_t args_pos = method_arguments->token_pos();
2684 ArgumentListNode* arguments = new ArgumentListNode(args_pos); 2684 ArgumentListNode* arguments = new ArgumentListNode(args_pos);
2685 // The first argument is the receiver. 2685 // The first argument is the receiver.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
2816 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 2816 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
2817 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 2817 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
2818 OS::SNPrint(chars, len, kFormat, function_name, reason); 2818 OS::SNPrint(chars, len, kFormat, function_name, reason);
2819 const Error& error = Error::Handle( 2819 const Error& error = Error::Handle(
2820 LanguageError::New(String::Handle(String::New(chars)))); 2820 LanguageError::New(String::Handle(String::New(chars))));
2821 Isolate::Current()->long_jump_base()->Jump(1, error); 2821 Isolate::Current()->long_jump_base()->Jump(1, error);
2822 } 2822 }
2823 2823
2824 2824
2825 } // namespace dart 2825 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698