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

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

Issue 1471193002: X87: [builtins] Sanitize the machinery around Construct calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/x87/lithium-x87.h ('k') | src/full-codegen/x87/full-codegen-x87.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 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/crankshaft/x87/lithium-x87.h" 5 #include "src/crankshaft/x87/lithium-x87.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_X87 9 #if V8_TARGET_ARCH_X87
10 10
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 323
324 void LInvokeFunction::PrintDataTo(StringStream* stream) { 324 void LInvokeFunction::PrintDataTo(StringStream* stream) {
325 stream->Add("= "); 325 stream->Add("= ");
326 context()->PrintTo(stream); 326 context()->PrintTo(stream);
327 stream->Add(" "); 327 stream->Add(" ");
328 function()->PrintTo(stream); 328 function()->PrintTo(stream);
329 stream->Add(" #%d / ", arity()); 329 stream->Add(" #%d / ", arity());
330 } 330 }
331 331
332 332
333 void LCallNew::PrintDataTo(StringStream* stream) {
334 stream->Add("= ");
335 context()->PrintTo(stream);
336 stream->Add(" ");
337 constructor()->PrintTo(stream);
338 stream->Add(" #%d / ", arity());
339 }
340
341
342 void LCallNewArray::PrintDataTo(StringStream* stream) { 333 void LCallNewArray::PrintDataTo(StringStream* stream) {
343 stream->Add("= "); 334 stream->Add("= ");
344 context()->PrintTo(stream); 335 context()->PrintTo(stream);
345 stream->Add(" "); 336 stream->Add(" ");
346 constructor()->PrintTo(stream); 337 constructor()->PrintTo(stream);
347 stream->Add(" #%d / ", arity()); 338 stream->Add(" #%d / ", arity());
348 ElementsKind kind = hydrogen()->elements_kind(); 339 ElementsKind kind = hydrogen()->elements_kind();
349 stream->Add(" (%s) ", ElementsKindToString(kind)); 340 stream->Add(" (%s) ", ElementsKindToString(kind));
350 } 341 }
351 342
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 } 1246 }
1256 1247
1257 1248
1258 LInstruction* LChunkBuilder::DoMathPowHalf(HUnaryMathOperation* instr) { 1249 LInstruction* LChunkBuilder::DoMathPowHalf(HUnaryMathOperation* instr) {
1259 LOperand* input = UseRegisterAtStart(instr->value()); 1250 LOperand* input = UseRegisterAtStart(instr->value());
1260 LMathPowHalf* result = new (zone()) LMathPowHalf(input); 1251 LMathPowHalf* result = new (zone()) LMathPowHalf(input);
1261 return DefineSameAsFirst(result); 1252 return DefineSameAsFirst(result);
1262 } 1253 }
1263 1254
1264 1255
1265 LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) {
1266 LOperand* context = UseFixed(instr->context(), esi);
1267 LOperand* constructor = UseFixed(instr->constructor(), edi);
1268 LCallNew* result = new(zone()) LCallNew(context, constructor);
1269 return MarkAsCall(DefineFixed(result, eax), instr);
1270 }
1271
1272
1273 LInstruction* LChunkBuilder::DoCallNewArray(HCallNewArray* instr) { 1256 LInstruction* LChunkBuilder::DoCallNewArray(HCallNewArray* instr) {
1274 LOperand* context = UseFixed(instr->context(), esi); 1257 LOperand* context = UseFixed(instr->context(), esi);
1275 LOperand* constructor = UseFixed(instr->constructor(), edi); 1258 LOperand* constructor = UseFixed(instr->constructor(), edi);
1276 LCallNewArray* result = new(zone()) LCallNewArray(context, constructor); 1259 LCallNewArray* result = new(zone()) LCallNewArray(context, constructor);
1277 return MarkAsCall(DefineFixed(result, eax), instr); 1260 return MarkAsCall(DefineFixed(result, eax), instr);
1278 } 1261 }
1279 1262
1280 1263
1281 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { 1264 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) {
1282 LOperand* context = UseFixed(instr->context(), esi); 1265 LOperand* context = UseFixed(instr->context(), esi);
(...skipping 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after
2724 LAllocateBlockContext* result = 2707 LAllocateBlockContext* result =
2725 new(zone()) LAllocateBlockContext(context, function); 2708 new(zone()) LAllocateBlockContext(context, function);
2726 return MarkAsCall(DefineFixed(result, esi), instr); 2709 return MarkAsCall(DefineFixed(result, esi), instr);
2727 } 2710 }
2728 2711
2729 2712
2730 } // namespace internal 2713 } // namespace internal
2731 } // namespace v8 2714 } // namespace v8
2732 2715
2733 #endif // V8_TARGET_ARCH_X87 2716 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x87/lithium-x87.h ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698