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

Side by Side Diff: src/crankshaft/arm64/lithium-arm64.cc

Issue 1469793002: [builtins] Sanitize the machinery around Construct calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mips64 fix. Created 5 years 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/arm64/lithium-arm64.h ('k') | src/crankshaft/arm64/lithium-codegen-arm64.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/crankshaft/arm64/lithium-arm64.h" 5 #include "src/crankshaft/arm64/lithium-arm64.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" 9 #include "src/crankshaft/arm64/lithium-codegen-arm64.h"
10 #include "src/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 void LCallWithDescriptor::PrintDataTo(StringStream* stream) { 76 void LCallWithDescriptor::PrintDataTo(StringStream* stream) {
77 for (int i = 0; i < InputCount(); i++) { 77 for (int i = 0; i < InputCount(); i++) {
78 InputAt(i)->PrintTo(stream); 78 InputAt(i)->PrintTo(stream);
79 stream->Add(" "); 79 stream->Add(" ");
80 } 80 }
81 stream->Add("#%d / ", arity()); 81 stream->Add("#%d / ", arity());
82 } 82 }
83 83
84 84
85 void LCallNew::PrintDataTo(StringStream* stream) {
86 stream->Add("= ");
87 constructor()->PrintTo(stream);
88 stream->Add(" #%d / ", arity());
89 }
90
91
92 void LCallNewArray::PrintDataTo(StringStream* stream) { 85 void LCallNewArray::PrintDataTo(StringStream* stream) {
93 stream->Add("= "); 86 stream->Add("= ");
94 constructor()->PrintTo(stream); 87 constructor()->PrintTo(stream);
95 stream->Add(" #%d / ", arity()); 88 stream->Add(" #%d / ", arity());
96 ElementsKind kind = hydrogen()->elements_kind(); 89 ElementsKind kind = hydrogen()->elements_kind();
97 stream->Add(" (%s) ", ElementsKindToString(kind)); 90 stream->Add(" (%s) ", ElementsKindToString(kind));
98 } 91 }
99 92
100 93
101 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) { 94 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 slot = FixedTemp(x3); 1062 slot = FixedTemp(x3);
1070 vector = FixedTemp(x2); 1063 vector = FixedTemp(x2);
1071 } 1064 }
1072 1065
1073 LCallFunction* call = 1066 LCallFunction* call =
1074 new (zone()) LCallFunction(context, function, slot, vector); 1067 new (zone()) LCallFunction(context, function, slot, vector);
1075 return MarkAsCall(DefineFixed(call, x0), instr); 1068 return MarkAsCall(DefineFixed(call, x0), instr);
1076 } 1069 }
1077 1070
1078 1071
1079 LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) {
1080 LOperand* context = UseFixed(instr->context(), cp);
1081 // The call to CallConstructStub will expect the constructor to be in x1.
1082 LOperand* constructor = UseFixed(instr->constructor(), x1);
1083 LCallNew* result = new(zone()) LCallNew(context, constructor);
1084 return MarkAsCall(DefineFixed(result, x0), instr);
1085 }
1086
1087
1088 LInstruction* LChunkBuilder::DoCallNewArray(HCallNewArray* instr) { 1072 LInstruction* LChunkBuilder::DoCallNewArray(HCallNewArray* instr) {
1089 LOperand* context = UseFixed(instr->context(), cp); 1073 LOperand* context = UseFixed(instr->context(), cp);
1090 // The call to ArrayConstructCode will expect the constructor to be in x1. 1074 // The call to ArrayConstructCode will expect the constructor to be in x1.
1091 LOperand* constructor = UseFixed(instr->constructor(), x1); 1075 LOperand* constructor = UseFixed(instr->constructor(), x1);
1092 LCallNewArray* result = new(zone()) LCallNewArray(context, constructor); 1076 LCallNewArray* result = new(zone()) LCallNewArray(context, constructor);
1093 return MarkAsCall(DefineFixed(result, x0), instr); 1077 return MarkAsCall(DefineFixed(result, x0), instr);
1094 } 1078 }
1095 1079
1096 1080
1097 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { 1081 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) {
(...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after
2754 LOperand* context = UseFixed(instr->context(), cp); 2738 LOperand* context = UseFixed(instr->context(), cp);
2755 LOperand* function = UseRegisterAtStart(instr->function()); 2739 LOperand* function = UseRegisterAtStart(instr->function());
2756 LAllocateBlockContext* result = 2740 LAllocateBlockContext* result =
2757 new(zone()) LAllocateBlockContext(context, function); 2741 new(zone()) LAllocateBlockContext(context, function);
2758 return MarkAsCall(DefineFixed(result, cp), instr); 2742 return MarkAsCall(DefineFixed(result, cp), instr);
2759 } 2743 }
2760 2744
2761 2745
2762 } // namespace internal 2746 } // namespace internal
2763 } // namespace v8 2747 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-arm64.h ('k') | src/crankshaft/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698