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 12187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12198 MUTABLE_HEAP_NUMBER_TYPE, graph()->GetConstant0()); | 12198 MUTABLE_HEAP_NUMBER_TYPE, graph()->GetConstant0()); |
12199 AddStoreMapConstant(double_box, | 12199 AddStoreMapConstant(double_box, |
12200 isolate()->factory()->mutable_heap_number_map()); | 12200 isolate()->factory()->mutable_heap_number_map()); |
12201 // Unwrap the mutable heap number from the boilerplate. | 12201 // Unwrap the mutable heap number from the boilerplate. |
12202 HValue* double_value = | 12202 HValue* double_value = |
12203 Add<HConstant>(Handle<HeapNumber>::cast(value)->value()); | 12203 Add<HConstant>(Handle<HeapNumber>::cast(value)->value()); |
12204 Add<HStoreNamedField>( | 12204 Add<HStoreNamedField>( |
12205 double_box, HObjectAccess::ForHeapNumberValue(), double_value); | 12205 double_box, HObjectAccess::ForHeapNumberValue(), double_value); |
12206 value_instruction = double_box; | 12206 value_instruction = double_box; |
12207 } else if (representation.IsSmi()) { | 12207 } else if (representation.IsSmi()) { |
12208 value_instruction = value->IsUninitialized(isolate()) | 12208 value_instruction = value->IsUninitialized() |
12209 ? graph()->GetConstant0() | 12209 ? graph()->GetConstant0() |
12210 : Add<HConstant>(value); | 12210 : Add<HConstant>(value); |
12211 // Ensure that value is stored as smi. | 12211 // Ensure that value is stored as smi. |
12212 access = access.WithRepresentation(representation); | 12212 access = access.WithRepresentation(representation); |
12213 } else { | 12213 } else { |
12214 value_instruction = Add<HConstant>(value); | 12214 value_instruction = Add<HConstant>(value); |
12215 } | 12215 } |
12216 | 12216 |
12217 Add<HStoreNamedField>(object, access, value_instruction); | 12217 Add<HStoreNamedField>(object, access, value_instruction); |
12218 } | 12218 } |
12219 } | 12219 } |
12220 | 12220 |
(...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13700 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13700 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13701 } | 13701 } |
13702 | 13702 |
13703 #ifdef DEBUG | 13703 #ifdef DEBUG |
13704 graph_->Verify(false); // No full verify. | 13704 graph_->Verify(false); // No full verify. |
13705 #endif | 13705 #endif |
13706 } | 13706 } |
13707 | 13707 |
13708 } // namespace internal | 13708 } // namespace internal |
13709 } // namespace v8 | 13709 } // namespace v8 |
OLD | NEW |