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

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 768683006: convert compile-time checkable DCHECKs to STATIC_ASSERTs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase on master Created 5 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/arm/code-stubs-arm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/bailout-reason.h" 7 #include "src/bailout-reason.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/field-index.h" 9 #include "src/field-index.h"
10 #include "src/hydrogen.h" 10 #include "src/hydrogen.h"
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 IfBuilder is_valid(this); 695 IfBuilder is_valid(this);
696 is_valid.IfNot<HCompareObjectEqAndBranch>(mapped_index, 696 is_valid.IfNot<HCompareObjectEqAndBranch>(mapped_index,
697 graph()->GetConstantHole()); 697 graph()->GetConstantHole());
698 is_valid.Then(); 698 is_valid.Then();
699 { 699 {
700 // TODO(mvstanton): I'd like to assert from this point, that if the 700 // TODO(mvstanton): I'd like to assert from this point, that if the
701 // mapped_index is not the hole that it is indeed, a smi. An unnecessary 701 // mapped_index is not the hole that it is indeed, a smi. An unnecessary
702 // smi check is being emitted. 702 // smi check is being emitted.
703 HValue* the_context = Add<HLoadKeyed>(elements, graph()->GetConstant0(), 703 HValue* the_context = Add<HLoadKeyed>(elements, graph()->GetConstant0(),
704 nullptr, FAST_ELEMENTS); 704 nullptr, FAST_ELEMENTS);
705 DCHECK(Context::kHeaderSize == FixedArray::kHeaderSize); 705 STATIC_ASSERT(Context::kHeaderSize == FixedArray::kHeaderSize);
706 HValue* result = Add<HLoadKeyed>(the_context, mapped_index, nullptr, 706 HValue* result = Add<HLoadKeyed>(the_context, mapped_index, nullptr,
707 FAST_ELEMENTS, ALLOW_RETURN_HOLE); 707 FAST_ELEMENTS, ALLOW_RETURN_HOLE);
708 environment()->Push(result); 708 environment()->Push(result);
709 } 709 }
710 is_valid.Else(); 710 is_valid.Else();
711 { 711 {
712 HValue* result = UnmappedCase(elements, key); 712 HValue* result = UnmappedCase(elements, key);
713 environment()->Push(result); 713 environment()->Push(result);
714 } 714 }
715 is_valid.End(); 715 is_valid.End();
(...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after
2212 // megamorphic case is handled as part of the default stub. 2212 // megamorphic case is handled as part of the default stub.
2213 DCHECK(!FLAG_vector_ics); 2213 DCHECK(!FLAG_vector_ics);
2214 2214
2215 // Probe the stub cache. 2215 // Probe the stub cache.
2216 Add<HTailCallThroughMegamorphicCache>(receiver, name); 2216 Add<HTailCallThroughMegamorphicCache>(receiver, name);
2217 2217
2218 // We never continue. 2218 // We never continue.
2219 return graph()->GetConstant0(); 2219 return graph()->GetConstant0();
2220 } 2220 }
2221 } } // namespace v8::internal 2221 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698