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

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

Issue 10283003: - Fix another side effect issue: never add AstNode to sequence unless they are a statement. Added t… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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_x64.cc ('k') | runtime/vm/opt_code_generator_ia32.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/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "vm/ast_printer.h" 7 #include "vm/ast_printer.h"
8 #include "vm/code_descriptors.h" 8 #include "vm/code_descriptors.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after
1916 1916
1917 1917
1918 void EffectGraphVisitor::VisitPrimaryNode(PrimaryNode* node) { 1918 void EffectGraphVisitor::VisitPrimaryNode(PrimaryNode* node) {
1919 // PrimaryNodes are temporary during parsing. 1919 // PrimaryNodes are temporary during parsing.
1920 UNREACHABLE(); 1920 UNREACHABLE();
1921 } 1921 }
1922 1922
1923 1923
1924 // <Expression> ::= LoadLocal { local: LocalVariable } 1924 // <Expression> ::= LoadLocal { local: LocalVariable }
1925 void EffectGraphVisitor::VisitLoadLocalNode(LoadLocalNode* node) { 1925 void EffectGraphVisitor::VisitLoadLocalNode(LoadLocalNode* node) {
1926 return; 1926 if (node->HasPseudo()) {
1927 EffectGraphVisitor for_pseudo(owner(), temp_index());
1928 node->pseudo()->Visit(&for_pseudo);
1929 Append(for_pseudo);
1930 }
1927 } 1931 }
1928 1932
1929 1933
1930 void ValueGraphVisitor::VisitLoadLocalNode(LoadLocalNode* node) { 1934 void ValueGraphVisitor::VisitLoadLocalNode(LoadLocalNode* node) {
1935 EffectGraphVisitor::VisitLoadLocalNode(node);
1931 LoadLocalComp* load = new LoadLocalComp(node->local(), 1936 LoadLocalComp* load = new LoadLocalComp(node->local(),
1932 owner()->context_level()); 1937 owner()->context_level());
1933 ReturnComputation(load); 1938 ReturnComputation(load);
1934 } 1939 }
1935 1940
1936 1941
1937 // <Expression> ::= StoreLocal { local: LocalVariable 1942 // <Expression> ::= StoreLocal { local: LocalVariable
1938 // value: <Expression> } 1943 // value: <Expression> }
1939 void EffectGraphVisitor::VisitStoreLocalNode(StoreLocalNode* node) { 1944 void EffectGraphVisitor::VisitStoreLocalNode(StoreLocalNode* node) {
1940 ValueGraphVisitor for_value(owner(), temp_index()); 1945 ValueGraphVisitor for_value(owner(), temp_index());
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
2891 char* chars = reinterpret_cast<char*>( 2896 char* chars = reinterpret_cast<char*>(
2892 Isolate::Current()->current_zone()->Allocate(len)); 2897 Isolate::Current()->current_zone()->Allocate(len));
2893 OS::SNPrint(chars, len, kFormat, function_name, reason); 2898 OS::SNPrint(chars, len, kFormat, function_name, reason);
2894 const Error& error = Error::Handle( 2899 const Error& error = Error::Handle(
2895 LanguageError::New(String::Handle(String::New(chars)))); 2900 LanguageError::New(String::Handle(String::New(chars))));
2896 Isolate::Current()->long_jump_base()->Jump(1, error); 2901 Isolate::Current()->long_jump_base()->Jump(1, error);
2897 } 2902 }
2898 2903
2899 2904
2900 } // namespace dart 2905 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_generator_x64.cc ('k') | runtime/vm/opt_code_generator_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698