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

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

Issue 10005010: Implement object allocation/construction as effect (no result), sequence labels and unchaining fro… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 | « no previous file | runtime/vm/code_generator_x64.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/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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 ASSERT(num_context_variables > 0); 953 ASSERT(num_context_variables > 0);
954 GenerateLoadVariable(CTX, *parsed_function_.saved_context_var()); 954 GenerateLoadVariable(CTX, *parsed_function_.saved_context_var());
955 } else if (num_context_variables > 0) { 955 } else if (num_context_variables > 0) {
956 __ movl(CTX, FieldAddress(CTX, Context::parent_offset())); 956 __ movl(CTX, FieldAddress(CTX, Context::parent_offset()));
957 } 957 }
958 958
959 // If this node sequence is labeled, a break out of the sequence will have 959 // If this node sequence is labeled, a break out of the sequence will have
960 // taken care of unchaining the context. 960 // taken care of unchaining the context.
961 if (node_sequence->label() != NULL) { 961 if (node_sequence->label() != NULL) {
962 __ Bind(node_sequence->label()->break_label()); 962 __ Bind(node_sequence->label()->break_label());
963 963 // Outermost sequence cannot have a label.
964 // The context saved on entry must be restored. 964 ASSERT(node_sequence != parsed_function_.node_sequence());
965 if ((node_sequence == parsed_function_.node_sequence()) &&
966 (parsed_function_.saved_context_var() != NULL)) {
967 GenerateLoadVariable(CTX, *parsed_function_.saved_context_var());
968 }
969 } 965 }
970 set_context_level(previous_context_level); 966 set_context_level(previous_context_level);
971 } 967 }
972 968
973 969
974 void CodeGenerator::VisitArgumentListNode(ArgumentListNode* arguments) { 970 void CodeGenerator::VisitArgumentListNode(ArgumentListNode* arguments) {
975 for (int i = 0; i < arguments->length(); i++) { 971 for (int i = 0; i < arguments->length(); i++) {
976 AstNode* argument = arguments->NodeAt(i); 972 AstNode* argument = arguments->NodeAt(i);
977 argument->Visit(this); 973 argument->Visit(this);
978 } 974 }
(...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after
2841 const Error& error = Error::Handle( 2837 const Error& error = Error::Handle(
2842 Parser::FormatError(script, token_index, "Error", format, args)); 2838 Parser::FormatError(script, token_index, "Error", format, args));
2843 va_end(args); 2839 va_end(args);
2844 Isolate::Current()->long_jump_base()->Jump(1, error); 2840 Isolate::Current()->long_jump_base()->Jump(1, error);
2845 UNREACHABLE(); 2841 UNREACHABLE();
2846 } 2842 }
2847 2843
2848 } // namespace dart 2844 } // namespace dart
2849 2845
2850 #endif // defined TARGET_ARCH_IA32 2846 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/code_generator_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698