| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/hydrogen.h" | 5 #include "src/hydrogen.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/v8.h" | 9 #include "src/v8.h" |
| 10 | 10 |
| (...skipping 3420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3431 next_block_id_(0), | 3431 next_block_id_(0), |
| 3432 entry_block_(NULL), | 3432 entry_block_(NULL), |
| 3433 blocks_(8, info->zone()), | 3433 blocks_(8, info->zone()), |
| 3434 values_(16, info->zone()), | 3434 values_(16, info->zone()), |
| 3435 phi_list_(NULL), | 3435 phi_list_(NULL), |
| 3436 uint32_instructions_(NULL), | 3436 uint32_instructions_(NULL), |
| 3437 osr_(NULL), | 3437 osr_(NULL), |
| 3438 info_(info), | 3438 info_(info), |
| 3439 zone_(info->zone()), | 3439 zone_(info->zone()), |
| 3440 is_recursive_(false), | 3440 is_recursive_(false), |
| 3441 this_has_uses_(false), |
| 3441 use_optimistic_licm_(false), | 3442 use_optimistic_licm_(false), |
| 3442 depends_on_empty_array_proto_elements_(false), | 3443 depends_on_empty_array_proto_elements_(false), |
| 3443 type_change_checksum_(0), | 3444 type_change_checksum_(0), |
| 3444 maximum_environment_size_(0), | 3445 maximum_environment_size_(0), |
| 3445 no_side_effects_scope_count_(0), | 3446 no_side_effects_scope_count_(0), |
| 3446 disallow_adding_new_values_(false) { | 3447 disallow_adding_new_values_(false) { |
| 3447 if (info->IsStub()) { | 3448 if (info->IsStub()) { |
| 3448 CallInterfaceDescriptor descriptor = | 3449 CallInterfaceDescriptor descriptor = |
| 3449 info->code_stub()->GetCallInterfaceDescriptor(); | 3450 info->code_stub()->GetCallInterfaceDescriptor(); |
| 3450 start_environment_ = new (zone_) | 3451 start_environment_ = new (zone_) |
| (...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5284 context = Add<HLoadNamedField>( | 5285 context = Add<HLoadNamedField>( |
| 5285 context, nullptr, | 5286 context, nullptr, |
| 5286 HObjectAccess::ForContextSlot(Context::PREVIOUS_INDEX)); | 5287 HObjectAccess::ForContextSlot(Context::PREVIOUS_INDEX)); |
| 5287 } | 5288 } |
| 5288 return context; | 5289 return context; |
| 5289 } | 5290 } |
| 5290 | 5291 |
| 5291 | 5292 |
| 5292 void HOptimizedGraphBuilder::VisitVariableProxy(VariableProxy* expr) { | 5293 void HOptimizedGraphBuilder::VisitVariableProxy(VariableProxy* expr) { |
| 5293 if (expr->is_this()) { | 5294 if (expr->is_this()) { |
| 5294 current_info()->SetThisHasUses(true); | 5295 graph()->MarkThisHasUses(); |
| 5295 } | 5296 } |
| 5296 | 5297 |
| 5297 DCHECK(!HasStackOverflow()); | 5298 DCHECK(!HasStackOverflow()); |
| 5298 DCHECK(current_block() != NULL); | 5299 DCHECK(current_block() != NULL); |
| 5299 DCHECK(current_block()->HasPredecessor()); | 5300 DCHECK(current_block()->HasPredecessor()); |
| 5300 Variable* variable = expr->var(); | 5301 Variable* variable = expr->var(); |
| 5301 switch (variable->location()) { | 5302 switch (variable->location()) { |
| 5302 case Variable::UNALLOCATED: { | 5303 case Variable::UNALLOCATED: { |
| 5303 if (IsLexicalVariableMode(variable->mode())) { | 5304 if (IsLexicalVariableMode(variable->mode())) { |
| 5304 // TODO(rossberg): should this be an DCHECK? | 5305 // TODO(rossberg): should this be an DCHECK? |
| (...skipping 8117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13422 if (ShouldProduceTraceOutput()) { | 13423 if (ShouldProduceTraceOutput()) { |
| 13423 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13424 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13424 } | 13425 } |
| 13425 | 13426 |
| 13426 #ifdef DEBUG | 13427 #ifdef DEBUG |
| 13427 graph_->Verify(false); // No full verify. | 13428 graph_->Verify(false); // No full verify. |
| 13428 #endif | 13429 #endif |
| 13429 } | 13430 } |
| 13430 | 13431 |
| 13431 } } // namespace v8::internal | 13432 } } // namespace v8::internal |
| OLD | NEW |