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

Side by Side Diff: src/compiler/linkage.cc

Issue 1576093004: [Interpreter] Add ForInPrepare runtime function which returns a ObjectTriple. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add MIPS port Created 4 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/code-stubs.h ('k') | src/ia32/code-stubs-ia32.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 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/ast/scopes.h" 5 #include "src/ast/scopes.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/common-operator.h" 8 #include "src/compiler/common-operator.h"
9 #include "src/compiler/frame.h" 9 #include "src/compiler/frame.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 LocationSignature::Builder locations(zone, return_count, parameter_count); 235 LocationSignature::Builder locations(zone, return_count, parameter_count);
236 MachineSignature::Builder types(zone, return_count, parameter_count); 236 MachineSignature::Builder types(zone, return_count, parameter_count);
237 237
238 // Add returns. 238 // Add returns.
239 if (locations.return_count_ > 0) { 239 if (locations.return_count_ > 0) {
240 locations.AddReturn(regloc(kReturnRegister0)); 240 locations.AddReturn(regloc(kReturnRegister0));
241 } 241 }
242 if (locations.return_count_ > 1) { 242 if (locations.return_count_ > 1) {
243 locations.AddReturn(regloc(kReturnRegister1)); 243 locations.AddReturn(regloc(kReturnRegister1));
244 } 244 }
245 if (locations.return_count_ > 2) {
246 locations.AddReturn(regloc(kReturnRegister2));
247 }
245 for (size_t i = 0; i < return_count; i++) { 248 for (size_t i = 0; i < return_count; i++) {
246 types.AddReturn(MachineType::AnyTagged()); 249 types.AddReturn(MachineType::AnyTagged());
247 } 250 }
248 251
249 // All parameters to the runtime call go on the stack. 252 // All parameters to the runtime call go on the stack.
250 for (int i = 0; i < js_parameter_count; i++) { 253 for (int i = 0; i < js_parameter_count; i++) {
251 locations.AddParam( 254 locations.AddParam(
252 LinkageLocation::ForCallerFrameSlot(i - js_parameter_count)); 255 LinkageLocation::ForCallerFrameSlot(i - js_parameter_count));
253 types.AddParam(MachineType::AnyTagged()); 256 types.AddParam(MachineType::AnyTagged());
254 } 257 }
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 LocationSignature::Builder locations(zone, return_count, parameter_count); 444 LocationSignature::Builder locations(zone, return_count, parameter_count);
442 MachineSignature::Builder types(zone, return_count, parameter_count); 445 MachineSignature::Builder types(zone, return_count, parameter_count);
443 446
444 // Add returns. 447 // Add returns.
445 if (locations.return_count_ > 0) { 448 if (locations.return_count_ > 0) {
446 locations.AddReturn(regloc(kReturnRegister0)); 449 locations.AddReturn(regloc(kReturnRegister0));
447 } 450 }
448 if (locations.return_count_ > 1) { 451 if (locations.return_count_ > 1) {
449 locations.AddReturn(regloc(kReturnRegister1)); 452 locations.AddReturn(regloc(kReturnRegister1));
450 } 453 }
454 if (locations.return_count_ > 2) {
455 locations.AddReturn(regloc(kReturnRegister2));
456 }
451 for (size_t i = 0; i < return_count; i++) { 457 for (size_t i = 0; i < return_count; i++) {
452 types.AddReturn(return_type); 458 types.AddReturn(return_type);
453 } 459 }
454 460
455 // Add parameters in registers and on the stack. 461 // Add parameters in registers and on the stack.
456 for (int i = 0; i < js_parameter_count; i++) { 462 for (int i = 0; i < js_parameter_count; i++) {
457 if (i < register_parameter_count) { 463 if (i < register_parameter_count) {
458 // The first parameters go in registers. 464 // The first parameters go in registers.
459 Register reg = descriptor.GetRegisterParameter(i); 465 Register reg = descriptor.GetRegisterParameter(i);
460 Representation rep = 466 Representation rep =
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 } else { 536 } else {
531 DCHECK(loc == regloc(kContextRegister)); 537 DCHECK(loc == regloc(kContextRegister));
532 return LinkageLocation::ForCalleeFrameSlot(Frame::kContextSlot); 538 return LinkageLocation::ForCalleeFrameSlot(Frame::kContextSlot);
533 } 539 }
534 } 540 }
535 541
536 542
537 } // namespace compiler 543 } // namespace compiler
538 } // namespace internal 544 } // namespace internal
539 } // namespace v8 545 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698