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

Side by Side Diff: src/hydrogen.cc

Issue 206413005: Visit return statement of inlined function in value context. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix comment Created 6 years, 9 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 | test/mjsunit/regress/regress-354357.js » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4345 matching lines...) Expand 10 before | Expand all | Expand 10 after
4356 HValue* rhs = environment()->arguments_environment()->Lookup(1); 4356 HValue* rhs = environment()->arguments_environment()->Lookup(1);
4357 AddLeaveInlined(rhs, state); 4357 AddLeaveInlined(rhs, state);
4358 } 4358 }
4359 } else { 4359 } else {
4360 // Return from a normal inlined function. Visit the subexpression in the 4360 // Return from a normal inlined function. Visit the subexpression in the
4361 // expression context of the call. 4361 // expression context of the call.
4362 if (context->IsTest()) { 4362 if (context->IsTest()) {
4363 TestContext* test = TestContext::cast(context); 4363 TestContext* test = TestContext::cast(context);
4364 VisitForControl(stmt->expression(), test->if_true(), test->if_false()); 4364 VisitForControl(stmt->expression(), test->if_true(), test->if_false());
4365 } else if (context->IsEffect()) { 4365 } else if (context->IsEffect()) {
4366 CHECK_ALIVE(VisitForEffect(stmt->expression())); 4366 // Visit in value context and ignore the result. This is needed to keep
4367 // environment in sync with full-codegen since some visitors (e.g.
4368 // VisitCountOperation) use the operand stack differently depending on
4369 // context.
4370 CHECK_ALIVE(VisitForValue(stmt->expression()));
4371 Pop();
4367 Goto(function_return(), state); 4372 Goto(function_return(), state);
4368 } else { 4373 } else {
4369 ASSERT(context->IsValue()); 4374 ASSERT(context->IsValue());
4370 CHECK_ALIVE(VisitForValue(stmt->expression())); 4375 CHECK_ALIVE(VisitForValue(stmt->expression()));
4371 AddLeaveInlined(Pop(), state); 4376 AddLeaveInlined(Pop(), state);
4372 } 4377 }
4373 } 4378 }
4374 set_current_block(NULL); 4379 set_current_block(NULL);
4375 } 4380 }
4376 4381
(...skipping 6929 matching lines...) Expand 10 before | Expand all | Expand 10 after
11306 if (ShouldProduceTraceOutput()) { 11311 if (ShouldProduceTraceOutput()) {
11307 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11312 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11308 } 11313 }
11309 11314
11310 #ifdef DEBUG 11315 #ifdef DEBUG
11311 graph_->Verify(false); // No full verify. 11316 graph_->Verify(false); // No full verify.
11312 #endif 11317 #endif
11313 } 11318 }
11314 11319
11315 } } // namespace v8::internal 11320 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-354357.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698