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

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

Issue 10440053: Moved InstantiateTypeArgumentsComp and InstanceOfComp. (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 | « 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/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/code_descriptors.h" 9 #include "vm/code_descriptors.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 } 721 }
722 } 722 }
723 ReturnComputation(result); 723 ReturnComputation(result);
724 return; 724 return;
725 } 725 }
726 726
727 ValueGraphVisitor for_left_value(owner(), temp_index()); 727 ValueGraphVisitor for_left_value(owner(), temp_index());
728 node->left()->Visit(&for_left_value); 728 node->left()->Visit(&for_left_value);
729 Append(for_left_value); 729 Append(for_left_value);
730 Value* instantiator = NULL; 730 Value* instantiator = NULL;
731 Value* type_arguments = NULL; 731 Value* instantiator_type_arguments = NULL;
732 if (!type.IsInstantiated()) { 732 if (type.IsInstantiated()) {
733 instantiator = BuildNullValue();
734 instantiator_type_arguments = BuildNullValue();
735 } else {
733 BuildTypecheckArguments(node->token_index(), 736 BuildTypecheckArguments(node->token_index(),
734 &instantiator, 737 &instantiator,
735 &type_arguments); 738 &instantiator_type_arguments);
736 } 739 }
737 InstanceOfComp* instance_of = 740 InstanceOfComp* instance_of =
738 new InstanceOfComp(node->token_index(), 741 new InstanceOfComp(node->token_index(),
739 owner()->try_index(), 742 owner()->try_index(),
740 for_left_value.value(), 743 for_left_value.value(),
741 instantiator, 744 instantiator,
742 type_arguments, 745 instantiator_type_arguments,
743 node->right()->AsTypeNode()->type(), 746 node->right()->AsTypeNode()->type(),
744 (node->kind() == Token::kISNOT)); 747 (node->kind() == Token::kISNOT));
745 ReturnComputation(instance_of); 748 ReturnComputation(instance_of);
746 } 749 }
747 750
748 751
749 // <Expression> :: Comparison { kind: Token::Kind 752 // <Expression> :: Comparison { kind: Token::Kind
750 // left: <Expression> 753 // left: <Expression>
751 // right: <Expression> } 754 // right: <Expression> }
752 // TODO(srdjan): Implement new equality. 755 // TODO(srdjan): Implement new equality.
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after
2406 char* chars = reinterpret_cast<char*>( 2409 char* chars = reinterpret_cast<char*>(
2407 Isolate::Current()->current_zone()->Allocate(len)); 2410 Isolate::Current()->current_zone()->Allocate(len));
2408 OS::SNPrint(chars, len, kFormat, function_name, reason); 2411 OS::SNPrint(chars, len, kFormat, function_name, reason);
2409 const Error& error = Error::Handle( 2412 const Error& error = Error::Handle(
2410 LanguageError::New(String::Handle(String::New(chars)))); 2413 LanguageError::New(String::Handle(String::New(chars))));
2411 Isolate::Current()->long_jump_base()->Jump(1, error); 2414 Isolate::Current()->long_jump_base()->Jump(1, error);
2412 } 2415 }
2413 2416
2414 2417
2415 } // namespace dart 2418 } // 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