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

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

Issue 8678031: Optimize type checks of list and map literals. (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 | « runtime/vm/ast_printer.cc ('k') | runtime/vm/dart_api_impl.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) 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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 } 856 }
857 } 857 }
858 858
859 859
860 void CodeGenerator::VisitTypeNode(TypeNode* node) { 860 void CodeGenerator::VisitTypeNode(TypeNode* node) {
861 // Type nodes are handled specially by the code generator. 861 // Type nodes are handled specially by the code generator.
862 UNREACHABLE(); 862 UNREACHABLE();
863 } 863 }
864 864
865 865
866 void CodeGenerator::VisitAssignableNode(AssignableNode* node) {
867 ASSERT(FLAG_enable_type_checks);
868 node->expr()->Visit(this);
869 __ popl(EAX);
870 GenerateAssertAssignable(node->id(),
871 node->token_index(),
872 node->type(),
873 node->dst_name());
874 if (IsResultNeeded(node)) {
875 __ pushl(EAX);
876 }
877 }
878
879
866 void CodeGenerator::VisitClosureNode(ClosureNode* node) { 880 void CodeGenerator::VisitClosureNode(ClosureNode* node) {
867 const Function& function = node->function(); 881 const Function& function = node->function();
868 if (function.IsNonImplicitClosureFunction()) { 882 if (function.IsNonImplicitClosureFunction()) {
869 const int current_context_level = state()->context_level(); 883 const int current_context_level = state()->context_level();
870 const ContextScope& context_scope = ContextScope::ZoneHandle( 884 const ContextScope& context_scope = ContextScope::ZoneHandle(
871 node->scope()->PreserveOuterScope(current_context_level)); 885 node->scope()->PreserveOuterScope(current_context_level));
872 ASSERT(!function.HasCode()); 886 ASSERT(!function.HasCode());
873 ASSERT(function.context_scope() == ContextScope::null()); 887 ASSERT(function.context_scope() == ContextScope::null());
874 function.set_context_scope(context_scope); 888 function.set_context_scope(context_scope);
875 } else { 889 } else {
(...skipping 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after
2764 message_buffer, kMessageBufferSize, 2778 message_buffer, kMessageBufferSize,
2765 format, args); 2779 format, args);
2766 va_end(args); 2780 va_end(args);
2767 Isolate::Current()->long_jump_base()->Jump(1, message_buffer); 2781 Isolate::Current()->long_jump_base()->Jump(1, message_buffer);
2768 UNREACHABLE(); 2782 UNREACHABLE();
2769 } 2783 }
2770 2784
2771 } // namespace dart 2785 } // namespace dart
2772 2786
2773 #endif // defined TARGET_ARCH_IA32 2787 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/ast_printer.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698