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

Side by Side Diff: src/compiler/change-lowering.cc

Issue 485653002: Work-around weird GCC 4.6 linker issue with SmiTagging template. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | « no previous file | 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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/change-lowering.h" 5 #include "src/compiler/change-lowering.h"
6 6
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 24 matching lines...) Expand all
35 35
36 Node* ChangeLowering::HeapNumberValueIndexConstant() { 36 Node* ChangeLowering::HeapNumberValueIndexConstant() {
37 STATIC_ASSERT(HeapNumber::kValueOffset % kPointerSize == 0); 37 STATIC_ASSERT(HeapNumber::kValueOffset % kPointerSize == 0);
38 const int heap_number_value_offset = 38 const int heap_number_value_offset =
39 ((HeapNumber::kValueOffset / kPointerSize) * (machine()->is64() ? 8 : 4)); 39 ((HeapNumber::kValueOffset / kPointerSize) * (machine()->is64() ? 8 : 4));
40 return jsgraph()->Int32Constant(heap_number_value_offset - kHeapObjectTag); 40 return jsgraph()->Int32Constant(heap_number_value_offset - kHeapObjectTag);
41 } 41 }
42 42
43 43
44 Node* ChangeLowering::SmiShiftBitsConstant() { 44 Node* ChangeLowering::SmiShiftBitsConstant() {
45 const int smi_shift_size = (machine()->is64() ? SmiTagging<8>::kSmiShiftSize 45 // TODO(turbofan): Work-around for weird GCC 4.6 linker issue:
46 : SmiTagging<4>::kSmiShiftSize); 46 // src/compiler/change-lowering.cc:46: undefined reference to
47 // `v8::internal::SmiTagging<4u>::kSmiShiftSize'
48 // src/compiler/change-lowering.cc:46: undefined reference to
49 // `v8::internal::SmiTagging<8u>::kSmiShiftSize'
50 STATIC_ASSERT(SmiTagging<4>::kSmiShiftSize == 0);
51 STATIC_ASSERT(SmiTagging<8>::kSmiShiftSize == 31);
52 const int smi_shift_size = machine()->is64() ? 31 : 0;
47 return jsgraph()->Int32Constant(smi_shift_size + kSmiTagSize); 53 return jsgraph()->Int32Constant(smi_shift_size + kSmiTagSize);
48 } 54 }
49 55
50 56
51 Reduction ChangeLowering::ChangeBitToBool(Node* val, Node* control) { 57 Reduction ChangeLowering::ChangeBitToBool(Node* val, Node* control) {
52 Node* branch = graph()->NewNode(common()->Branch(), val, control); 58 Node* branch = graph()->NewNode(common()->Branch(), val, control);
53 59
54 Node* if_true = graph()->NewNode(common()->IfTrue(), branch); 60 Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
55 Node* true_value = jsgraph()->TrueConstant(); 61 Node* true_value = jsgraph()->TrueConstant();
56 62
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 Graph* ChangeLowering::graph() const { return jsgraph()->graph(); } 153 Graph* ChangeLowering::graph() const { return jsgraph()->graph(); }
148 154
149 155
150 CommonOperatorBuilder* ChangeLowering::common() const { 156 CommonOperatorBuilder* ChangeLowering::common() const {
151 return jsgraph()->common(); 157 return jsgraph()->common();
152 } 158 }
153 159
154 } // namespace compiler 160 } // namespace compiler
155 } // namespace internal 161 } // namespace internal
156 } // namespace v8 162 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698