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

Side by Side Diff: src/hydrogen.cc

Issue 95333002: A few small refactorings and typo fixes (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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/compiler.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 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 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 if_objectiskey.Then(); 1595 if_objectiskey.Then();
1596 { 1596 {
1597 // Make the key_index available. 1597 // Make the key_index available.
1598 Push(key_index); 1598 Push(key_index);
1599 } 1599 }
1600 if_objectiskey.JoinContinuation(&found); 1600 if_objectiskey.JoinContinuation(&found);
1601 } 1601 }
1602 if_objectissmi.Else(); 1602 if_objectissmi.Else();
1603 { 1603 {
1604 if (type->Is(Type::Smi())) { 1604 if (type->Is(Type::Smi())) {
1605 if_objectissmi.Deopt("Excepted smi"); 1605 if_objectissmi.Deopt("Expected smi");
1606 } else { 1606 } else {
1607 // Check if the object is a heap number. 1607 // Check if the object is a heap number.
1608 IfBuilder if_objectisnumber(this); 1608 IfBuilder if_objectisnumber(this);
1609 if_objectisnumber.If<HCompareMap>( 1609 if_objectisnumber.If<HCompareMap>(
1610 object, isolate()->factory()->heap_number_map()); 1610 object, isolate()->factory()->heap_number_map());
1611 if_objectisnumber.Then(); 1611 if_objectisnumber.Then();
1612 { 1612 {
1613 // Compute hash for heap number similar to double_get_hash(). 1613 // Compute hash for heap number similar to double_get_hash().
1614 HValue* low = Add<HLoadNamedField>( 1614 HValue* low = Add<HLoadNamedField>(
1615 object, HObjectAccess::ForHeapNumberValueLowestBits()); 1615 object, HObjectAccess::ForHeapNumberValueLowestBits());
(...skipping 1947 matching lines...) Expand 10 before | Expand all | Expand 10 after
3563 3563
3564 void TestContext::BuildBranch(HValue* value) { 3564 void TestContext::BuildBranch(HValue* value) {
3565 // We expect the graph to be in edge-split form: there is no edge that 3565 // We expect the graph to be in edge-split form: there is no edge that
3566 // connects a branch node to a join node. We conservatively ensure that 3566 // connects a branch node to a join node. We conservatively ensure that
3567 // property by always adding an empty block on the outgoing edges of this 3567 // property by always adding an empty block on the outgoing edges of this
3568 // branch. 3568 // branch.
3569 HOptimizedGraphBuilder* builder = owner(); 3569 HOptimizedGraphBuilder* builder = owner();
3570 if (value != NULL && value->CheckFlag(HValue::kIsArguments)) { 3570 if (value != NULL && value->CheckFlag(HValue::kIsArguments)) {
3571 builder->Bailout(kArgumentsObjectValueInATestContext); 3571 builder->Bailout(kArgumentsObjectValueInATestContext);
3572 } 3572 }
3573 HBasicBlock* empty_true = builder->graph()->CreateBasicBlock();
3574 HBasicBlock* empty_false = builder->graph()->CreateBasicBlock();
3575 ToBooleanStub::Types expected(condition()->to_boolean_types()); 3573 ToBooleanStub::Types expected(condition()->to_boolean_types());
3576 builder->FinishCurrentBlock(builder->New<HBranch>( 3574 ReturnControl(owner()->New<HBranch>(value, expected), BailoutId::None());
3577 value, expected, empty_true, empty_false));
3578
3579 owner()->Goto(empty_true, if_true(), builder->function_state());
3580 owner()->Goto(empty_false , if_false(), builder->function_state());
3581 builder->set_current_block(NULL);
3582 } 3575 }
3583 3576
3584 3577
3585 // HOptimizedGraphBuilder infrastructure for bailing out and checking bailouts. 3578 // HOptimizedGraphBuilder infrastructure for bailing out and checking bailouts.
3586 #define CHECK_BAILOUT(call) \ 3579 #define CHECK_BAILOUT(call) \
3587 do { \ 3580 do { \
3588 call; \ 3581 call; \
3589 if (HasStackOverflow()) return; \ 3582 if (HasStackOverflow()) return; \
3590 } while (false) 3583 } while (false)
3591 3584
(...skipping 7221 matching lines...) Expand 10 before | Expand all | Expand 10 after
10813 if (ShouldProduceTraceOutput()) { 10806 if (ShouldProduceTraceOutput()) {
10814 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 10807 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
10815 } 10808 }
10816 10809
10817 #ifdef DEBUG 10810 #ifdef DEBUG
10818 graph_->Verify(false); // No full verify. 10811 graph_->Verify(false); // No full verify.
10819 #endif 10812 #endif
10820 } 10813 }
10821 10814
10822 } } // namespace v8::internal 10815 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/hydrogen-environment-liveness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698