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

Side by Side Diff: vm/code_generator.cc

Issue 10874072: Use the return value of vm native methods to set the return value, (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 3 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
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 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 // Returns: RawCode object or NULL (method not found or not compileable). 785 // Returns: RawCode object or NULL (method not found or not compileable).
786 // This is called by the megamorphic stub when instance call does not need to be 786 // This is called by the megamorphic stub when instance call does not need to be
787 // patched. 787 // patched.
788 // Used by megamorphic lookup/no-such-method-handling. 788 // Used by megamorphic lookup/no-such-method-handling.
789 DEFINE_RUNTIME_ENTRY(ResolveCompileInstanceFunction, 1) { 789 DEFINE_RUNTIME_ENTRY(ResolveCompileInstanceFunction, 1) {
790 ASSERT(arguments.Count() == 790 ASSERT(arguments.Count() ==
791 kResolveCompileInstanceFunctionRuntimeEntry.argument_count()); 791 kResolveCompileInstanceFunctionRuntimeEntry.argument_count());
792 const Instance& receiver = Instance::CheckedHandle(arguments.At(0)); 792 const Instance& receiver = Instance::CheckedHandle(arguments.At(0));
793 const Code& code = Code::Handle( 793 const Code& code = Code::Handle(
794 ResolveCompileInstanceCallTarget(isolate, receiver)); 794 ResolveCompileInstanceCallTarget(isolate, receiver));
795 arguments.SetReturn(Code::Handle(code.raw())); 795 arguments.SetReturn(code);
796 } 796 }
797 797
798 798
799 // Gets called from debug stub when code reaches a breakpoint. 799 // Gets called from debug stub when code reaches a breakpoint.
800 // Arg0: function object of the static function that was about to be called. 800 // Arg0: function object of the static function that was about to be called.
801 DEFINE_RUNTIME_ENTRY(BreakpointStaticHandler, 1) { 801 DEFINE_RUNTIME_ENTRY(BreakpointStaticHandler, 1) {
802 ASSERT(arguments.Count() == 802 ASSERT(arguments.Count() ==
803 kBreakpointStaticHandlerRuntimeEntry.argument_count()); 803 kBreakpointStaticHandlerRuntimeEntry.argument_count());
804 ASSERT(isolate->debugger() != NULL); 804 ASSERT(isolate->debugger() != NULL);
805 isolate->debugger()->SignalBpReached(); 805 isolate->debugger()->SignalBpReached();
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1607 function.set_usage_counter(0); 1607 function.set_usage_counter(0);
1608 function.set_deoptimization_counter(function.deoptimization_counter() + 1); 1608 function.set_deoptimization_counter(function.deoptimization_counter() + 1);
1609 1609
1610 if (function.HasOptimizedCode()) { 1610 if (function.HasOptimizedCode()) {
1611 function.SwitchToUnoptimizedCode(); 1611 function.SwitchToUnoptimizedCode();
1612 } 1612 }
1613 } 1613 }
1614 END_LEAF_RUNTIME_ENTRY 1614 END_LEAF_RUNTIME_ENTRY
1615 1615
1616 } // namespace dart 1616 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698