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

Side by Side Diff: runtime/vm/code_generator_x64.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 | « runtime/vm/code_generator_ia32.cc ('k') | runtime/vm/flow_graph_builder.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/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
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 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 ASSERT(num_context_variables > 0); 895 ASSERT(num_context_variables > 0);
896 GenerateLoadVariable(CTX, *parsed_function_.saved_context_var()); 896 GenerateLoadVariable(CTX, *parsed_function_.saved_context_var());
897 } else if (num_context_variables > 0) { 897 } else if (num_context_variables > 0) {
898 __ movq(CTX, FieldAddress(CTX, Context::parent_offset())); 898 __ movq(CTX, FieldAddress(CTX, Context::parent_offset()));
899 } 899 }
900 900
901 // If this node sequence is labeled, a break out of the sequence will have 901 // If this node sequence is labeled, a break out of the sequence will have
902 // taken care of unchaining the context. 902 // taken care of unchaining the context.
903 if (node_sequence->label() != NULL) { 903 if (node_sequence->label() != NULL) {
904 __ Bind(node_sequence->label()->break_label()); 904 __ Bind(node_sequence->label()->break_label());
905 905 // Outermost sequence cannot have a label.
906 // The context saved on entry must be restored. 906 ASSERT(node_sequence != parsed_function_.node_sequence());
907 if ((node_sequence == parsed_function_.node_sequence()) &&
908 (parsed_function_.saved_context_var() != NULL)) {
909 GenerateLoadVariable(CTX, *parsed_function_.saved_context_var());
910 }
911 } 907 }
912 set_context_level(previous_context_level); 908 set_context_level(previous_context_level);
913 } 909 }
914 910
915 911
916 void CodeGenerator::VisitArgumentListNode(ArgumentListNode* arguments) { 912 void CodeGenerator::VisitArgumentListNode(ArgumentListNode* arguments) {
917 for (int i = 0; i < arguments->length(); i++) { 913 for (int i = 0; i < arguments->length(); i++) {
918 AstNode* argument = arguments->NodeAt(i); 914 AstNode* argument = arguments->NodeAt(i);
919 argument->Visit(this); 915 argument->Visit(this);
920 } 916 }
(...skipping 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after
2718 const Error& error = Error::Handle( 2714 const Error& error = Error::Handle(
2719 Parser::FormatError(script, token_index, "Error", format, args)); 2715 Parser::FormatError(script, token_index, "Error", format, args));
2720 va_end(args); 2716 va_end(args);
2721 Isolate::Current()->long_jump_base()->Jump(1, error); 2717 Isolate::Current()->long_jump_base()->Jump(1, error);
2722 UNREACHABLE(); 2718 UNREACHABLE();
2723 } 2719 }
2724 2720
2725 } // namespace dart 2721 } // namespace dart
2726 2722
2727 #endif // defined TARGET_ARCH_X64 2723 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/code_generator_ia32.cc ('k') | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698