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

Side by Side Diff: src/lithium.cc

Issue 296113008: Allow HPushArgument to handle more than one argument. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase, and use int instead of unsigned Created 6 years, 7 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 | « src/ia32/lithium-ia32.cc ('k') | src/mips/lithium-mips.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 "v8.h" 5 #include "v8.h"
6 #include "lithium.h" 6 #include "lithium.h"
7 #include "scopes.h" 7 #include "scopes.h"
8 #include "serialize.h" 8 #include "serialize.h"
9 9
10 #if V8_TARGET_ARCH_IA32 10 #if V8_TARGET_ARCH_IA32
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 zone()); 502 zone());
503 int argument_index = *argument_index_accumulator; 503 int argument_index = *argument_index_accumulator;
504 504
505 // Store the environment description into the environment 505 // Store the environment description into the environment
506 // (with holes for nested objects) 506 // (with holes for nested objects)
507 for (int i = 0; i < hydrogen_env->length(); ++i) { 507 for (int i = 0; i < hydrogen_env->length(); ++i) {
508 if (hydrogen_env->is_special_index(i)) continue; 508 if (hydrogen_env->is_special_index(i)) continue;
509 509
510 LOperand* op; 510 LOperand* op;
511 HValue* value = hydrogen_env->values()->at(i); 511 HValue* value = hydrogen_env->values()->at(i);
512 CHECK(!value->IsPushArgument()); // Do not deopt outgoing arguments 512 CHECK(!value->IsPushArguments()); // Do not deopt outgoing arguments
513 if (value->IsArgumentsObject() || value->IsCapturedObject()) { 513 if (value->IsArgumentsObject() || value->IsCapturedObject()) {
514 op = LEnvironment::materialization_marker(); 514 op = LEnvironment::materialization_marker();
515 } else { 515 } else {
516 op = UseAny(value); 516 op = UseAny(value);
517 } 517 }
518 result->AddValue(op, 518 result->AddValue(op,
519 value->representation(), 519 value->representation(),
520 value->CheckFlag(HInstruction::kUint32)); 520 value->CheckFlag(HInstruction::kUint32));
521 } 521 }
522 522
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 result->AddNewObject(is_arguments ? length - 1 : length, is_arguments); 583 result->AddNewObject(is_arguments ? length - 1 : length, is_arguments);
584 } 584 }
585 // Store the captured object's fields into the environment 585 // Store the captured object's fields into the environment
586 for (int i = is_arguments ? 1 : 0; i < length; ++i) { 586 for (int i = is_arguments ? 1 : 0; i < length; ++i) {
587 LOperand* op; 587 LOperand* op;
588 HValue* arg_value = value->OperandAt(i); 588 HValue* arg_value = value->OperandAt(i);
589 if (arg_value->IsArgumentsObject() || arg_value->IsCapturedObject()) { 589 if (arg_value->IsArgumentsObject() || arg_value->IsCapturedObject()) {
590 // Insert a hole for nested objects 590 // Insert a hole for nested objects
591 op = LEnvironment::materialization_marker(); 591 op = LEnvironment::materialization_marker();
592 } else { 592 } else {
593 ASSERT(!arg_value->IsPushArgument()); 593 ASSERT(!arg_value->IsPushArguments());
594 // For ordinary values, tell the register allocator we need the value 594 // For ordinary values, tell the register allocator we need the value
595 // to be alive here 595 // to be alive here
596 op = UseAny(arg_value); 596 op = UseAny(arg_value);
597 } 597 }
598 result->AddValue(op, 598 result->AddValue(op,
599 arg_value->representation(), 599 arg_value->representation(),
600 arg_value->CheckFlag(HInstruction::kUint32)); 600 arg_value->CheckFlag(HInstruction::kUint32));
601 } 601 }
602 // Recursively store all the nested captured objects into the environment 602 // Recursively store all the nested captured objects into the environment
603 for (int i = is_arguments ? 1 : 0; i < length; ++i) { 603 for (int i = is_arguments ? 1 : 0; i < length; ++i) {
(...skipping 14 matching lines...) Expand all
618 618
619 619
620 LPhase::~LPhase() { 620 LPhase::~LPhase() {
621 if (ShouldProduceTraceOutput()) { 621 if (ShouldProduceTraceOutput()) {
622 isolate()->GetHTracer()->TraceLithium(name(), chunk_); 622 isolate()->GetHTracer()->TraceLithium(name(), chunk_);
623 } 623 }
624 } 624 }
625 625
626 626
627 } } // namespace v8::internal 627 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698