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

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

Issue 10038032: Add node id for return node. (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/flow_graph_compiler_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/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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 if (owner()->parsed_function().saved_context_var() != NULL) { 221 if (owner()->parsed_function().saved_context_var() != NULL) {
222 // CTX on entry was saved, but not linked as context parent. 222 // CTX on entry was saved, but not linked as context parent.
223 BuildLoadContext(*owner()->parsed_function().saved_context_var(), 0); 223 BuildLoadContext(*owner()->parsed_function().saved_context_var(), 0);
224 } else { 224 } else {
225 while (current_context_level-- > 0) { 225 while (current_context_level-- > 0) {
226 UnchainContext(); 226 UnchainContext();
227 } 227 }
228 } 228 }
229 229
230 230
231 AddInstruction(new ReturnInstr(return_value, node->token_index())); 231 AddInstruction(
232 new ReturnInstr(node->id(), node->token_index(), return_value));
232 CloseFragment(); 233 CloseFragment();
233 } 234 }
234 235
235 236
236 // <Expression> ::= Literal { literal: Instance } 237 // <Expression> ::= Literal { literal: Instance }
237 void EffectGraphVisitor::VisitLiteralNode(LiteralNode* node) { 238 void EffectGraphVisitor::VisitLiteralNode(LiteralNode* node) {
238 return; 239 return;
239 } 240 }
240 241
241 void ValueGraphVisitor::VisitLiteralNode(LiteralNode* node) { 242 void ValueGraphVisitor::VisitLiteralNode(LiteralNode* node) {
(...skipping 2306 matching lines...) Expand 10 before | Expand all | Expand 10 after
2548 char* chars = reinterpret_cast<char*>( 2549 char* chars = reinterpret_cast<char*>(
2549 Isolate::Current()->current_zone()->Allocate(len)); 2550 Isolate::Current()->current_zone()->Allocate(len));
2550 OS::SNPrint(chars, len, kFormat, function_name, reason); 2551 OS::SNPrint(chars, len, kFormat, function_name, reason);
2551 const Error& error = Error::Handle( 2552 const Error& error = Error::Handle(
2552 LanguageError::New(String::Handle(String::New(chars)))); 2553 LanguageError::New(String::Handle(String::New(chars))));
2553 Isolate::Current()->long_jump_base()->Jump(1, error); 2554 Isolate::Current()->long_jump_base()->Jump(1, error);
2554 } 2555 }
2555 2556
2556 2557
2557 } // namespace dart 2558 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698