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

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

Issue 8678020: Do not type checks at returns of implicit getter. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years 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 | « no previous file | no next file » | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/globals.h" // Needed here to get TARGET_ARCH_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/code_generator.h" 8 #include "vm/code_generator.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 } else { 790 } else {
791 __ LoadObject(EAX, literal); 791 __ LoadObject(EAX, literal);
792 } 792 }
793 } else { 793 } else {
794 // Pop the previously evaluated result value into EAX. 794 // Pop the previously evaluated result value into EAX.
795 __ popl(EAX); 795 __ popl(EAX);
796 } 796 }
797 797
798 // Generate type check. 798 // Generate type check.
799 if (FLAG_enable_type_checks) { 799 if (FLAG_enable_type_checks) {
800 GenerateAssertAssignable( 800 RawFunction::Kind kind = parsed_function().function().kind();
801 node->id(), 801 if ((kind != RawFunction::kImplicitGetter) &&
802 node->value()->token_index(), 802 (kind != RawFunction::kConstImplicitGetter)) {
803 Type::ZoneHandle(parsed_function().function().result_type()), 803 GenerateAssertAssignable(
804 String::ZoneHandle(String::NewSymbol("function result"))); 804 node->id(),
805 node->value()->token_index(),
806 Type::ZoneHandle(parsed_function().function().result_type()),
807 String::ZoneHandle(String::NewSymbol("function result")));
808 }
805 } 809 }
806 // Unchain the context(s) up to context level 0. 810 // Unchain the context(s) up to context level 0.
807 int context_level = state()->context_level(); 811 int context_level = state()->context_level();
808 ASSERT(context_level >= 0); 812 ASSERT(context_level >= 0);
809 while (context_level-- > 0) { 813 while (context_level-- > 0) {
810 __ movl(CTX, FieldAddress(CTX, Context::parent_offset())); 814 __ movl(CTX, FieldAddress(CTX, Context::parent_offset()));
811 } 815 }
812 #ifdef DEBUG 816 #ifdef DEBUG
813 // Check that the entry stack size matches the exit stack size. 817 // Check that the entry stack size matches the exit stack size.
814 __ movl(EDX, EBP); 818 __ movl(EDX, EBP);
(...skipping 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after
2759 message_buffer, kMessageBufferSize, 2763 message_buffer, kMessageBufferSize,
2760 format, args); 2764 format, args);
2761 va_end(args); 2765 va_end(args);
2762 Isolate::Current()->long_jump_base()->Jump(1, message_buffer); 2766 Isolate::Current()->long_jump_base()->Jump(1, message_buffer);
2763 UNREACHABLE(); 2767 UNREACHABLE();
2764 } 2768 }
2765 2769
2766 } // namespace dart 2770 } // namespace dart
2767 2771
2768 #endif // defined TARGET_ARCH_IA32 2772 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698