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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
10 // | 10 // |
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1379 __ Branch(&fast, eq, temp, Operand(t0)); | 1379 __ Branch(&fast, eq, temp, Operand(t0)); |
1380 // Check that extension is NULL. | 1380 // Check that extension is NULL. |
1381 __ lw(temp, ContextOperand(next, Context::EXTENSION_INDEX)); | 1381 __ lw(temp, ContextOperand(next, Context::EXTENSION_INDEX)); |
1382 __ Branch(slow, ne, temp, Operand(zero_reg)); | 1382 __ Branch(slow, ne, temp, Operand(zero_reg)); |
1383 // Load next context in chain. | 1383 // Load next context in chain. |
1384 __ lw(next, ContextOperand(next, Context::PREVIOUS_INDEX)); | 1384 __ lw(next, ContextOperand(next, Context::PREVIOUS_INDEX)); |
1385 __ Branch(&loop); | 1385 __ Branch(&loop); |
1386 __ bind(&fast); | 1386 __ bind(&fast); |
1387 } | 1387 } |
1388 | 1388 |
1389 __ lw(LoadIC::ReceiverRegister(), GlobalObjectOperand()); | 1389 __ lw(LoadConvention::ReceiverRegister(), GlobalObjectOperand()); |
1390 __ li(LoadIC::NameRegister(), Operand(proxy->var()->name())); | 1390 __ li(LoadConvention::NameRegister(), Operand(proxy->var()->name())); |
1391 if (FLAG_vector_ics) { | 1391 if (FLAG_vector_ics) { |
1392 __ li(LoadIC::SlotRegister(), | 1392 __ li(VectorLoadConvention::SlotRegister(), |
1393 Operand(Smi::FromInt(proxy->VariableFeedbackSlot()))); | 1393 Operand(Smi::FromInt(proxy->VariableFeedbackSlot()))); |
1394 } | 1394 } |
1395 | 1395 |
1396 ContextualMode mode = (typeof_state == INSIDE_TYPEOF) | 1396 ContextualMode mode = (typeof_state == INSIDE_TYPEOF) |
1397 ? NOT_CONTEXTUAL | 1397 ? NOT_CONTEXTUAL |
1398 : CONTEXTUAL; | 1398 : CONTEXTUAL; |
1399 CallLoadIC(mode); | 1399 CallLoadIC(mode); |
1400 } | 1400 } |
1401 | 1401 |
1402 | 1402 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1468 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) { | 1468 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) { |
1469 // Record position before possible IC call. | 1469 // Record position before possible IC call. |
1470 SetSourcePosition(proxy->position()); | 1470 SetSourcePosition(proxy->position()); |
1471 Variable* var = proxy->var(); | 1471 Variable* var = proxy->var(); |
1472 | 1472 |
1473 // Three cases: global variables, lookup variables, and all other types of | 1473 // Three cases: global variables, lookup variables, and all other types of |
1474 // variables. | 1474 // variables. |
1475 switch (var->location()) { | 1475 switch (var->location()) { |
1476 case Variable::UNALLOCATED: { | 1476 case Variable::UNALLOCATED: { |
1477 Comment cmnt(masm_, "[ Global variable"); | 1477 Comment cmnt(masm_, "[ Global variable"); |
1478 __ lw(LoadIC::ReceiverRegister(), GlobalObjectOperand()); | 1478 __ lw(LoadConvention::ReceiverRegister(), GlobalObjectOperand()); |
1479 __ li(LoadIC::NameRegister(), Operand(var->name())); | 1479 __ li(LoadConvention::NameRegister(), Operand(var->name())); |
1480 if (FLAG_vector_ics) { | 1480 if (FLAG_vector_ics) { |
1481 __ li(LoadIC::SlotRegister(), | 1481 __ li(VectorLoadConvention::SlotRegister(), |
1482 Operand(Smi::FromInt(proxy->VariableFeedbackSlot()))); | 1482 Operand(Smi::FromInt(proxy->VariableFeedbackSlot()))); |
1483 } | 1483 } |
1484 CallLoadIC(CONTEXTUAL); | 1484 CallLoadIC(CONTEXTUAL); |
1485 context()->Plug(v0); | 1485 context()->Plug(v0); |
1486 break; | 1486 break; |
1487 } | 1487 } |
1488 | 1488 |
1489 case Variable::PARAMETER: | 1489 case Variable::PARAMETER: |
1490 case Variable::LOCAL: | 1490 case Variable::LOCAL: |
1491 case Variable::CONTEXT: { | 1491 case Variable::CONTEXT: { |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1681 switch (property->kind()) { | 1681 switch (property->kind()) { |
1682 case ObjectLiteral::Property::CONSTANT: | 1682 case ObjectLiteral::Property::CONSTANT: |
1683 UNREACHABLE(); | 1683 UNREACHABLE(); |
1684 case ObjectLiteral::Property::MATERIALIZED_LITERAL: | 1684 case ObjectLiteral::Property::MATERIALIZED_LITERAL: |
1685 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); | 1685 DCHECK(!CompileTimeValue::IsCompileTimeValue(property->value())); |
1686 // Fall through. | 1686 // Fall through. |
1687 case ObjectLiteral::Property::COMPUTED: | 1687 case ObjectLiteral::Property::COMPUTED: |
1688 if (key->value()->IsInternalizedString()) { | 1688 if (key->value()->IsInternalizedString()) { |
1689 if (property->emit_store()) { | 1689 if (property->emit_store()) { |
1690 VisitForAccumulatorValue(value); | 1690 VisitForAccumulatorValue(value); |
1691 __ mov(StoreIC::ValueRegister(), result_register()); | 1691 __ mov(StoreConvention::ValueRegister(), result_register()); |
1692 DCHECK(StoreIC::ValueRegister().is(a0)); | 1692 DCHECK(StoreConvention::ValueRegister().is(a0)); |
1693 __ li(StoreIC::NameRegister(), Operand(key->value())); | 1693 __ li(StoreConvention::NameRegister(), Operand(key->value())); |
1694 __ lw(StoreIC::ReceiverRegister(), MemOperand(sp)); | 1694 __ lw(StoreConvention::ReceiverRegister(), MemOperand(sp)); |
1695 CallStoreIC(key->LiteralFeedbackId()); | 1695 CallStoreIC(key->LiteralFeedbackId()); |
1696 PrepareForBailoutForId(key->id(), NO_REGISTERS); | 1696 PrepareForBailoutForId(key->id(), NO_REGISTERS); |
1697 } else { | 1697 } else { |
1698 VisitForEffect(value); | 1698 VisitForEffect(value); |
1699 } | 1699 } |
1700 break; | 1700 break; |
1701 } | 1701 } |
1702 // Duplicate receiver on stack. | 1702 // Duplicate receiver on stack. |
1703 __ lw(a0, MemOperand(sp)); | 1703 __ lw(a0, MemOperand(sp)); |
1704 __ push(a0); | 1704 __ push(a0); |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1866 | 1866 |
1867 // Evaluate LHS expression. | 1867 // Evaluate LHS expression. |
1868 switch (assign_type) { | 1868 switch (assign_type) { |
1869 case VARIABLE: | 1869 case VARIABLE: |
1870 // Nothing to do here. | 1870 // Nothing to do here. |
1871 break; | 1871 break; |
1872 case NAMED_PROPERTY: | 1872 case NAMED_PROPERTY: |
1873 if (expr->is_compound()) { | 1873 if (expr->is_compound()) { |
1874 // We need the receiver both on the stack and in the register. | 1874 // We need the receiver both on the stack and in the register. |
1875 VisitForStackValue(property->obj()); | 1875 VisitForStackValue(property->obj()); |
1876 __ lw(LoadIC::ReceiverRegister(), MemOperand(sp, 0)); | 1876 __ lw(LoadConvention::ReceiverRegister(), MemOperand(sp, 0)); |
1877 } else { | 1877 } else { |
1878 VisitForStackValue(property->obj()); | 1878 VisitForStackValue(property->obj()); |
1879 } | 1879 } |
1880 break; | 1880 break; |
1881 case KEYED_PROPERTY: | 1881 case KEYED_PROPERTY: |
1882 // We need the key and receiver on both the stack and in v0 and a1. | 1882 // We need the key and receiver on both the stack and in v0 and a1. |
1883 if (expr->is_compound()) { | 1883 if (expr->is_compound()) { |
1884 VisitForStackValue(property->obj()); | 1884 VisitForStackValue(property->obj()); |
1885 VisitForStackValue(property->key()); | 1885 VisitForStackValue(property->key()); |
1886 __ lw(LoadIC::ReceiverRegister(), MemOperand(sp, 1 * kPointerSize)); | 1886 __ lw(LoadConvention::ReceiverRegister(), |
1887 __ lw(LoadIC::NameRegister(), MemOperand(sp, 0)); | 1887 MemOperand(sp, 1 * kPointerSize)); |
| 1888 __ lw(LoadConvention::NameRegister(), MemOperand(sp, 0)); |
1888 } else { | 1889 } else { |
1889 VisitForStackValue(property->obj()); | 1890 VisitForStackValue(property->obj()); |
1890 VisitForStackValue(property->key()); | 1891 VisitForStackValue(property->key()); |
1891 } | 1892 } |
1892 break; | 1893 break; |
1893 } | 1894 } |
1894 | 1895 |
1895 // For compound assignments we need another deoptimization point after the | 1896 // For compound assignments we need another deoptimization point after the |
1896 // variable/property load. | 1897 // variable/property load. |
1897 if (expr->is_compound()) { | 1898 if (expr->is_compound()) { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2015 | 2016 |
2016 case Yield::DELEGATING: { | 2017 case Yield::DELEGATING: { |
2017 VisitForStackValue(expr->generator_object()); | 2018 VisitForStackValue(expr->generator_object()); |
2018 | 2019 |
2019 // Initial stack layout is as follows: | 2020 // Initial stack layout is as follows: |
2020 // [sp + 1 * kPointerSize] iter | 2021 // [sp + 1 * kPointerSize] iter |
2021 // [sp + 0 * kPointerSize] g | 2022 // [sp + 0 * kPointerSize] g |
2022 | 2023 |
2023 Label l_catch, l_try, l_suspend, l_continuation, l_resume; | 2024 Label l_catch, l_try, l_suspend, l_continuation, l_resume; |
2024 Label l_next, l_call; | 2025 Label l_next, l_call; |
2025 Register load_receiver = LoadIC::ReceiverRegister(); | 2026 Register load_receiver = LoadConvention::ReceiverRegister(); |
2026 Register load_name = LoadIC::NameRegister(); | 2027 Register load_name = LoadConvention::NameRegister(); |
2027 | 2028 |
2028 // Initial send value is undefined. | 2029 // Initial send value is undefined. |
2029 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); | 2030 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); |
2030 __ Branch(&l_next); | 2031 __ Branch(&l_next); |
2031 | 2032 |
2032 // catch (e) { receiver = iter; f = 'throw'; arg = e; goto l_call; } | 2033 // catch (e) { receiver = iter; f = 'throw'; arg = e; goto l_call; } |
2033 __ bind(&l_catch); | 2034 __ bind(&l_catch); |
2034 __ mov(a0, v0); | 2035 __ mov(a0, v0); |
2035 handler_table()->set(expr->index(), Smi::FromInt(l_catch.pos())); | 2036 handler_table()->set(expr->index(), Smi::FromInt(l_catch.pos())); |
2036 __ LoadRoot(load_name, Heap::kthrow_stringRootIndex); // "throw" | 2037 __ LoadRoot(load_name, Heap::kthrow_stringRootIndex); // "throw" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2074 | 2075 |
2075 __ LoadRoot(load_name, Heap::knext_stringRootIndex); // "next" | 2076 __ LoadRoot(load_name, Heap::knext_stringRootIndex); // "next" |
2076 __ lw(a3, MemOperand(sp, 1 * kPointerSize)); // iter | 2077 __ lw(a3, MemOperand(sp, 1 * kPointerSize)); // iter |
2077 __ Push(load_name, a3, a0); // "next", iter, received | 2078 __ Push(load_name, a3, a0); // "next", iter, received |
2078 | 2079 |
2079 // result = receiver[f](arg); | 2080 // result = receiver[f](arg); |
2080 __ bind(&l_call); | 2081 __ bind(&l_call); |
2081 __ lw(load_receiver, MemOperand(sp, kPointerSize)); | 2082 __ lw(load_receiver, MemOperand(sp, kPointerSize)); |
2082 __ lw(load_name, MemOperand(sp, 2 * kPointerSize)); | 2083 __ lw(load_name, MemOperand(sp, 2 * kPointerSize)); |
2083 if (FLAG_vector_ics) { | 2084 if (FLAG_vector_ics) { |
2084 __ li(LoadIC::SlotRegister(), | 2085 __ li(VectorLoadConvention::SlotRegister(), |
2085 Operand(Smi::FromInt(expr->KeyedLoadFeedbackSlot()))); | 2086 Operand(Smi::FromInt(expr->KeyedLoadFeedbackSlot()))); |
2086 } | 2087 } |
2087 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); | 2088 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
2088 CallIC(ic, TypeFeedbackId::None()); | 2089 CallIC(ic, TypeFeedbackId::None()); |
2089 __ mov(a0, v0); | 2090 __ mov(a0, v0); |
2090 __ mov(a1, a0); | 2091 __ mov(a1, a0); |
2091 __ sw(a1, MemOperand(sp, 2 * kPointerSize)); | 2092 __ sw(a1, MemOperand(sp, 2 * kPointerSize)); |
2092 CallFunctionStub stub(isolate(), 1, CALL_AS_METHOD); | 2093 CallFunctionStub stub(isolate(), 1, CALL_AS_METHOD); |
2093 __ CallStub(&stub); | 2094 __ CallStub(&stub); |
2094 | 2095 |
2095 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2096 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
2096 __ Drop(1); // The function is still on the stack; drop it. | 2097 __ Drop(1); // The function is still on the stack; drop it. |
2097 | 2098 |
2098 // if (!result.done) goto l_try; | 2099 // if (!result.done) goto l_try; |
2099 __ Move(load_receiver, v0); | 2100 __ Move(load_receiver, v0); |
2100 | 2101 |
2101 __ push(load_receiver); // save result | 2102 __ push(load_receiver); // save result |
2102 __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done" | 2103 __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done" |
2103 if (FLAG_vector_ics) { | 2104 if (FLAG_vector_ics) { |
2104 __ li(LoadIC::SlotRegister(), | 2105 __ li(VectorLoadConvention::SlotRegister(), |
2105 Operand(Smi::FromInt(expr->DoneFeedbackSlot()))); | 2106 Operand(Smi::FromInt(expr->DoneFeedbackSlot()))); |
2106 } | 2107 } |
2107 CallLoadIC(NOT_CONTEXTUAL); // v0=result.done | 2108 CallLoadIC(NOT_CONTEXTUAL); // v0=result.done |
2108 __ mov(a0, v0); | 2109 __ mov(a0, v0); |
2109 Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate()); | 2110 Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate()); |
2110 CallIC(bool_ic); | 2111 CallIC(bool_ic); |
2111 __ Branch(&l_try, eq, v0, Operand(zero_reg)); | 2112 __ Branch(&l_try, eq, v0, Operand(zero_reg)); |
2112 | 2113 |
2113 // result.value | 2114 // result.value |
2114 __ pop(load_receiver); // result | 2115 __ pop(load_receiver); // result |
2115 __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value" | 2116 __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value" |
2116 if (FLAG_vector_ics) { | 2117 if (FLAG_vector_ics) { |
2117 __ li(LoadIC::SlotRegister(), | 2118 __ li(VectorLoadConvention::SlotRegister(), |
2118 Operand(Smi::FromInt(expr->ValueFeedbackSlot()))); | 2119 Operand(Smi::FromInt(expr->ValueFeedbackSlot()))); |
2119 } | 2120 } |
2120 CallLoadIC(NOT_CONTEXTUAL); // v0=result.value | 2121 CallLoadIC(NOT_CONTEXTUAL); // v0=result.value |
2121 context()->DropAndPlug(2, v0); // drop iter and g | 2122 context()->DropAndPlug(2, v0); // drop iter and g |
2122 break; | 2123 break; |
2123 } | 2124 } |
2124 } | 2125 } |
2125 } | 2126 } |
2126 | 2127 |
2127 | 2128 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2272 // Only the value field needs a write barrier, as the other values are in the | 2273 // Only the value field needs a write barrier, as the other values are in the |
2273 // root set. | 2274 // root set. |
2274 __ RecordWriteField(v0, JSGeneratorObject::kResultValuePropertyOffset, | 2275 __ RecordWriteField(v0, JSGeneratorObject::kResultValuePropertyOffset, |
2275 a2, a3, kRAHasBeenSaved, kDontSaveFPRegs); | 2276 a2, a3, kRAHasBeenSaved, kDontSaveFPRegs); |
2276 } | 2277 } |
2277 | 2278 |
2278 | 2279 |
2279 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { | 2280 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { |
2280 SetSourcePosition(prop->position()); | 2281 SetSourcePosition(prop->position()); |
2281 Literal* key = prop->key()->AsLiteral(); | 2282 Literal* key = prop->key()->AsLiteral(); |
2282 __ li(LoadIC::NameRegister(), Operand(key->value())); | 2283 __ li(LoadConvention::NameRegister(), Operand(key->value())); |
2283 if (FLAG_vector_ics) { | 2284 if (FLAG_vector_ics) { |
2284 __ li(LoadIC::SlotRegister(), | 2285 __ li(VectorLoadConvention::SlotRegister(), |
2285 Operand(Smi::FromInt(prop->PropertyFeedbackSlot()))); | 2286 Operand(Smi::FromInt(prop->PropertyFeedbackSlot()))); |
2286 CallLoadIC(NOT_CONTEXTUAL); | 2287 CallLoadIC(NOT_CONTEXTUAL); |
2287 } else { | 2288 } else { |
2288 CallLoadIC(NOT_CONTEXTUAL, prop->PropertyFeedbackId()); | 2289 CallLoadIC(NOT_CONTEXTUAL, prop->PropertyFeedbackId()); |
2289 } | 2290 } |
2290 } | 2291 } |
2291 | 2292 |
2292 | 2293 |
2293 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { | 2294 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { |
2294 SetSourcePosition(prop->position()); | 2295 SetSourcePosition(prop->position()); |
2295 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); | 2296 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
2296 if (FLAG_vector_ics) { | 2297 if (FLAG_vector_ics) { |
2297 __ li(LoadIC::SlotRegister(), | 2298 __ li(VectorLoadConvention::SlotRegister(), |
2298 Operand(Smi::FromInt(prop->PropertyFeedbackSlot()))); | 2299 Operand(Smi::FromInt(prop->PropertyFeedbackSlot()))); |
2299 CallIC(ic); | 2300 CallIC(ic); |
2300 } else { | 2301 } else { |
2301 CallIC(ic, prop->PropertyFeedbackId()); | 2302 CallIC(ic, prop->PropertyFeedbackId()); |
2302 } | 2303 } |
2303 } | 2304 } |
2304 | 2305 |
2305 | 2306 |
2306 void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, | 2307 void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, |
2307 Token::Value op, | 2308 Token::Value op, |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2426 switch (assign_type) { | 2427 switch (assign_type) { |
2427 case VARIABLE: { | 2428 case VARIABLE: { |
2428 Variable* var = expr->AsVariableProxy()->var(); | 2429 Variable* var = expr->AsVariableProxy()->var(); |
2429 EffectContext context(this); | 2430 EffectContext context(this); |
2430 EmitVariableAssignment(var, Token::ASSIGN); | 2431 EmitVariableAssignment(var, Token::ASSIGN); |
2431 break; | 2432 break; |
2432 } | 2433 } |
2433 case NAMED_PROPERTY: { | 2434 case NAMED_PROPERTY: { |
2434 __ push(result_register()); // Preserve value. | 2435 __ push(result_register()); // Preserve value. |
2435 VisitForAccumulatorValue(prop->obj()); | 2436 VisitForAccumulatorValue(prop->obj()); |
2436 __ mov(StoreIC::ReceiverRegister(), result_register()); | 2437 __ mov(StoreConvention::ReceiverRegister(), result_register()); |
2437 __ pop(StoreIC::ValueRegister()); // Restore value. | 2438 __ pop(StoreConvention::ValueRegister()); // Restore value. |
2438 __ li(StoreIC::NameRegister(), | 2439 __ li(StoreConvention::NameRegister(), |
2439 Operand(prop->key()->AsLiteral()->value())); | 2440 Operand(prop->key()->AsLiteral()->value())); |
2440 CallStoreIC(); | 2441 CallStoreIC(); |
2441 break; | 2442 break; |
2442 } | 2443 } |
2443 case KEYED_PROPERTY: { | 2444 case KEYED_PROPERTY: { |
2444 __ push(result_register()); // Preserve value. | 2445 __ push(result_register()); // Preserve value. |
2445 VisitForStackValue(prop->obj()); | 2446 VisitForStackValue(prop->obj()); |
2446 VisitForAccumulatorValue(prop->key()); | 2447 VisitForAccumulatorValue(prop->key()); |
2447 __ mov(KeyedStoreIC::NameRegister(), result_register()); | 2448 __ mov(StoreConvention::NameRegister(), result_register()); |
2448 __ Pop(KeyedStoreIC::ValueRegister(), KeyedStoreIC::ReceiverRegister()); | 2449 __ Pop(StoreConvention::ValueRegister(), |
| 2450 StoreConvention::ReceiverRegister()); |
2449 Handle<Code> ic = strict_mode() == SLOPPY | 2451 Handle<Code> ic = strict_mode() == SLOPPY |
2450 ? isolate()->builtins()->KeyedStoreIC_Initialize() | 2452 ? isolate()->builtins()->KeyedStoreIC_Initialize() |
2451 : isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); | 2453 : isolate()->builtins()->KeyedStoreIC_Initialize_Strict(); |
2452 CallIC(ic); | 2454 CallIC(ic); |
2453 break; | 2455 break; |
2454 } | 2456 } |
2455 } | 2457 } |
2456 context()->Plug(v0); | 2458 context()->Plug(v0); |
2457 } | 2459 } |
2458 | 2460 |
2459 | 2461 |
2460 void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( | 2462 void FullCodeGenerator::EmitStoreToStackLocalOrContextSlot( |
2461 Variable* var, MemOperand location) { | 2463 Variable* var, MemOperand location) { |
2462 __ sw(result_register(), location); | 2464 __ sw(result_register(), location); |
2463 if (var->IsContextSlot()) { | 2465 if (var->IsContextSlot()) { |
2464 // RecordWrite may destroy all its register arguments. | 2466 // RecordWrite may destroy all its register arguments. |
2465 __ Move(a3, result_register()); | 2467 __ Move(a3, result_register()); |
2466 int offset = Context::SlotOffset(var->index()); | 2468 int offset = Context::SlotOffset(var->index()); |
2467 __ RecordWriteContextSlot( | 2469 __ RecordWriteContextSlot( |
2468 a1, offset, a3, a2, kRAHasBeenSaved, kDontSaveFPRegs); | 2470 a1, offset, a3, a2, kRAHasBeenSaved, kDontSaveFPRegs); |
2469 } | 2471 } |
2470 } | 2472 } |
2471 | 2473 |
2472 | 2474 |
2473 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) { | 2475 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) { |
2474 if (var->IsUnallocated()) { | 2476 if (var->IsUnallocated()) { |
2475 // Global var, const, or let. | 2477 // Global var, const, or let. |
2476 __ mov(StoreIC::ValueRegister(), result_register()); | 2478 __ mov(StoreConvention::ValueRegister(), result_register()); |
2477 __ li(StoreIC::NameRegister(), Operand(var->name())); | 2479 __ li(StoreConvention::NameRegister(), Operand(var->name())); |
2478 __ lw(StoreIC::ReceiverRegister(), GlobalObjectOperand()); | 2480 __ lw(StoreConvention::ReceiverRegister(), GlobalObjectOperand()); |
2479 CallStoreIC(); | 2481 CallStoreIC(); |
2480 | 2482 |
2481 } else if (op == Token::INIT_CONST_LEGACY) { | 2483 } else if (op == Token::INIT_CONST_LEGACY) { |
2482 // Const initializers need a write barrier. | 2484 // Const initializers need a write barrier. |
2483 DCHECK(!var->IsParameter()); // No const parameters. | 2485 DCHECK(!var->IsParameter()); // No const parameters. |
2484 if (var->IsLookupSlot()) { | 2486 if (var->IsLookupSlot()) { |
2485 __ li(a0, Operand(var->name())); | 2487 __ li(a0, Operand(var->name())); |
2486 __ Push(v0, cp, a0); // Context and name. | 2488 __ Push(v0, cp, a0); // Context and name. |
2487 __ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot, 3); | 2489 __ CallRuntime(Runtime::kInitializeLegacyConstLookupSlot, 3); |
2488 } else { | 2490 } else { |
(...skipping 49 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 __ lw(LoadIC::ReceiverRegister(), MemOperand(sp, 0)); | 2633 __ lw(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 __ lw(at, MemOperand(sp, 0)); | 2637 __ lw(at, MemOperand(sp, 0)); |
2635 __ push(at); | 2638 __ push(at); |
2636 __ sw(v0, MemOperand(sp, kPointerSize)); | 2639 __ sw(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 __ lw(LoadIC::ReceiverRegister(), MemOperand(sp, 0)); | 2656 __ lw(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 __ lw(at, MemOperand(sp, 0)); | 2662 __ lw(at, MemOperand(sp, 0)); |
2660 __ push(at); | 2663 __ push(at); |
2661 __ sw(v0, MemOperand(sp, kPointerSize)); | 2664 __ sw(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 __ lw(receiver, GlobalObjectOperand()); | 4102 __ lw(receiver, GlobalObjectOperand()); |
4100 __ lw(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset)); | 4103 __ lw(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 __ lw(at, MemOperand(sp, 0)); | 4117 __ lw(at, MemOperand(sp, 0)); |
4115 __ push(at); | 4118 __ push(at); |
4116 __ sw(v0, MemOperand(sp, kPointerSize)); | 4119 __ sw(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 __ lw(LoadIC::ReceiverRegister(), MemOperand(sp, 0)); | 4292 __ lw(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 __ lw(LoadIC::ReceiverRegister(), MemOperand(sp, 1 * kPointerSize)); | 4297 __ lw(LoadConvention::ReceiverRegister(), |
4295 __ lw(LoadIC::NameRegister(), MemOperand(sp, 0)); | 4298 MemOperand(sp, 1 * kPointerSize)); |
| 4299 __ lw(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 __ lw(LoadIC::ReceiverRegister(), GlobalObjectOperand()); | 4453 __ lw(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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4874 Assembler::target_address_at(pc_immediate_load_address)) == | 4879 Assembler::target_address_at(pc_immediate_load_address)) == |
4875 reinterpret_cast<uint32_t>( | 4880 reinterpret_cast<uint32_t>( |
4876 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4881 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4877 return OSR_AFTER_STACK_CHECK; | 4882 return OSR_AFTER_STACK_CHECK; |
4878 } | 4883 } |
4879 | 4884 |
4880 | 4885 |
4881 } } // namespace v8::internal | 4886 } } // namespace v8::internal |
4882 | 4887 |
4883 #endif // V8_TARGET_ARCH_MIPS | 4888 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |