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

Unified Diff: runtime/vm/ast_transformer.cc

Issue 655773003: Initialize the async jump variable with a smi to avoid polymorphic comparison. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast_transformer.cc
===================================================================
--- runtime/vm/ast_transformer.cc (revision 41096)
+++ runtime/vm/ast_transformer.cc (working copy)
@@ -142,8 +142,6 @@
AwaitMarkerNode* await_marker = new (I) AwaitMarkerNode(
AwaitMarkerNode::kNewContinuationState);
await_marker->set_scope(is_future_scope);
- GetVariableInScope(is_future_scope, Symbols::AwaitJumpVar());
hausner 2014/10/14 16:29:55 I am not sure why the lookup of these variables is
Florian Schneider 2014/10/15 11:40:59 Here the side effect occurs twice (here and again
- GetVariableInScope(is_future_scope, Symbols::AwaitContextVar());
is_future_branch->Add(await_marker);
ArgumentListNode* args = new(I) ArgumentListNode(Scanner::kNoSourcePos);
args->Add(new(I) LoadLocalNode(Scanner::kNoSourcePos, async_op));
@@ -279,8 +277,7 @@
void AwaitTransformer::VisitBinaryOpNode(BinaryOpNode* node) {
- node->left()->Visit(this);
- AstNode* new_left = result_;
+ AstNode* new_left = Transform(node->left());
AstNode* new_right = NULL;
// Preserve lazy evaluaton.
if ((node->kind() == Token::kAND) || (node->kind() == Token::kOR)) {
@@ -299,15 +296,9 @@
void AwaitTransformer::VisitBinaryOpWithMask32Node(
BinaryOpWithMask32Node* node) {
- node->left()->Visit(this);
- AstNode* new_left = result_;
- AstNode* new_right = NULL;
- // Preserve lazy evaluaton.
- if ((node->kind() == Token::kAND) || (node->kind() == Token::kOR)) {
- new_right = LazyTransform(node->kind(), new_left, node->right());
- } else {
- new_right = Transform(node->right());
- }
+ ASSERT((node->kind() != Token::kAND) && (node->kind() != Token::kOR));
+ AstNode* new_left = Transform(node->left());
+ AstNode* new_right = Transform(node->right());
LocalVariable* result = AddToPreambleNewTempVar(
new(I) BinaryOpWithMask32Node(node->token_pos(),
node->kind(),
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698