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

Unified Diff: src/x64/full-codegen-x64.cc

Issue 352583008: Rollback to Version 3.28.4 (based on bleeding_edge revision r22031) (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/debug-x64.cc ('k') | src/x64/ic-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/full-codegen-x64.cc
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
index 67c959fe38eb39cbb5cab0e997b3ddc68e934d73..55a57d7a810a5a47d1a3d8335fe0ea009da462e3 100644
--- a/src/x64/full-codegen-x64.cc
+++ b/src/x64/full-codegen-x64.cc
@@ -1372,8 +1372,8 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(Variable* var,
// All extension objects were empty and it is safe to use a global
// load IC call.
- __ movp(LoadIC::ReceiverRegister(), GlobalObjectOperand());
- __ Move(LoadIC::NameRegister(), var->name());
+ __ movp(rax, GlobalObjectOperand());
+ __ Move(rcx, var->name());
ContextualMode mode = (typeof_state == INSIDE_TYPEOF)
? NOT_CONTEXTUAL
: CONTEXTUAL;
@@ -1452,8 +1452,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
switch (var->location()) {
case Variable::UNALLOCATED: {
Comment cmnt(masm_, "[ Global variable");
- __ Move(LoadIC::NameRegister(), var->name());
- __ movp(LoadIC::ReceiverRegister(), GlobalObjectOperand());
+ // Use inline caching. Variable name is passed in rcx and the global
+ // object on the stack.
+ __ Move(rcx, var->name());
+ __ movp(rax, GlobalObjectOperand());
CallLoadIC(CONTEXTUAL);
context()->Plug(rax);
break;
@@ -2042,11 +2044,6 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
// receiver = iter; f = 'next'; arg = received;
__ bind(&l_next);
- Register keyedload_receiver = KeyedLoadIC::ReceiverRegister();
- Register keyedload_name = KeyedLoadIC::NameRegister();
- ASSERT(keyedload_receiver.is(rdx));
- ASSERT(keyedload_name.is(rax));
-
__ LoadRoot(rcx, Heap::knext_stringRootIndex); // "next"
__ Push(rcx);
__ Push(Operand(rsp, 2 * kPointerSize)); // iter
@@ -2054,8 +2051,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
// result = receiver[f](arg);
__ bind(&l_call);
- __ movp(keyedload_receiver, Operand(rsp, kPointerSize));
- __ movp(keyedload_name, Operand(rsp, 2 * kPointerSize));
+ __ movp(rdx, Operand(rsp, kPointerSize));
+ __ movp(rax, Operand(rsp, 2 * kPointerSize));
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
CallIC(ic, TypeFeedbackId::None());
__ movp(rdi, rax);
@@ -2068,22 +2065,17 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
// if (!result.done) goto l_try;
__ bind(&l_loop);
- Register load_receiver = LoadIC::ReceiverRegister();
- Register load_name = LoadIC::NameRegister();
- ASSERT(load_receiver.is(rax));
- ASSERT(load_name.is(rcx));
-
- __ Push(load_receiver); // save result
- __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done"
- CallLoadIC(NOT_CONTEXTUAL); // rax=result.done
+ __ Push(rax); // save result
+ __ LoadRoot(rcx, Heap::kdone_stringRootIndex); // "done"
+ CallLoadIC(NOT_CONTEXTUAL); // result.done in rax
Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate());
CallIC(bool_ic);
__ testp(result_register(), result_register());
__ j(zero, &l_try);
// result.value
- __ Pop(load_receiver); // result
- __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value"
+ __ Pop(rax); // result
+ __ LoadRoot(rcx, Heap::kvalue_stringRootIndex); // "value"
CallLoadIC(NOT_CONTEXTUAL); // result.value in rax
context()->DropAndPlug(2, rax); // drop iter and g
break;
@@ -2244,7 +2236,7 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
Literal* key = prop->key()->AsLiteral();
- __ Move(LoadIC::NameRegister(), key->value());
+ __ Move(rcx, key->value());
CallLoadIC(NOT_CONTEXTUAL, prop->PropertyFeedbackId());
}
@@ -2503,15 +2495,13 @@ void FullCodeGenerator::VisitProperty(Property* expr) {
if (key->IsPropertyName()) {
VisitForAccumulatorValue(expr->obj());
- ASSERT(rax.is(LoadIC::ReceiverRegister()));
EmitNamedPropertyLoad(expr);
PrepareForBailoutForId(expr->LoadId(), TOS_REG);
context()->Plug(rax);
} else {
VisitForStackValue(expr->obj());
VisitForAccumulatorValue(expr->key());
- ASSERT(rax.is(KeyedLoadIC::NameRegister()));
- __ Pop(KeyedLoadIC::ReceiverRegister());
+ __ Pop(rdx);
EmitKeyedPropertyLoad(expr);
context()->Plug(rax);
}
@@ -2544,7 +2534,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
} else {
// Load the function from the receiver.
ASSERT(callee->IsProperty());
- __ movp(LoadIC::ReceiverRegister(), Operand(rsp, 0));
+ __ movp(rax, Operand(rsp, 0));
EmitNamedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
// Push the target function under the receiver.
@@ -2561,13 +2551,12 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
Expression* key) {
// Load the key.
VisitForAccumulatorValue(key);
- ASSERT(rax.is(KeyedLoadIC::NameRegister()));
Expression* callee = expr->expression();
// Load the function from the receiver.
ASSERT(callee->IsProperty());
- __ movp(KeyedLoadIC::ReceiverRegister(), Operand(rsp, 0));
+ __ movp(rdx, Operand(rsp, 0));
EmitKeyedPropertyLoad(callee->AsProperty());
PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
@@ -4045,8 +4034,8 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
__ Push(FieldOperand(rax, GlobalObject::kBuiltinsOffset));
// Load the function from the receiver.
- __ movp(LoadIC::ReceiverRegister(), Operand(rsp, 0));
- __ Move(LoadIC::NameRegister(), expr->name());
+ __ movp(rax, Operand(rsp, 0));
+ __ Move(rcx, expr->name());
CallLoadIC(NOT_CONTEXTUAL, expr->CallRuntimeFeedbackId());
// Push the target function under the receiver.
@@ -4225,17 +4214,13 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
}
if (assign_type == NAMED_PROPERTY) {
VisitForAccumulatorValue(prop->obj());
- ASSERT(rax.is(LoadIC::ReceiverRegister()));
__ Push(rax); // Copy of receiver, needed for later store.
EmitNamedPropertyLoad(prop);
} else {
VisitForStackValue(prop->obj());
VisitForAccumulatorValue(prop->key());
- ASSERT(rax.is(KeyedLoadIC::NameRegister()));
- // Leave receiver on stack
- __ movp(KeyedLoadIC::ReceiverRegister(), Operand(rsp, 0));
- // Copy of key, needed for later store.
- __ Push(KeyedLoadIC::NameRegister());
+ __ movp(rdx, Operand(rsp, 0)); // Leave receiver on stack
+ __ Push(rax); // Copy of key, needed for later store.
EmitKeyedPropertyLoad(prop);
}
}
@@ -4388,8 +4373,8 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
if (proxy != NULL && proxy->var()->IsUnallocated()) {
Comment cmnt(masm_, "[ Global variable");
- __ Move(LoadIC::NameRegister(), proxy->name());
- __ movp(LoadIC::ReceiverRegister(), GlobalObjectOperand());
+ __ Move(rcx, proxy->name());
+ __ movp(rax, GlobalObjectOperand());
// Use a regular load, not a contextual load, to avoid a reference
// error.
CallLoadIC(NOT_CONTEXTUAL);
« no previous file with comments | « src/x64/debug-x64.cc ('k') | src/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698