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

Side by Side Diff: src/hydrogen.cc

Issue 299373005: Avoid HeapObject check in HStoreNamedField. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix condition on arm64. Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/hydrogen-instructions.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 "hydrogen.h" 5 #include "hydrogen.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "v8.h" 9 #include "v8.h"
10 #include "allocation-site-scopes.h" 10 #include "allocation-site-scopes.h"
(...skipping 5487 matching lines...) Expand 10 before | Expand all | Expand 10 after
5498 } else { 5498 } else {
5499 // Already holds a HeapNumber; load the box and write its value field. 5499 // Already holds a HeapNumber; load the box and write its value field.
5500 HInstruction* heap_number = Add<HLoadNamedField>( 5500 HInstruction* heap_number = Add<HLoadNamedField>(
5501 checked_object, static_cast<HValue*>(NULL), heap_number_access); 5501 checked_object, static_cast<HValue*>(NULL), heap_number_access);
5502 heap_number->set_type(HType::HeapNumber()); 5502 heap_number->set_type(HType::HeapNumber());
5503 instr = New<HStoreNamedField>(heap_number, 5503 instr = New<HStoreNamedField>(heap_number,
5504 HObjectAccess::ForHeapNumberValue(), 5504 HObjectAccess::ForHeapNumberValue(),
5505 value, STORE_TO_INITIALIZED_ENTRY); 5505 value, STORE_TO_INITIALIZED_ENTRY);
5506 } 5506 }
5507 } else { 5507 } else {
5508 if (field_access.representation().IsHeapObject()) {
5509 BuildCheckHeapObject(value);
5510 }
5511
5508 if (!info->field_maps()->is_empty()) { 5512 if (!info->field_maps()->is_empty()) {
5509 ASSERT(field_access.representation().IsHeapObject()); 5513 ASSERT(field_access.representation().IsHeapObject());
5510 BuildCheckHeapObject(value);
5511 value = Add<HCheckMaps>(value, info->field_maps()); 5514 value = Add<HCheckMaps>(value, info->field_maps());
5512
5513 // TODO(bmeurer): This is a dirty hack to avoid repeating the smi check
5514 // that was already performed by the HCheckHeapObject above in the
5515 // HStoreNamedField below. We should really do this right instead and
5516 // make Crankshaft aware of Representation::HeapObject().
5517 field_access = field_access.WithRepresentation(Representation::Tagged());
5518 } 5515 }
5519 5516
5520 // This is a normal store. 5517 // This is a normal store.
5521 instr = New<HStoreNamedField>( 5518 instr = New<HStoreNamedField>(
5522 checked_object->ActualValue(), field_access, value, 5519 checked_object->ActualValue(), field_access, value,
5523 transition_to_field ? INITIALIZING_STORE : STORE_TO_INITIALIZED_ENTRY); 5520 transition_to_field ? INITIALIZING_STORE : STORE_TO_INITIALIZED_ENTRY);
5524 } 5521 }
5525 5522
5526 if (transition_to_field) { 5523 if (transition_to_field) {
5527 Handle<Map> transition(info->transition()); 5524 Handle<Map> transition(info->transition());
(...skipping 6285 matching lines...) Expand 10 before | Expand all | Expand 10 after
11813 if (ShouldProduceTraceOutput()) { 11810 if (ShouldProduceTraceOutput()) {
11814 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11811 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11815 } 11812 }
11816 11813
11817 #ifdef DEBUG 11814 #ifdef DEBUG
11818 graph_->Verify(false); // No full verify. 11815 graph_->Verify(false); // No full verify.
11819 #endif 11816 #endif
11820 } 11817 }
11821 11818
11822 } } // namespace v8::internal 11819 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698