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

Side by Side Diff: src/hydrogen.cc

Issue 23548009: Merged r16406, r16431 into 3.19 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.19
Patch Set: Created 7 years, 3 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 | « src/arm/lithium-arm.cc ('k') | src/hydrogen-environment-liveness.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3755 matching lines...) Expand 10 before | Expand all | Expand 10 after
3766 3766
3767 void TestContext::BuildBranch(HValue* value) { 3767 void TestContext::BuildBranch(HValue* value) {
3768 // We expect the graph to be in edge-split form: there is no edge that 3768 // We expect the graph to be in edge-split form: there is no edge that
3769 // connects a branch node to a join node. We conservatively ensure that 3769 // connects a branch node to a join node. We conservatively ensure that
3770 // property by always adding an empty block on the outgoing edges of this 3770 // property by always adding an empty block on the outgoing edges of this
3771 // branch. 3771 // branch.
3772 HOptimizedGraphBuilder* builder = owner(); 3772 HOptimizedGraphBuilder* builder = owner();
3773 if (value != NULL && value->CheckFlag(HValue::kIsArguments)) { 3773 if (value != NULL && value->CheckFlag(HValue::kIsArguments)) {
3774 builder->Bailout("arguments object value in a test context"); 3774 builder->Bailout("arguments object value in a test context");
3775 } 3775 }
3776 if (value->IsConstant()) {
3777 HConstant* constant_value = HConstant::cast(value);
3778 if (constant_value->BooleanValue()) {
3779 builder->current_block()->Goto(if_true(), builder->function_state());
3780 } else {
3781 builder->current_block()->Goto(if_false(), builder->function_state());
3782 }
3783 builder->set_current_block(NULL);
3784 return;
3785 }
3786 HBasicBlock* empty_true = builder->graph()->CreateBasicBlock(); 3776 HBasicBlock* empty_true = builder->graph()->CreateBasicBlock();
3787 HBasicBlock* empty_false = builder->graph()->CreateBasicBlock(); 3777 HBasicBlock* empty_false = builder->graph()->CreateBasicBlock();
3788 ToBooleanStub::Types expected(condition()->to_boolean_types()); 3778 ToBooleanStub::Types expected(condition()->to_boolean_types());
3789 HBranch* test = new(zone()) HBranch(value, empty_true, empty_false, expected); 3779 HBranch* test = new(zone()) HBranch(value, empty_true, empty_false, expected);
3790 builder->current_block()->Finish(test); 3780 builder->current_block()->Finish(test);
3791 3781
3792 empty_true->Goto(if_true(), builder->function_state()); 3782 empty_true->Goto(if_true(), builder->function_state());
3793 empty_false->Goto(if_false(), builder->function_state()); 3783 empty_false->Goto(if_false(), builder->function_state());
3794 builder->set_current_block(NULL); 3784 builder->set_current_block(NULL);
3795 } 3785 }
(...skipping 3168 matching lines...) Expand 10 before | Expand all | Expand 10 after
6964 // currently only occur in an effect context. 6954 // currently only occur in an effect context.
6965 ASSERT(ast_context()->IsEffect()); 6955 ASSERT(ast_context()->IsEffect());
6966 CHECK_ALIVE(VisitForValue(expr->exception())); 6956 CHECK_ALIVE(VisitForValue(expr->exception()));
6967 6957
6968 HValue* context = environment()->LookupContext(); 6958 HValue* context = environment()->LookupContext();
6969 HValue* value = environment()->Pop(); 6959 HValue* value = environment()->Pop();
6970 HThrow* instr = new(zone()) HThrow(context, value); 6960 HThrow* instr = new(zone()) HThrow(context, value);
6971 instr->set_position(expr->position()); 6961 instr->set_position(expr->position());
6972 AddInstruction(instr); 6962 AddInstruction(instr);
6973 Add<HSimulate>(expr->id()); 6963 Add<HSimulate>(expr->id());
6974 current_block()->FinishExit(new(zone()) HAbnormalExit);
6975 set_current_block(NULL);
6976 } 6964 }
6977 6965
6978 6966
6979 HLoadNamedField* HGraphBuilder::BuildLoadNamedField( 6967 HLoadNamedField* HGraphBuilder::BuildLoadNamedField(
6980 HValue* object, 6968 HValue* object,
6981 HObjectAccess access, 6969 HObjectAccess access,
6982 Representation representation) { 6970 Representation representation) {
6983 bool load_double = false; 6971 bool load_double = false;
6984 if (representation.IsDouble()) { 6972 if (representation.IsDouble()) {
6985 representation = Representation::Tagged(); 6973 representation = Representation::Tagged();
(...skipping 4624 matching lines...) Expand 10 before | Expand all | Expand 10 after
11610 } 11598 }
11611 } 11599 }
11612 11600
11613 #ifdef DEBUG 11601 #ifdef DEBUG
11614 if (graph_ != NULL) graph_->Verify(false); // No full verify. 11602 if (graph_ != NULL) graph_->Verify(false); // No full verify.
11615 if (allocator_ != NULL) allocator_->Verify(); 11603 if (allocator_ != NULL) allocator_->Verify();
11616 #endif 11604 #endif
11617 } 11605 }
11618 11606
11619 } } // namespace v8::internal 11607 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen-environment-liveness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698