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

Side by Side Diff: src/compiler/ia32/code-generator-ia32.cc

Issue 2900683002: [compiler] Delay allocation of code-embedded heap numbers. (Closed)
Patch Set: Fix rebase. Created 3 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
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/x64/code-generator-x64.cc » ('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/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/compilation-info.h" 7 #include "src/compilation-info.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 Constant constant = ToConstant(operand); 67 Constant constant = ToConstant(operand);
68 if (constant.type() == Constant::kInt32 && 68 if (constant.type() == Constant::kInt32 &&
69 RelocInfo::IsWasmReference(constant.rmode())) { 69 RelocInfo::IsWasmReference(constant.rmode())) {
70 return Immediate(reinterpret_cast<Address>(constant.ToInt32()), 70 return Immediate(reinterpret_cast<Address>(constant.ToInt32()),
71 constant.rmode()); 71 constant.rmode());
72 } 72 }
73 switch (constant.type()) { 73 switch (constant.type()) {
74 case Constant::kInt32: 74 case Constant::kInt32:
75 return Immediate(constant.ToInt32()); 75 return Immediate(constant.ToInt32());
76 case Constant::kFloat32: 76 case Constant::kFloat32:
77 return Immediate( 77 return Immediate::EmbeddedNumber(constant.ToFloat32());
78 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED));
79 case Constant::kFloat64: 78 case Constant::kFloat64:
80 return Immediate( 79 return Immediate::EmbeddedNumber(constant.ToFloat64());
81 isolate()->factory()->NewNumber(constant.ToFloat64(), TENURED));
82 case Constant::kExternalReference: 80 case Constant::kExternalReference:
83 return Immediate(constant.ToExternalReference()); 81 return Immediate(constant.ToExternalReference());
84 case Constant::kHeapObject: 82 case Constant::kHeapObject:
85 return Immediate(constant.ToHeapObject()); 83 return Immediate(constant.ToHeapObject());
86 case Constant::kInt64: 84 case Constant::kInt64:
87 break; 85 break;
88 case Constant::kRpoNumber: 86 case Constant::kRpoNumber:
89 return Immediate::CodeRelativeOffset(ToLabel(operand)); 87 return Immediate::CodeRelativeOffset(ToLabel(operand));
90 } 88 }
91 UNREACHABLE(); 89 UNREACHABLE();
(...skipping 2680 matching lines...) Expand 10 before | Expand all | Expand 10 after
2772 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2770 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2773 __ Nop(padding_size); 2771 __ Nop(padding_size);
2774 } 2772 }
2775 } 2773 }
2776 2774
2777 #undef __ 2775 #undef __
2778 2776
2779 } // namespace compiler 2777 } // namespace compiler
2780 } // namespace internal 2778 } // namespace internal
2781 } // namespace v8 2779 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698