Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 2631123002: [crankshaft][runtime] Initialize uninitialized double fields with hole NaN value instead of 0.0. (Closed)
Patch Set: Addressing comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/crankshaft/hydrogen.h ('k') | src/factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <memory> 7 #include <memory>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 5482 matching lines...) Expand 10 before | Expand all | Expand 10 after
5493 FeedbackVectorSlot slot = property->GetSlot(); 5493 FeedbackVectorSlot slot = property->GetSlot();
5494 if (map.is_null()) { 5494 if (map.is_null()) {
5495 // If we don't know the monomorphic type, do a generic store. 5495 // If we don't know the monomorphic type, do a generic store.
5496 CHECK_ALIVE(store = BuildNamedGeneric(STORE, NULL, slot, literal, 5496 CHECK_ALIVE(store = BuildNamedGeneric(STORE, NULL, slot, literal,
5497 name, value)); 5497 name, value));
5498 } else { 5498 } else {
5499 PropertyAccessInfo info(this, STORE, map, name); 5499 PropertyAccessInfo info(this, STORE, map, name);
5500 if (info.CanAccessMonomorphic()) { 5500 if (info.CanAccessMonomorphic()) {
5501 HValue* checked_literal = Add<HCheckMaps>(literal, map); 5501 HValue* checked_literal = Add<HCheckMaps>(literal, map);
5502 DCHECK(!info.IsAccessorConstant()); 5502 DCHECK(!info.IsAccessorConstant());
5503 info.MarkAsInitializingStore();
5503 store = BuildMonomorphicAccess( 5504 store = BuildMonomorphicAccess(
5504 &info, literal, checked_literal, value, 5505 &info, literal, checked_literal, value,
5505 BailoutId::None(), BailoutId::None()); 5506 BailoutId::None(), BailoutId::None());
5506 } else { 5507 } else {
5507 CHECK_ALIVE(store = BuildNamedGeneric(STORE, NULL, slot, 5508 CHECK_ALIVE(store = BuildNamedGeneric(STORE, NULL, slot,
5508 literal, name, value)); 5509 literal, name, value));
5509 } 5510 }
5510 } 5511 }
5511 if (store->IsInstruction()) { 5512 if (store->IsInstruction()) {
5512 AddInstruction(HInstruction::cast(store)); 5513 AddInstruction(HInstruction::cast(store));
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
5734 if (field_access.representation().IsHeapObject()) { 5735 if (field_access.representation().IsHeapObject()) {
5735 BuildCheckHeapObject(value); 5736 BuildCheckHeapObject(value);
5736 } 5737 }
5737 5738
5738 if (!info->field_maps()->is_empty()) { 5739 if (!info->field_maps()->is_empty()) {
5739 DCHECK(field_access.representation().IsHeapObject()); 5740 DCHECK(field_access.representation().IsHeapObject());
5740 value = Add<HCheckMaps>(value, info->field_maps()); 5741 value = Add<HCheckMaps>(value, info->field_maps());
5741 } 5742 }
5742 5743
5743 // This is a normal store. 5744 // This is a normal store.
5744 instr = New<HStoreNamedField>( 5745 instr = New<HStoreNamedField>(checked_object->ActualValue(), field_access,
5745 checked_object->ActualValue(), field_access, value, 5746 value, info->StoreMode());
5746 transition_to_field ? INITIALIZING_STORE : STORE_TO_INITIALIZED_ENTRY);
5747 } 5747 }
5748 5748
5749 if (transition_to_field) { 5749 if (transition_to_field) {
5750 Handle<Map> transition(info->transition()); 5750 Handle<Map> transition(info->transition());
5751 DCHECK(!transition->is_deprecated()); 5751 DCHECK(!transition->is_deprecated());
5752 instr->SetTransition(Add<HConstant>(transition)); 5752 instr->SetTransition(Add<HConstant>(transition));
5753 } 5753 }
5754 return instr; 5754 return instr;
5755 } 5755 }
5756 5756
(...skipping 7180 matching lines...) Expand 10 before | Expand all | Expand 10 after
12937 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12937 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12938 } 12938 }
12939 12939
12940 #ifdef DEBUG 12940 #ifdef DEBUG
12941 graph_->Verify(false); // No full verify. 12941 graph_->Verify(false); // No full verify.
12942 #endif 12942 #endif
12943 } 12943 }
12944 12944
12945 } // namespace internal 12945 } // namespace internal
12946 } // namespace v8 12946 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.h ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698