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