OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 6454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6465 void HEnvironment::Initialize(const HEnvironment* other) { | 6465 void HEnvironment::Initialize(const HEnvironment* other) { |
6466 closure_ = other->closure(); | 6466 closure_ = other->closure(); |
6467 values_.AddAll(other->values_); | 6467 values_.AddAll(other->values_); |
6468 assigned_variables_.AddAll(other->assigned_variables_); | 6468 assigned_variables_.AddAll(other->assigned_variables_); |
6469 parameter_count_ = other->parameter_count_; | 6469 parameter_count_ = other->parameter_count_; |
6470 local_count_ = other->local_count_; | 6470 local_count_ = other->local_count_; |
6471 if (other->outer_ != NULL) outer_ = other->outer_->Copy(); // Deep copy. | 6471 if (other->outer_ != NULL) outer_ = other->outer_->Copy(); // Deep copy. |
6472 pop_count_ = other->pop_count_; | 6472 pop_count_ = other->pop_count_; |
6473 push_count_ = other->push_count_; | 6473 push_count_ = other->push_count_; |
6474 ast_id_ = other->ast_id_; | 6474 ast_id_ = other->ast_id_; |
6475 CheckDepth(); | |
6476 } | 6475 } |
6477 | 6476 |
6478 | 6477 |
6479 void HEnvironment::AddIncomingEdge(HBasicBlock* block, HEnvironment* other) { | 6478 void HEnvironment::AddIncomingEdge(HBasicBlock* block, HEnvironment* other) { |
6480 ASSERT(!block->IsLoopHeader()); | 6479 ASSERT(!block->IsLoopHeader()); |
6481 ASSERT(values_.length() == other->values_.length()); | 6480 ASSERT(values_.length() == other->values_.length()); |
6482 | 6481 |
6483 int length = values_.length(); | 6482 int length = values_.length(); |
6484 for (int i = 0; i < length; ++i) { | 6483 for (int i = 0; i < length; ++i) { |
6485 HValue* value = values_[i]; | 6484 HValue* value = values_[i]; |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6941 } | 6940 } |
6942 } | 6941 } |
6943 | 6942 |
6944 #ifdef DEBUG | 6943 #ifdef DEBUG |
6945 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 6944 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
6946 if (allocator_ != NULL) allocator_->Verify(); | 6945 if (allocator_ != NULL) allocator_->Verify(); |
6947 #endif | 6946 #endif |
6948 } | 6947 } |
6949 | 6948 |
6950 } } // namespace v8::internal | 6949 } } // namespace v8::internal |
OLD | NEW |