| 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 6106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6117 for (int i = 1; i < types->length(); ++i) { | 6117 for (int i = 1; i < types->length(); ++i) { |
| 6118 PropertyAccessInfo test_info( | 6118 PropertyAccessInfo test_info( |
| 6119 builder_, access_type_, ToType(types->at(i)), name_); | 6119 builder_, access_type_, ToType(types->at(i)), name_); |
| 6120 if (!test_info.IsCompatible(this)) return false; | 6120 if (!test_info.IsCompatible(this)) return false; |
| 6121 } | 6121 } |
| 6122 | 6122 |
| 6123 return true; | 6123 return true; |
| 6124 } | 6124 } |
| 6125 | 6125 |
| 6126 | 6126 |
| 6127 Handle<Map> HOptimizedGraphBuilder::PropertyAccessInfo::map() { |
| 6128 JSFunction* ctor = IC::GetRootConstructor( |
| 6129 type_, current_info()->closure()->context()->native_context()); |
| 6130 if (ctor != NULL) return handle(ctor->initial_map()); |
| 6131 return type_->AsClass()->Map(); |
| 6132 } |
| 6133 |
| 6134 |
| 6127 static bool NeedsWrappingFor(Type* type, Handle<JSFunction> target) { | 6135 static bool NeedsWrappingFor(Type* type, Handle<JSFunction> target) { |
| 6128 return type->Is(Type::NumberOrString()) && | 6136 return type->Is(Type::NumberOrString()) && |
| 6129 target->shared()->strict_mode() == SLOPPY && | 6137 target->shared()->strict_mode() == SLOPPY && |
| 6130 !target->shared()->native(); | 6138 !target->shared()->native(); |
| 6131 } | 6139 } |
| 6132 | 6140 |
| 6133 | 6141 |
| 6134 HInstruction* HOptimizedGraphBuilder::BuildMonomorphicAccess( | 6142 HInstruction* HOptimizedGraphBuilder::BuildMonomorphicAccess( |
| 6135 PropertyAccessInfo* info, | 6143 PropertyAccessInfo* info, |
| 6136 HValue* object, | 6144 HValue* object, |
| (...skipping 6293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12430 if (ShouldProduceTraceOutput()) { | 12438 if (ShouldProduceTraceOutput()) { |
| 12431 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12439 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 12432 } | 12440 } |
| 12433 | 12441 |
| 12434 #ifdef DEBUG | 12442 #ifdef DEBUG |
| 12435 graph_->Verify(false); // No full verify. | 12443 graph_->Verify(false); // No full verify. |
| 12436 #endif | 12444 #endif |
| 12437 } | 12445 } |
| 12438 | 12446 |
| 12439 } } // namespace v8::internal | 12447 } } // namespace v8::internal |
| OLD | NEW |