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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 5279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5290 | 5290 |
5291 | 5291 |
5292 HOptimizedGraphBuilder::GlobalPropertyAccess | 5292 HOptimizedGraphBuilder::GlobalPropertyAccess |
5293 HOptimizedGraphBuilder::LookupGlobalProperty(Variable* var, LookupIterator* it, | 5293 HOptimizedGraphBuilder::LookupGlobalProperty(Variable* var, LookupIterator* it, |
5294 PropertyAccessType access_type) { | 5294 PropertyAccessType access_type) { |
5295 if (var->is_this() || !current_info()->has_global_object()) { | 5295 if (var->is_this() || !current_info()->has_global_object()) { |
5296 return kUseGeneric; | 5296 return kUseGeneric; |
5297 } | 5297 } |
5298 | 5298 |
5299 switch (it->state()) { | 5299 switch (it->state()) { |
| 5300 case LookupIterator::ACCESSOR: |
5300 case LookupIterator::ACCESS_CHECK: | 5301 case LookupIterator::ACCESS_CHECK: |
5301 case LookupIterator::INTERCEPTOR: | 5302 case LookupIterator::INTERCEPTOR: |
5302 case LookupIterator::NOT_FOUND: | 5303 case LookupIterator::NOT_FOUND: |
5303 return kUseGeneric; | 5304 return kUseGeneric; |
5304 case LookupIterator::PROPERTY: | 5305 case LookupIterator::DATA: |
5305 if (!it->HasProperty()) return kUseGeneric; | 5306 if (access_type == STORE && it->IsReadOnly()) return kUseGeneric; |
5306 switch (it->property_kind()) { | 5307 return kUseCell; |
5307 case LookupIterator::DATA: | |
5308 if (access_type == STORE && it->IsReadOnly()) return kUseGeneric; | |
5309 return kUseCell; | |
5310 case LookupIterator::ACCESSOR: | |
5311 return kUseGeneric; | |
5312 } | |
5313 case LookupIterator::JSPROXY: | 5308 case LookupIterator::JSPROXY: |
5314 case LookupIterator::TRANSITION: | 5309 case LookupIterator::TRANSITION: |
| 5310 case LookupIterator::UNKNOWN: |
5315 UNREACHABLE(); | 5311 UNREACHABLE(); |
5316 } | 5312 } |
5317 UNREACHABLE(); | 5313 UNREACHABLE(); |
5318 return kUseGeneric; | 5314 return kUseGeneric; |
5319 } | 5315 } |
5320 | 5316 |
5321 | 5317 |
5322 HValue* HOptimizedGraphBuilder::BuildContextChainWalk(Variable* var) { | 5318 HValue* HOptimizedGraphBuilder::BuildContextChainWalk(Variable* var) { |
5323 DCHECK(var->IsContextSlot()); | 5319 DCHECK(var->IsContextSlot()); |
5324 HValue* context = environment()->context(); | 5320 HValue* context = environment()->context(); |
(...skipping 7168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12493 if (ShouldProduceTraceOutput()) { | 12489 if (ShouldProduceTraceOutput()) { |
12494 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12490 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
12495 } | 12491 } |
12496 | 12492 |
12497 #ifdef DEBUG | 12493 #ifdef DEBUG |
12498 graph_->Verify(false); // No full verify. | 12494 graph_->Verify(false); // No full verify. |
12499 #endif | 12495 #endif |
12500 } | 12496 } |
12501 | 12497 |
12502 } } // namespace v8::internal | 12498 } } // namespace v8::internal |
OLD | NEW |