OLD | NEW |
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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
10 // | 10 // |
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1374 __ Branch(&fast, eq, temp, Operand(a4)); | 1374 __ Branch(&fast, eq, temp, Operand(a4)); |
1375 // Check that extension is NULL. | 1375 // Check that extension is NULL. |
1376 __ ld(temp, ContextOperand(next, Context::EXTENSION_INDEX)); | 1376 __ ld(temp, ContextOperand(next, Context::EXTENSION_INDEX)); |
1377 __ Branch(slow, ne, temp, Operand(zero_reg)); | 1377 __ Branch(slow, ne, temp, Operand(zero_reg)); |
1378 // Load next context in chain. | 1378 // Load next context in chain. |
1379 __ ld(next, ContextOperand(next, Context::PREVIOUS_INDEX)); | 1379 __ ld(next, ContextOperand(next, Context::PREVIOUS_INDEX)); |
1380 __ Branch(&loop); | 1380 __ Branch(&loop); |
1381 __ bind(&fast); | 1381 __ bind(&fast); |
1382 } | 1382 } |
1383 | 1383 |
1384 __ ld(LoadIC::ReceiverRegister(), GlobalObjectOperand()); | 1384 __ ld(LoadConvention::ReceiverRegister(), GlobalObjectOperand()); |
1385 __ li(LoadIC::NameRegister(), Operand(proxy->var()->name())); | 1385 __ li(LoadConvention::NameRegister(), Operand(proxy->var()->name())); |
1386 if (FLAG_vector_ics) { | 1386 if (FLAG_vector_ics) { |
1387 __ li(LoadIC::SlotRegister(), | 1387 __ li(VectorLoadConvention::SlotRegister(), |
1388 Operand(Smi::FromInt(proxy->VariableFeedbackSlot()))); | 1388 Operand(Smi::FromInt(proxy->VariableFeedbackSlot()))); |
1389 } | 1389 } |
1390 | 1390 |
1391 ContextualMode mode = (typeof_state == INSIDE_TYPEOF) | 1391 ContextualMode mode = (typeof_state == INSIDE_TYPEOF) |
1392 ? NOT_CONTEXTUAL | 1392 ? NOT_CONTEXTUAL |
1393 : CONTEXTUAL; | 1393 : CONTEXTUAL; |
1394 CallLoadIC(mode); | 1394 CallLoadIC(mode); |
1395 } | 1395 } |
1396 | 1396 |
1397 | 1397 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1465 SetSourcePosition(proxy->position()); | 1465 SetSourcePosition(proxy->position()); |
1466 Variable* var = proxy->var(); | 1466 Variable* var = proxy->var(); |
1467 | 1467 |
1468 // Three cases: global variables, lookup variables, and all other types of | 1468 // Three cases: global variables, lookup variables, and all other types of |
1469 // variables. | 1469 // variables. |
1470 switch (var->location()) { | 1470 switch (var->location()) { |
1471 case Variable::UNALLOCATED: { | 1471 case Variable::UNALLOCATED: { |
1472 Comment cmnt(masm_, "[ Global variable"); | 1472 Comment cmnt(masm_, "[ Global variable"); |
1473 // Use inline caching. Variable name is passed in a2 and the global | 1473 // Use inline caching. Variable name is passed in a2 and the global |
1474 // object (receiver) in a0. | 1474 // object (receiver) in a0. |
1475 __ ld(LoadIC::ReceiverRegister(), GlobalObjectOperand()); | 1475 __ ld(LoadConvention::ReceiverRegister(), GlobalObjectOperand()); |
1476 __ li(LoadIC::NameRegister(), Operand(var->name())); | 1476 __ li(LoadConvention::NameRegister(), Operand(var->name())); |
1477 if (FLAG_vector_ics) { | 1477 if (FLAG_vector_ics) { |
1478 __ li(LoadIC::SlotRegister(), | 1478 __ li(VectorLoadConvention::SlotRegister(), |
1479 Operand(Smi::FromInt(proxy->VariableFeedbackSlot()))); | 1479 Operand(Smi::FromInt(proxy->VariableFeedbackSlot()))); |
1480 } | 1480 } |
1481 CallLoadIC(CONTEXTUAL); | 1481 CallLoadIC(CONTEXTUAL); |
1482 context()->Plug(v0); | 1482 context()->Plug(v0); |
1483 break; | 1483 break; |
1484 } | 1484 } |
1485 | 1485 |
1486 case Variable::PARAMETER: | 1486 case Variable::PARAMETER: |
1487 case Variable::LOCAL: | 1487 case Variable::LOCAL: |
1488 case Variable::CONTEXT: { | 1488 case Variable::CONTEXT: { |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1678 switch (property->kind()) { | 1678 switch (property->kind()) { |
1679 case ObjectLiteral::Property::CONSTANT: | 1679 case ObjectLiteral::Property::CONSTANT: |
1680 UNREACHABLE(); | 1680 UNREACHABLE(); |
1681 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1681 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
1682 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); | 1682 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); |
1683 // Fall through. | 1683 // Fall through. |
1684 case ObjectLiteral::Property::COMPUTED: | 1684 case ObjectLiteral::Property::COMPUTED: |
1685 if (key->value()->IsInternalizedString()) { | 1685 if (key->value()->IsInternalizedString()) { |
1686 if (property->emit_store()) { | 1686 if (property->emit_store()) { |
1687 VisitForAccumulatorValue(value); | 1687 VisitForAccumulatorValue(value); |
1688 __ mov(StoreIC::ValueRegister(), result_register()); | 1688 __ mov(StoreConvention::ValueRegister(), result_register()); |
1689 DCHECK(StoreIC::ValueRegister().is(a0)); | 1689 DCHECK(StoreConvention::ValueRegister().is(a0)); |
1690 __ li(StoreIC::NameRegister(), Operand(key->value())); | 1690 __ li(StoreConvention::NameRegister(), Operand(key->value())); |
1691 __ ld(StoreIC::ReceiverRegister(), MemOperand(sp)); | 1691 __ ld(StoreConvention::ReceiverRegister(), MemOperand(sp)); |
1692 CallStoreIC(key->LiteralFeedbackId()); | 1692 CallStoreIC(key->LiteralFeedbackId()); |
1693 PrepareForBailoutForId(key->id(), NO_REGISTERS); | 1693 PrepareForBailoutForId(key->id(), NO_REGISTERS); |
1694 } else { | 1694 } else { |
1695 VisitForEffect(value); | 1695 VisitForEffect(value); |
1696 } | 1696 } |
1697 break; | 1697 break; |
1698 } | 1698 } |
1699 // Duplicate receiver on stack. | 1699 // Duplicate receiver on stack. |
1700 __ ld(a0, MemOperand(sp)); | 1700 __ ld(a0, MemOperand(sp)); |
1701 __ push(a0); | 1701 __ push(a0); |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1863 | 1863 |
1864 // Evaluate LHS expression. | 1864 // Evaluate LHS expression. |
1865 switch (assign_type) { | 1865 switch (assign_type) { |
1866 case VARIABLE: | 1866 case VARIABLE: |
1867 // Nothing to do here. | 1867 // Nothing to do here. |
1868 break; | 1868 break; |
1869 case NAMED_PROPERTY: | 1869 case NAMED_PROPERTY: |
1870 if (expr->is_compound()) { | 1870 if (expr->is_compound()) { |
1871 // We need the receiver both on the stack and in the register. | 1871 // We need the receiver both on the stack and in the register. |
1872 VisitForStackValue(property->obj()); | 1872 VisitForStackValue(property->obj()); |
1873 __ ld(LoadIC::ReceiverRegister(), MemOperand(sp, 0)); | 1873 __ ld(LoadConvention::ReceiverRegister(), MemOperand(sp, 0)); |
1874 } else { | 1874 } else { |
1875 VisitForStackValue(property->obj()); | 1875 VisitForStackValue(property->obj()); |
1876 } | 1876 } |
1877 break; | 1877 break; |
1878 case KEYED_PROPERTY: | 1878 case KEYED_PROPERTY: |
1879 // We need the key and receiver on both the stack and in v0 and a1. | 1879 // We need the key and receiver on both the stack and in v0 and a1. |
1880 if (expr->is_compound()) { | 1880 if (expr->is_compound()) { |
1881 VisitForStackValue(property->obj()); | 1881 VisitForStackValue(property->obj()); |
1882 VisitForStackValue(property->key()); | 1882 VisitForStackValue(property->key()); |
1883 __ ld(LoadIC::ReceiverRegister(), MemOperand(sp, 1 * kPointerSize)); | 1883 __ ld(LoadConvention::ReceiverRegister(), |
1884 __ ld(LoadIC::NameRegister(), MemOperand(sp, 0)); | 1884 MemOperand(sp, 1 * kPointerSize)); |
| 1885 __ ld(LoadConvention::NameRegister(), MemOperand(sp, 0)); |
1885 } else { | 1886 } else { |
1886 VisitForStackValue(property->obj()); | 1887 VisitForStackValue(property->obj()); |
1887 VisitForStackValue(property->key()); | 1888 VisitForStackValue(property->key()); |
1888 } | 1889 } |
1889 break; | 1890 break; |
1890 } | 1891 } |
1891 | 1892 |
1892 // For compound assignments we need another deoptimization point after the | 1893 // For compound assignments we need another deoptimization point after the |
1893 // variable/property load. | 1894 // variable/property load. |
1894 if (expr->is_compound()) { | 1895 if (expr->is_compound()) { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2012 | 2013 |
2013 case Yield::DELEGATING: { | 2014 case Yield::DELEGATING: { |
2014 VisitForStackValue(expr->generator_object()); | 2015 VisitForStackValue(expr->generator_object()); |
2015 | 2016 |
2016 // Initial stack layout is as follows: | 2017 // Initial stack layout is as follows: |
2017 // [sp + 1 * kPointerSize] iter | 2018 // [sp + 1 * kPointerSize] iter |
2018 // [sp + 0 * kPointerSize] g | 2019 // [sp + 0 * kPointerSize] g |
2019 | 2020 |
2020 Label l_catch, l_try, l_suspend, l_continuation, l_resume; | 2021 Label l_catch, l_try, l_suspend, l_continuation, l_resume; |
2021 Label l_next, l_call; | 2022 Label l_next, l_call; |
2022 Register load_receiver = LoadIC::ReceiverRegister(); | 2023 Register load_receiver = LoadConvention::ReceiverRegister(); |
2023 Register load_name = LoadIC::NameRegister(); | 2024 Register load_name = LoadConvention::NameRegister(); |
2024 // Initial send value is undefined. | 2025 // Initial send value is undefined. |
2025 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); | 2026 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); |
2026 __ Branch(&l_next); | 2027 __ Branch(&l_next); |
2027 | 2028 |
2028 // catch (e) { receiver = iter; f = 'throw'; arg = e; goto l_call; } | 2029 // catch (e) { receiver = iter; f = 'throw'; arg = e; goto l_call; } |
2029 __ bind(&l_catch); | 2030 __ bind(&l_catch); |
2030 __ mov(a0, v0); | 2031 __ mov(a0, v0); |
2031 handler_table()->set(expr->index(), Smi::FromInt(l_catch.pos())); | 2032 handler_table()->set(expr->index(), Smi::FromInt(l_catch.pos())); |
2032 __ LoadRoot(a2, Heap::kthrow_stringRootIndex); // "throw" | 2033 __ LoadRoot(a2, Heap::kthrow_stringRootIndex); // "throw" |
2033 __ ld(a3, MemOperand(sp, 1 * kPointerSize)); // iter | 2034 __ ld(a3, MemOperand(sp, 1 * kPointerSize)); // iter |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2069 __ bind(&l_next); | 2070 __ bind(&l_next); |
2070 __ LoadRoot(load_name, Heap::knext_stringRootIndex); // "next" | 2071 __ LoadRoot(load_name, Heap::knext_stringRootIndex); // "next" |
2071 __ ld(a3, MemOperand(sp, 1 * kPointerSize)); // iter | 2072 __ ld(a3, MemOperand(sp, 1 * kPointerSize)); // iter |
2072 __ Push(load_name, a3, a0); // "next", iter, received | 2073 __ Push(load_name, a3, a0); // "next", iter, received |
2073 | 2074 |
2074 // result = receiver[f](arg); | 2075 // result = receiver[f](arg); |
2075 __ bind(&l_call); | 2076 __ bind(&l_call); |
2076 __ ld(load_receiver, MemOperand(sp, kPointerSize)); | 2077 __ ld(load_receiver, MemOperand(sp, kPointerSize)); |
2077 __ ld(load_name, MemOperand(sp, 2 * kPointerSize)); | 2078 __ ld(load_name, MemOperand(sp, 2 * kPointerSize)); |
2078 if (FLAG_vector_ics) { | 2079 if (FLAG_vector_ics) { |
2079 __ li(LoadIC::SlotRegister(), | 2080 __ li(VectorLoadConvention::SlotRegister(), |
2080 Operand(Smi::FromInt(expr->KeyedLoadFeedbackSlot()))); | 2081 Operand(Smi::FromInt(expr->KeyedLoadFeedbackSlot()))); |
2081 } | 2082 } |
2082 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); | 2083 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
2083 CallIC(ic, TypeFeedbackId::None()); | 2084 CallIC(ic, TypeFeedbackId::None()); |
2084 __ mov(a0, v0); | 2085 __ mov(a0, v0); |
2085 __ mov(a1, a0); | 2086 __ mov(a1, a0); |
2086 __ sd(a1, MemOperand(sp, 2 * kPointerSize)); | 2087 __ sd(a1, MemOperand(sp, 2 * kPointerSize)); |
2087 CallFunctionStub stub(isolate(), 1, CALL_AS_METHOD); | 2088 CallFunctionStub stub(isolate(), 1, CALL_AS_METHOD); |
2088 __ CallStub(&stub); | 2089 __ CallStub(&stub); |
2089 | 2090 |
2090 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2091 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
2091 __ Drop(1); // The function is still on the stack; drop it. | 2092 __ Drop(1); // The function is still on the stack; drop it. |
2092 | 2093 |
2093 // if (!result.done) goto l_try; | 2094 // if (!result.done) goto l_try; |
2094 __ Move(load_receiver, v0); | 2095 __ Move(load_receiver, v0); |
2095 | 2096 |
2096 __ push(load_receiver); // save result | 2097 __ push(load_receiver); // save result |
2097 __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done" | 2098 __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done" |
2098 if (FLAG_vector_ics) { | 2099 if (FLAG_vector_ics) { |
2099 __ li(LoadIC::SlotRegister(), | 2100 __ li(VectorLoadConvention::SlotRegister(), |
2100 Operand(Smi::FromInt(expr->DoneFeedbackSlot()))); | 2101 Operand(Smi::FromInt(expr->DoneFeedbackSlot()))); |
2101 } | 2102 } |
2102 CallLoadIC(NOT_CONTEXTUAL); // v0=result.done | 2103 CallLoadIC(NOT_CONTEXTUAL); // v0=result.done |
2103 __ mov(a0, v0); | 2104 __ mov(a0, v0); |
2104 Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate()); | 2105 Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate()); |
2105 CallIC(bool_ic); | 2106 CallIC(bool_ic); |
2106 __ Branch(&l_try, eq, v0, Operand(zero_reg)); | 2107 __ Branch(&l_try, eq, v0, Operand(zero_reg)); |
2107 | 2108 |
2108 // result.value | 2109 // result.value |
2109 __ pop(load_receiver); // result | 2110 __ pop(load_receiver); // result |
2110 __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value" | 2111 __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value" |
2111 if (FLAG_vector_ics) { | 2112 if (FLAG_vector_ics) { |
2112 __ li(LoadIC::SlotRegister(), | 2113 __ li(VectorLoadConvention::SlotRegister(), |
2113 Operand(Smi::FromInt(expr->ValueFeedbackSlot()))); | 2114 Operand(Smi::FromInt(expr->ValueFeedbackSlot()))); |
2114 } | 2115 } |
2115 CallLoadIC(NOT_CONTEXTUAL); // v0=result.value | 2116 CallLoadIC(NOT_CONTEXTUAL); // v0=result.value |
2116 context()->DropAndPlug(2, v0); // drop iter and g | 2117 context()->DropAndPlug(2, v0); // drop iter and g |
2117 break; | 2118 break; |
2118 } | 2119 } |
2119 } | 2120 } |
2120 } | 2121 } |
2121 | 2122 |
2122 | 2123 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2269 // Only the value field needs a write barrier, as the other values are in the | 2270 // Only the value field needs a write barrier, as the other values are in the |
2270 // root set. | 2271 // root set. |
2271 __ RecordWriteField(v0, JSGeneratorObject::kResultValuePropertyOffset, | 2272 __ RecordWriteField(v0, JSGeneratorObject::kResultValuePropertyOffset, |
2272 a2, a3, kRAHasBeenSaved, kDontSaveFPRegs); | 2273 a2, a3, kRAHasBeenSaved, kDontSaveFPRegs); |
2273 } | 2274 } |
2274 | 2275 |
2275 | 2276 |
2276 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { | 2277 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { |
2277 SetSourcePosition(prop->position()); | 2278 SetSourcePosition(prop->position()); |
2278 Literal* key = prop->key()->AsLiteral(); | 2279 Literal* key = prop->key()->AsLiteral(); |
2279 __ li(LoadIC::NameRegister(), Operand(key->value())); | 2280 __ li(LoadConvention::NameRegister(), Operand(key->value())); |
2280 if (FLAG_vector_ics) { | 2281 if (FLAG_vector_ics) { |
2281 __ li(LoadIC::SlotRegister(), | 2282 __ li(VectorLoadConvention::SlotRegister(), |
2282 Operand(Smi::FromInt(prop->PropertyFeedbackSlot()))); | 2283 Operand(Smi::FromInt(prop->PropertyFeedbackSlot()))); |
2283 CallLoadIC(NOT_CONTEXTUAL); | 2284 CallLoadIC(NOT_CONTEXTUAL); |
2284 } else { | 2285 } else { |
2285 CallLoadIC(NOT_CONTEXTUAL, prop->PropertyFeedbackId()); | 2286 CallLoadIC(NOT_CONTEXTUAL, prop->PropertyFeedbackId()); |
2286 } | 2287 } |
2287 } | 2288 } |
2288 | 2289 |
2289 | 2290 |
2290 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { | 2291 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { |
2291 SetSourcePosition(prop->position()); | 2292 SetSourcePosition(prop->position()); |
2292 // Call keyed load IC. It has register arguments receiver and key. | 2293 // Call keyed load IC. It has register arguments receiver and key. |
2293 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); | 2294 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
2294 if (FLAG_vector_ics) { | 2295 if (FLAG_vector_ics) { |
2295 __ li(LoadIC::SlotRegister(), | 2296 __ li(VectorLoadConvention::SlotRegister(), |
2296 Operand(Smi::FromInt(prop->PropertyFeedbackSlot()))); | 2297 Operand(Smi::FromInt(prop->PropertyFeedbackSlot()))); |
2297 CallIC(ic); | 2298 CallIC(ic); |
2298 } else { | 2299 } else { |
2299 CallIC(ic, prop->PropertyFeedbackId()); | 2300 CallIC(ic, prop->PropertyFeedbackId()); |
2300 } | 2301 } |
2301 } | 2302 } |
2302 | 2303 |
2303 | 2304 |
2304 void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, | 2305 void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, |
2305 Token::Value op, | 2306 Token::Value op, |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2423 switch (assign_type) { | 2424 switch (assign_type) { |
2424 case VARIABLE: { | 2425 case VARIABLE: { |
2425 Variable* var = expr->AsVariableProxy()->var(); | 2426 Variable* var = expr->AsVariableProxy()->var(); |
2426 EffectContext context(this); | 2427 EffectContext context(this); |
2427 EmitVariableAssignment(var, Token::ASSIGN); | 2428 EmitVariableAssignment(var, Token::ASSIGN); |
2428 break; | 2429 break; |
2429 } | 2430 } |
2430 case NAMED_PROPERTY: { | 2431 case NAMED_PROPERTY: { |
2431 __ push(result_register()); // Preserve value. | 2432 __ push(result_register()); // Preserve value. |
2432 VisitForAccumulatorValue(prop->obj()); | 2433 VisitForAccumulatorValue(prop->obj()); |
2433 __ mov(StoreIC::ReceiverRegister(), result_register()); | 2434 __ mov(StoreConvention::ReceiverRegister(), result_register()); |
2434 __ pop(StoreIC::ValueRegister()); // Restore value. | 2435 __ pop(StoreConvention::ValueRegister()); // Restore value. |
2435 __ li(StoreIC::NameRegister(), | 2436 __ li(StoreConvention::NameRegister(), |
2436 Operand(prop->key()->AsLiteral()->value())); | 2437 Operand(prop->key()->AsLiteral()->value())); |
2437 CallStoreIC(); | 2438 CallStoreIC(); |
2438 break; | 2439 break; |
2439 } | 2440 } |
2440 case KEYED_PROPERTY: { | 2441 case KEYED_PROPERTY: { |
2441 __ push(result_register()); // Preserve value. | 2442 __ push(result_register()); // Preserve value. |
2442 VisitForStackValue(prop->obj()); | 2443 VisitForStackValue(prop->obj()); |
2443 VisitForAccumulatorValue(prop->key()); | 2444 VisitForAccumulatorValue(prop->key()); |
2444 __ Move(KeyedStoreIC::NameRegister(), result_register()); | 2445 __ Move(StoreConvention::NameRegister(), result_register()); |
2445 __ Pop(KeyedStoreIC::ValueRegister(), KeyedStoreIC::ReceiverRegister()); | 2446 __ Pop(StoreConvention::ValueRegister(), |
| 2447 StoreConvention::ReceiverRegister()); |
2446 Handle<Code> ic = strict_mode() == SLOPPY | 2448 Handle<Code> ic = strict_mode() == SLOPPY |
2447 ? isolate()->builtins()->KeyedStoreIC_Initialize() | 2449 ? isolate()->builtins()->KeyedStoreIC_Initialize() |
2448 : isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); | 2450 : isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); |
2449 CallIC(ic); | 2451 CallIC(ic); |
2450 break; | 2452 break; |
2451 } | 2453 } |
2452 } | 2454 } |
2453 context()->Plug(v0); | 2455 context()->Plug(v0); |
2454 } | 2456 } |
2455 | 2457 |
2456 | 2458 |
2457 void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( | 2459 void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( |
2458 Variable* var, MemOperand location) { | 2460 Variable* var, MemOperand location) { |
2459 __ sd(result_register(), location); | 2461 __ sd(result_register(), location); |
2460 if (var->IsContextSlot()) { | 2462 if (var->IsContextSlot()) { |
2461 // RecordWrite may destroy all its register arguments. | 2463 // RecordWrite may destroy all its register arguments. |
2462 __ Move(a3, result_register()); | 2464 __ Move(a3, result_register()); |
2463 int offset = Context::SlotOffset(var->index()); | 2465 int offset = Context::SlotOffset(var->index()); |
2464 __ RecordWriteContextSlot( | 2466 __ RecordWriteContextSlot( |
2465 a1, offset, a3, a2, kRAHasBeenSaved, kDontSaveFPRegs); | 2467 a1, offset, a3, a2, kRAHasBeenSaved, kDontSaveFPRegs); |
2466 } | 2468 } |
2467 } | 2469 } |
2468 | 2470 |
2469 | 2471 |
2470 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) { | 2472 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) { |
2471 if (var->IsUnallocated()) { | 2473 if (var->IsUnallocated()) { |
2472 // Global var, const, or let. | 2474 // Global var, const, or let. |
2473 __ mov(StoreIC::ValueRegister(), result_register()); | 2475 __ mov(StoreConvention::ValueRegister(), result_register()); |
2474 __ li(StoreIC::NameRegister(), Operand(var->name())); | 2476 __ li(StoreConvention::NameRegister(), Operand(var->name())); |
2475 __ ld(StoreIC::ReceiverRegister(), GlobalObjectOperand()); | 2477 __ ld(StoreConvention::ReceiverRegister(), GlobalObjectOperand()); |
2476 CallStoreIC(); | 2478 CallStoreIC(); |
2477 } else if (op == Token::INIT_CONST_LEGACY) { | 2479 } else if (op == Token::INIT_CONST_LEGACY) { |
2478 // Const initializers need a write barrier. | 2480 // Const initializers need a write barrier. |
2479 DCHECK(!var->IsParameter()); // No const parameters. | 2481 DCHECK(!var->IsParameter()); // No const parameters. |
2480 if (var->IsLookupSlot()) { | 2482 if (var->IsLookupSlot()) { |
2481 __ li(a0, Operand(var->name())); | 2483 __ li(a0, Operand(var->name())); |
2482 __ Push(v0, cp, a0); // Context and name. | 2484 __ Push(v0, cp, a0); // Context and name. |
2483 __ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot, 3); | 2485 __ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot, 3); |
2484 } else { | 2486 } else { |
2485 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); | 2487 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2538 | 2540 |
2539 | 2541 |
2540 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { | 2542 void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) { |
2541 // Assignment to a property, using a named store IC. | 2543 // Assignment to a property, using a named store IC. |
2542 Property* prop = expr->target()->AsProperty(); | 2544 Property* prop = expr->target()->AsProperty(); |
2543 DCHECK(prop != NULL); | 2545 DCHECK(prop != NULL); |
2544 DCHECK(prop->key()->IsLiteral()); | 2546 DCHECK(prop->key()->IsLiteral()); |
2545 | 2547 |
2546 // Record source code position before IC call. | 2548 // Record source code position before IC call. |
2547 SetSourcePosition(expr->position()); | 2549 SetSourcePosition(expr->position()); |
2548 __ mov(StoreIC::ValueRegister(), result_register()); | 2550 __ mov(StoreConvention::ValueRegister(), result_register()); |
2549 __ li(StoreIC::NameRegister(), Operand(prop->key()->AsLiteral()->value())); | 2551 __ li(StoreConvention::NameRegister(), |
2550 __ pop(StoreIC::ReceiverRegister()); | 2552 Operand(prop->key()->AsLiteral()->value())); |
| 2553 __ pop(StoreConvention::ReceiverRegister()); |
2551 CallStoreIC(expr->AssignmentFeedbackId()); | 2554 CallStoreIC(expr->AssignmentFeedbackId()); |
2552 | 2555 |
2553 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2556 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
2554 context()->Plug(v0); | 2557 context()->Plug(v0); |
2555 } | 2558 } |
2556 | 2559 |
2557 | 2560 |
2558 void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { | 2561 void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
2559 // Assignment to a property, using a keyed store IC. | 2562 // Assignment to a property, using a keyed store IC. |
2560 | 2563 |
2561 // Record source code position before IC call. | 2564 // Record source code position before IC call. |
2562 SetSourcePosition(expr->position()); | 2565 SetSourcePosition(expr->position()); |
2563 // Call keyed store IC. | 2566 // Call keyed store IC. |
2564 // The arguments are: | 2567 // The arguments are: |
2565 // - a0 is the value, | 2568 // - a0 is the value, |
2566 // - a1 is the key, | 2569 // - a1 is the key, |
2567 // - a2 is the receiver. | 2570 // - a2 is the receiver. |
2568 __ mov(KeyedStoreIC::ValueRegister(), result_register()); | 2571 __ mov(StoreConvention::ValueRegister(), result_register()); |
2569 __ Pop(KeyedStoreIC::ReceiverRegister(), KeyedStoreIC::NameRegister()); | 2572 __ Pop(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister()); |
2570 DCHECK(KeyedStoreIC::ValueRegister().is(a0)); | 2573 DCHECK(StoreConvention::ValueRegister().is(a0)); |
2571 | 2574 |
2572 Handle<Code> ic = strict_mode() == SLOPPY | 2575 Handle<Code> ic = strict_mode() == SLOPPY |
2573 ? isolate()->builtins()->KeyedStoreIC_Initialize() | 2576 ? isolate()->builtins()->KeyedStoreIC_Initialize() |
2574 : isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); | 2577 : isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); |
2575 CallIC(ic, expr->AssignmentFeedbackId()); | 2578 CallIC(ic, expr->AssignmentFeedbackId()); |
2576 | 2579 |
2577 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 2580 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
2578 context()->Plug(v0); | 2581 context()->Plug(v0); |
2579 } | 2582 } |
2580 | 2583 |
2581 | 2584 |
2582 void FullCodeGenerator::VisitProperty(Property* expr) { | 2585 void FullCodeGenerator::VisitProperty(Property* expr) { |
2583 Comment cmnt(masm_, "[ Property"); | 2586 Comment cmnt(masm_, "[ Property"); |
2584 Expression* key = expr->key(); | 2587 Expression* key = expr->key(); |
2585 | 2588 |
2586 if (key->IsPropertyName()) { | 2589 if (key->IsPropertyName()) { |
2587 VisitForAccumulatorValue(expr->obj()); | 2590 VisitForAccumulatorValue(expr->obj()); |
2588 __ Move(LoadIC::ReceiverRegister(), v0); | 2591 __ Move(LoadConvention::ReceiverRegister(), v0); |
2589 EmitNamedPropertyLoad(expr); | 2592 EmitNamedPropertyLoad(expr); |
2590 PrepareForBailoutForId(expr->LoadId(), TOS_REG); | 2593 PrepareForBailoutForId(expr->LoadId(), TOS_REG); |
2591 context()->Plug(v0); | 2594 context()->Plug(v0); |
2592 } else { | 2595 } else { |
2593 VisitForStackValue(expr->obj()); | 2596 VisitForStackValue(expr->obj()); |
2594 VisitForAccumulatorValue(expr->key()); | 2597 VisitForAccumulatorValue(expr->key()); |
2595 __ Move(LoadIC::NameRegister(), v0); | 2598 __ Move(LoadConvention::NameRegister(), v0); |
2596 __ pop(LoadIC::ReceiverRegister()); | 2599 __ pop(LoadConvention::ReceiverRegister()); |
2597 EmitKeyedPropertyLoad(expr); | 2600 EmitKeyedPropertyLoad(expr); |
2598 context()->Plug(v0); | 2601 context()->Plug(v0); |
2599 } | 2602 } |
2600 } | 2603 } |
2601 | 2604 |
2602 | 2605 |
2603 void FullCodeGenerator::CallIC(Handle<Code> code, | 2606 void FullCodeGenerator::CallIC(Handle<Code> code, |
2604 TypeFeedbackId id) { | 2607 TypeFeedbackId id) { |
2605 ic_total_count_++; | 2608 ic_total_count_++; |
2606 __ Call(code, RelocInfo::CODE_TARGET, id); | 2609 __ Call(code, RelocInfo::CODE_TARGET, id); |
(...skipping 13 matching lines...) Expand all Loading... |
2620 { StackValueContext context(this); | 2623 { StackValueContext context(this); |
2621 EmitVariableLoad(callee->AsVariableProxy()); | 2624 EmitVariableLoad(callee->AsVariableProxy()); |
2622 PrepareForBailout(callee, NO_REGISTERS); | 2625 PrepareForBailout(callee, NO_REGISTERS); |
2623 } | 2626 } |
2624 // Push undefined as receiver. This is patched in the method prologue if it | 2627 // Push undefined as receiver. This is patched in the method prologue if it |
2625 // is a sloppy mode method. | 2628 // is a sloppy mode method. |
2626 __ Push(isolate()->factory()->undefined_value()); | 2629 __ Push(isolate()->factory()->undefined_value()); |
2627 } else { | 2630 } else { |
2628 // Load the function from the receiver. | 2631 // Load the function from the receiver. |
2629 DCHECK(callee->IsProperty()); | 2632 DCHECK(callee->IsProperty()); |
2630 __ ld(LoadIC::ReceiverRegister(), MemOperand(sp, 0)); | 2633 __ ld(LoadConvention::ReceiverRegister(), MemOperand(sp, 0)); |
2631 EmitNamedPropertyLoad(callee->AsProperty()); | 2634 EmitNamedPropertyLoad(callee->AsProperty()); |
2632 PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); | 2635 PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); |
2633 // Push the target function under the receiver. | 2636 // Push the target function under the receiver. |
2634 __ ld(at, MemOperand(sp, 0)); | 2637 __ ld(at, MemOperand(sp, 0)); |
2635 __ push(at); | 2638 __ push(at); |
2636 __ sd(v0, MemOperand(sp, kPointerSize)); | 2639 __ sd(v0, MemOperand(sp, kPointerSize)); |
2637 } | 2640 } |
2638 | 2641 |
2639 EmitCall(expr, call_type); | 2642 EmitCall(expr, call_type); |
2640 } | 2643 } |
2641 | 2644 |
2642 | 2645 |
2643 // Code common for calls using the IC. | 2646 // Code common for calls using the IC. |
2644 void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr, | 2647 void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr, |
2645 Expression* key) { | 2648 Expression* key) { |
2646 // Load the key. | 2649 // Load the key. |
2647 VisitForAccumulatorValue(key); | 2650 VisitForAccumulatorValue(key); |
2648 | 2651 |
2649 Expression* callee = expr->expression(); | 2652 Expression* callee = expr->expression(); |
2650 | 2653 |
2651 // Load the function from the receiver. | 2654 // Load the function from the receiver. |
2652 DCHECK(callee->IsProperty()); | 2655 DCHECK(callee->IsProperty()); |
2653 __ ld(LoadIC::ReceiverRegister(), MemOperand(sp, 0)); | 2656 __ ld(LoadConvention::ReceiverRegister(), MemOperand(sp, 0)); |
2654 __ Move(LoadIC::NameRegister(), v0); | 2657 __ Move(LoadConvention::NameRegister(), v0); |
2655 EmitKeyedPropertyLoad(callee->AsProperty()); | 2658 EmitKeyedPropertyLoad(callee->AsProperty()); |
2656 PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); | 2659 PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG); |
2657 | 2660 |
2658 // Push the target function under the receiver. | 2661 // Push the target function under the receiver. |
2659 __ ld(at, MemOperand(sp, 0)); | 2662 __ ld(at, MemOperand(sp, 0)); |
2660 __ push(at); | 2663 __ push(at); |
2661 __ sd(v0, MemOperand(sp, kPointerSize)); | 2664 __ sd(v0, MemOperand(sp, kPointerSize)); |
2662 | 2665 |
2663 EmitCall(expr, CallIC::METHOD); | 2666 EmitCall(expr, CallIC::METHOD); |
2664 } | 2667 } |
(...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4088 EmitInlineRuntimeCall(expr); | 4091 EmitInlineRuntimeCall(expr); |
4089 return; | 4092 return; |
4090 } | 4093 } |
4091 | 4094 |
4092 Comment cmnt(masm_, "[ CallRuntime"); | 4095 Comment cmnt(masm_, "[ CallRuntime"); |
4093 ZoneList<Expression*>* args = expr->arguments(); | 4096 ZoneList<Expression*>* args = expr->arguments(); |
4094 int arg_count = args->length(); | 4097 int arg_count = args->length(); |
4095 | 4098 |
4096 if (expr->is_jsruntime()) { | 4099 if (expr->is_jsruntime()) { |
4097 // Push the builtins object as the receiver. | 4100 // Push the builtins object as the receiver. |
4098 Register receiver = LoadIC::ReceiverRegister(); | 4101 Register receiver = LoadConvention::ReceiverRegister(); |
4099 __ ld(receiver, GlobalObjectOperand()); | 4102 __ ld(receiver, GlobalObjectOperand()); |
4100 __ ld(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset)); | 4103 __ ld(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset)); |
4101 __ push(receiver); | 4104 __ push(receiver); |
4102 | 4105 |
4103 // Load the function from the receiver. | 4106 // Load the function from the receiver. |
4104 __ li(LoadIC::NameRegister(), Operand(expr->name())); | 4107 __ li(LoadConvention::NameRegister(), Operand(expr->name())); |
4105 if (FLAG_vector_ics) { | 4108 if (FLAG_vector_ics) { |
4106 __ li(LoadIC::SlotRegister(), | 4109 __ li(VectorLoadConvention::SlotRegister(), |
4107 Operand(Smi::FromInt(expr->CallRuntimeFeedbackSlot()))); | 4110 Operand(Smi::FromInt(expr->CallRuntimeFeedbackSlot()))); |
4108 CallLoadIC(NOT_CONTEXTUAL); | 4111 CallLoadIC(NOT_CONTEXTUAL); |
4109 } else { | 4112 } else { |
4110 CallLoadIC(NOT_CONTEXTUAL, expr->CallRuntimeFeedbackId()); | 4113 CallLoadIC(NOT_CONTEXTUAL, expr->CallRuntimeFeedbackId()); |
4111 } | 4114 } |
4112 | 4115 |
4113 // Push the target function under the receiver. | 4116 // Push the target function under the receiver. |
4114 __ ld(at, MemOperand(sp, 0)); | 4117 __ ld(at, MemOperand(sp, 0)); |
4115 __ push(at); | 4118 __ push(at); |
4116 __ sd(v0, MemOperand(sp, kPointerSize)); | 4119 __ sd(v0, MemOperand(sp, kPointerSize)); |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4279 EmitVariableLoad(expr->expression()->AsVariableProxy()); | 4282 EmitVariableLoad(expr->expression()->AsVariableProxy()); |
4280 } else { | 4283 } else { |
4281 // Reserve space for result of postfix operation. | 4284 // Reserve space for result of postfix operation. |
4282 if (expr->is_postfix() && !context()->IsEffect()) { | 4285 if (expr->is_postfix() && !context()->IsEffect()) { |
4283 __ li(at, Operand(Smi::FromInt(0))); | 4286 __ li(at, Operand(Smi::FromInt(0))); |
4284 __ push(at); | 4287 __ push(at); |
4285 } | 4288 } |
4286 if (assign_type == NAMED_PROPERTY) { | 4289 if (assign_type == NAMED_PROPERTY) { |
4287 // Put the object both on the stack and in the register. | 4290 // Put the object both on the stack and in the register. |
4288 VisitForStackValue(prop->obj()); | 4291 VisitForStackValue(prop->obj()); |
4289 __ ld(LoadIC::ReceiverRegister(), MemOperand(sp, 0)); | 4292 __ ld(LoadConvention::ReceiverRegister(), MemOperand(sp, 0)); |
4290 EmitNamedPropertyLoad(prop); | 4293 EmitNamedPropertyLoad(prop); |
4291 } else { | 4294 } else { |
4292 VisitForStackValue(prop->obj()); | 4295 VisitForStackValue(prop->obj()); |
4293 VisitForStackValue(prop->key()); | 4296 VisitForStackValue(prop->key()); |
4294 __ ld(LoadIC::ReceiverRegister(), MemOperand(sp, 1 * kPointerSize)); | 4297 __ ld(LoadConvention::ReceiverRegister(), |
4295 __ ld(LoadIC::NameRegister(), MemOperand(sp, 0)); | 4298 MemOperand(sp, 1 * kPointerSize)); |
| 4299 __ ld(LoadConvention::NameRegister(), MemOperand(sp, 0)); |
4296 EmitKeyedPropertyLoad(prop); | 4300 EmitKeyedPropertyLoad(prop); |
4297 } | 4301 } |
4298 } | 4302 } |
4299 | 4303 |
4300 // We need a second deoptimization point after loading the value | 4304 // We need a second deoptimization point after loading the value |
4301 // in case evaluating the property load my have a side effect. | 4305 // in case evaluating the property load my have a side effect. |
4302 if (assign_type == VARIABLE) { | 4306 if (assign_type == VARIABLE) { |
4303 PrepareForBailout(expr->expression(), TOS_REG); | 4307 PrepareForBailout(expr->expression(), TOS_REG); |
4304 } else { | 4308 } else { |
4305 PrepareForBailoutForId(prop->LoadId(), TOS_REG); | 4309 PrepareForBailoutForId(prop->LoadId(), TOS_REG); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4396 context()->PlugTOS(); | 4400 context()->PlugTOS(); |
4397 } | 4401 } |
4398 } else { | 4402 } else { |
4399 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), | 4403 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), |
4400 Token::ASSIGN); | 4404 Token::ASSIGN); |
4401 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4405 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
4402 context()->Plug(v0); | 4406 context()->Plug(v0); |
4403 } | 4407 } |
4404 break; | 4408 break; |
4405 case NAMED_PROPERTY: { | 4409 case NAMED_PROPERTY: { |
4406 __ mov(StoreIC::ValueRegister(), result_register()); | 4410 __ mov(StoreConvention::ValueRegister(), result_register()); |
4407 __ li(StoreIC::NameRegister(), | 4411 __ li(StoreConvention::NameRegister(), |
4408 Operand(prop->key()->AsLiteral()->value())); | 4412 Operand(prop->key()->AsLiteral()->value())); |
4409 __ pop(StoreIC::ReceiverRegister()); | 4413 __ pop(StoreConvention::ReceiverRegister()); |
4410 CallStoreIC(expr->CountStoreFeedbackId()); | 4414 CallStoreIC(expr->CountStoreFeedbackId()); |
4411 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4415 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
4412 if (expr->is_postfix()) { | 4416 if (expr->is_postfix()) { |
4413 if (!context()->IsEffect()) { | 4417 if (!context()->IsEffect()) { |
4414 context()->PlugTOS(); | 4418 context()->PlugTOS(); |
4415 } | 4419 } |
4416 } else { | 4420 } else { |
4417 context()->Plug(v0); | 4421 context()->Plug(v0); |
4418 } | 4422 } |
4419 break; | 4423 break; |
4420 } | 4424 } |
4421 case KEYED_PROPERTY: { | 4425 case KEYED_PROPERTY: { |
4422 __ mov(KeyedStoreIC::ValueRegister(), result_register()); | 4426 __ mov(StoreConvention::ValueRegister(), result_register()); |
4423 __ Pop(KeyedStoreIC::ReceiverRegister(), KeyedStoreIC::NameRegister()); | 4427 __ Pop(StoreConvention::ReceiverRegister(), |
| 4428 StoreConvention::NameRegister()); |
4424 Handle<Code> ic = strict_mode() == SLOPPY | 4429 Handle<Code> ic = strict_mode() == SLOPPY |
4425 ? isolate()->builtins()->KeyedStoreIC_Initialize() | 4430 ? isolate()->builtins()->KeyedStoreIC_Initialize() |
4426 : isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); | 4431 : isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); |
4427 CallIC(ic, expr->CountStoreFeedbackId()); | 4432 CallIC(ic, expr->CountStoreFeedbackId()); |
4428 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4433 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
4429 if (expr->is_postfix()) { | 4434 if (expr->is_postfix()) { |
4430 if (!context()->IsEffect()) { | 4435 if (!context()->IsEffect()) { |
4431 context()->PlugTOS(); | 4436 context()->PlugTOS(); |
4432 } | 4437 } |
4433 } else { | 4438 } else { |
4434 context()->Plug(v0); | 4439 context()->Plug(v0); |
4435 } | 4440 } |
4436 break; | 4441 break; |
4437 } | 4442 } |
4438 } | 4443 } |
4439 } | 4444 } |
4440 | 4445 |
4441 | 4446 |
4442 void FullCodeGenerator::VisitForTypeofValue(Expression* expr) { | 4447 void FullCodeGenerator::VisitForTypeofValue(Expression* expr) { |
4443 DCHECK(!context()->IsEffect()); | 4448 DCHECK(!context()->IsEffect()); |
4444 DCHECK(!context()->IsTest()); | 4449 DCHECK(!context()->IsTest()); |
4445 VariableProxy* proxy = expr->AsVariableProxy(); | 4450 VariableProxy* proxy = expr->AsVariableProxy(); |
4446 if (proxy != NULL && proxy->var()->IsUnallocated()) { | 4451 if (proxy != NULL && proxy->var()->IsUnallocated()) { |
4447 Comment cmnt(masm_, "[ Global variable"); | 4452 Comment cmnt(masm_, "[ Global variable"); |
4448 __ ld(LoadIC::ReceiverRegister(), GlobalObjectOperand()); | 4453 __ ld(LoadConvention::ReceiverRegister(), GlobalObjectOperand()); |
4449 __ li(LoadIC::NameRegister(), Operand(proxy->name())); | 4454 __ li(LoadConvention::NameRegister(), Operand(proxy->name())); |
4450 if (FLAG_vector_ics) { | 4455 if (FLAG_vector_ics) { |
4451 __ li(LoadIC::SlotRegister(), | 4456 __ li(VectorLoadConvention::SlotRegister(), |
4452 Operand(Smi::FromInt(proxy->VariableFeedbackSlot()))); | 4457 Operand(Smi::FromInt(proxy->VariableFeedbackSlot()))); |
4453 } | 4458 } |
4454 // Use a regular load, not a contextual load, to avoid a reference | 4459 // Use a regular load, not a contextual load, to avoid a reference |
4455 // error. | 4460 // error. |
4456 CallLoadIC(NOT_CONTEXTUAL); | 4461 CallLoadIC(NOT_CONTEXTUAL); |
4457 PrepareForBailout(expr, TOS_REG); | 4462 PrepareForBailout(expr, TOS_REG); |
4458 context()->Plug(v0); | 4463 context()->Plug(v0); |
4459 } else if (proxy != NULL && proxy->var()->IsLookupSlot()) { | 4464 } else if (proxy != NULL && proxy->var()->IsLookupSlot()) { |
4460 Comment cmnt(masm_, "[ Lookup slot"); | 4465 Comment cmnt(masm_, "[ Lookup slot"); |
4461 Label done, slow; | 4466 Label done, slow; |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4878 Assembler::target_address_at(pc_immediate_load_address)) == | 4883 Assembler::target_address_at(pc_immediate_load_address)) == |
4879 reinterpret_cast<uint64_t>( | 4884 reinterpret_cast<uint64_t>( |
4880 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4885 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4881 return OSR_AFTER_STACK_CHECK; | 4886 return OSR_AFTER_STACK_CHECK; |
4882 } | 4887 } |
4883 | 4888 |
4884 | 4889 |
4885 } } // namespace v8::internal | 4890 } } // namespace v8::internal |
4886 | 4891 |
4887 #endif // V8_TARGET_ARCH_MIPS64 | 4892 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |