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/crankshaft/hydrogen.h" | 5 #include "src/crankshaft/hydrogen.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/allocation-site-scopes.h" | 9 #include "src/allocation-site-scopes.h" |
10 #include "src/ast/ast-numbering.h" | 10 #include "src/ast/ast-numbering.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "src/crankshaft/hydrogen-osr.h" | 27 #include "src/crankshaft/hydrogen-osr.h" |
28 #include "src/crankshaft/hydrogen-range-analysis.h" | 28 #include "src/crankshaft/hydrogen-range-analysis.h" |
29 #include "src/crankshaft/hydrogen-redundant-phi.h" | 29 #include "src/crankshaft/hydrogen-redundant-phi.h" |
30 #include "src/crankshaft/hydrogen-removable-simulates.h" | 30 #include "src/crankshaft/hydrogen-removable-simulates.h" |
31 #include "src/crankshaft/hydrogen-representation-changes.h" | 31 #include "src/crankshaft/hydrogen-representation-changes.h" |
32 #include "src/crankshaft/hydrogen-sce.h" | 32 #include "src/crankshaft/hydrogen-sce.h" |
33 #include "src/crankshaft/hydrogen-store-elimination.h" | 33 #include "src/crankshaft/hydrogen-store-elimination.h" |
34 #include "src/crankshaft/hydrogen-uint32-analysis.h" | 34 #include "src/crankshaft/hydrogen-uint32-analysis.h" |
35 #include "src/crankshaft/lithium-allocator.h" | 35 #include "src/crankshaft/lithium-allocator.h" |
36 #include "src/crankshaft/typing.h" | 36 #include "src/crankshaft/typing.h" |
| 37 #include "src/field-type.h" |
37 #include "src/full-codegen/full-codegen.h" | 38 #include "src/full-codegen/full-codegen.h" |
38 #include "src/ic/call-optimization.h" | 39 #include "src/ic/call-optimization.h" |
39 #include "src/ic/ic.h" | 40 #include "src/ic/ic.h" |
40 // GetRootConstructor | 41 // GetRootConstructor |
41 #include "src/ic/ic-inl.h" | 42 #include "src/ic/ic-inl.h" |
42 #include "src/isolate-inl.h" | 43 #include "src/isolate-inl.h" |
43 #include "src/parsing/parser.h" | 44 #include "src/parsing/parser.h" |
44 #include "src/runtime/runtime.h" | 45 #include "src/runtime/runtime.h" |
45 | 46 |
46 #if V8_TARGET_ARCH_IA32 | 47 #if V8_TARGET_ARCH_IA32 |
(...skipping 6203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6250 } | 6251 } |
6251 | 6252 |
6252 if (transition_to_field) { | 6253 if (transition_to_field) { |
6253 Handle<Map> transition(info->transition()); | 6254 Handle<Map> transition(info->transition()); |
6254 DCHECK(!transition->is_deprecated()); | 6255 DCHECK(!transition->is_deprecated()); |
6255 instr->SetTransition(Add<HConstant>(transition)); | 6256 instr->SetTransition(Add<HConstant>(transition)); |
6256 } | 6257 } |
6257 return instr; | 6258 return instr; |
6258 } | 6259 } |
6259 | 6260 |
| 6261 Handle<FieldType> |
| 6262 HOptimizedGraphBuilder::PropertyAccessInfo::GetFieldTypeFromMap( |
| 6263 Handle<Map> map) const { |
| 6264 DCHECK(IsFound()); |
| 6265 DCHECK(number_ < map->NumberOfOwnDescriptors()); |
| 6266 return handle(map->instance_descriptors()->GetFieldType(number_), isolate()); |
| 6267 } |
6260 | 6268 |
6261 bool HOptimizedGraphBuilder::PropertyAccessInfo::IsCompatible( | 6269 bool HOptimizedGraphBuilder::PropertyAccessInfo::IsCompatible( |
6262 PropertyAccessInfo* info) { | 6270 PropertyAccessInfo* info) { |
6263 if (!CanInlinePropertyAccess(map_)) return false; | 6271 if (!CanInlinePropertyAccess(map_)) return false; |
6264 | 6272 |
6265 // Currently only handle Type::Number as a polymorphic case. | 6273 // Currently only handle Type::Number as a polymorphic case. |
6266 // TODO(verwaest): Support monomorphic handling of numbers with a HCheckNumber | 6274 // TODO(verwaest): Support monomorphic handling of numbers with a HCheckNumber |
6267 // instruction. | 6275 // instruction. |
6268 if (IsNumberType()) return false; | 6276 if (IsNumberType()) return false; |
6269 | 6277 |
(...skipping 7343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13613 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13621 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13614 } | 13622 } |
13615 | 13623 |
13616 #ifdef DEBUG | 13624 #ifdef DEBUG |
13617 graph_->Verify(false); // No full verify. | 13625 graph_->Verify(false); // No full verify. |
13618 #endif | 13626 #endif |
13619 } | 13627 } |
13620 | 13628 |
13621 } // namespace internal | 13629 } // namespace internal |
13622 } // namespace v8 | 13630 } // namespace v8 |
OLD | NEW |