| 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 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1354 Operand(isolate()->factory()->home_object_symbol())); | 1354 Operand(isolate()->factory()->home_object_symbol())); |
| 1355 __ ld(StoreDescriptor::ValueRegister(), | 1355 __ ld(StoreDescriptor::ValueRegister(), |
| 1356 MemOperand(sp, offset * kPointerSize)); | 1356 MemOperand(sp, offset * kPointerSize)); |
| 1357 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); | 1357 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); |
| 1358 CallStoreIC(); | 1358 CallStoreIC(); |
| 1359 } | 1359 } |
| 1360 } | 1360 } |
| 1361 | 1361 |
| 1362 | 1362 |
| 1363 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, | 1363 void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, |
| 1364 TypeofState typeof_state, | 1364 TypeofMode typeof_mode, |
| 1365 Label* slow) { | 1365 Label* slow) { |
| 1366 Register current = cp; | 1366 Register current = cp; |
| 1367 Register next = a1; | 1367 Register next = a1; |
| 1368 Register temp = a2; | 1368 Register temp = a2; |
| 1369 | 1369 |
| 1370 Scope* s = scope(); | 1370 Scope* s = scope(); |
| 1371 while (s != NULL) { | 1371 while (s != NULL) { |
| 1372 if (s->num_heap_slots() > 0) { | 1372 if (s->num_heap_slots() > 0) { |
| 1373 if (s->calls_sloppy_eval()) { | 1373 if (s->calls_sloppy_eval()) { |
| 1374 // Check that extension is NULL. | 1374 // Check that extension is NULL. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1400 __ ld(temp, ContextOperand(next, Context::EXTENSION_INDEX)); | 1400 __ ld(temp, ContextOperand(next, Context::EXTENSION_INDEX)); |
| 1401 __ Branch(slow, ne, temp, Operand(zero_reg)); | 1401 __ Branch(slow, ne, temp, Operand(zero_reg)); |
| 1402 // Load next context in chain. | 1402 // Load next context in chain. |
| 1403 __ ld(next, ContextOperand(next, Context::PREVIOUS_INDEX)); | 1403 __ ld(next, ContextOperand(next, Context::PREVIOUS_INDEX)); |
| 1404 __ Branch(&loop); | 1404 __ Branch(&loop); |
| 1405 __ bind(&fast); | 1405 __ bind(&fast); |
| 1406 } | 1406 } |
| 1407 | 1407 |
| 1408 // All extension objects were empty and it is safe to use a normal global | 1408 // All extension objects were empty and it is safe to use a normal global |
| 1409 // load machinery. | 1409 // load machinery. |
| 1410 EmitGlobalVariableLoad(proxy, typeof_state); | 1410 EmitGlobalVariableLoad(proxy, typeof_mode); |
| 1411 } | 1411 } |
| 1412 | 1412 |
| 1413 | 1413 |
| 1414 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, | 1414 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, |
| 1415 Label* slow) { | 1415 Label* slow) { |
| 1416 DCHECK(var->IsContextSlot()); | 1416 DCHECK(var->IsContextSlot()); |
| 1417 Register context = cp; | 1417 Register context = cp; |
| 1418 Register next = a3; | 1418 Register next = a3; |
| 1419 Register temp = a4; | 1419 Register temp = a4; |
| 1420 | 1420 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1435 __ Branch(slow, ne, temp, Operand(zero_reg)); | 1435 __ Branch(slow, ne, temp, Operand(zero_reg)); |
| 1436 | 1436 |
| 1437 // This function is used only for loads, not stores, so it's safe to | 1437 // This function is used only for loads, not stores, so it's safe to |
| 1438 // return an cp-based operand (the write barrier cannot be allowed to | 1438 // return an cp-based operand (the write barrier cannot be allowed to |
| 1439 // destroy the cp register). | 1439 // destroy the cp register). |
| 1440 return ContextOperand(context, var->index()); | 1440 return ContextOperand(context, var->index()); |
| 1441 } | 1441 } |
| 1442 | 1442 |
| 1443 | 1443 |
| 1444 void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy, | 1444 void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy, |
| 1445 TypeofState typeof_state, | 1445 TypeofMode typeof_mode, |
| 1446 Label* slow, | 1446 Label* slow, Label* done) { |
| 1447 Label* done) { | |
| 1448 // Generate fast-case code for variables that might be shadowed by | 1447 // Generate fast-case code for variables that might be shadowed by |
| 1449 // eval-introduced variables. Eval is used a lot without | 1448 // eval-introduced variables. Eval is used a lot without |
| 1450 // introducing variables. In those cases, we do not want to | 1449 // introducing variables. In those cases, we do not want to |
| 1451 // perform a runtime call for all variables in the scope | 1450 // perform a runtime call for all variables in the scope |
| 1452 // containing the eval. | 1451 // containing the eval. |
| 1453 Variable* var = proxy->var(); | 1452 Variable* var = proxy->var(); |
| 1454 if (var->mode() == DYNAMIC_GLOBAL) { | 1453 if (var->mode() == DYNAMIC_GLOBAL) { |
| 1455 EmitLoadGlobalCheckExtensions(proxy, typeof_state, slow); | 1454 EmitLoadGlobalCheckExtensions(proxy, typeof_mode, slow); |
| 1456 __ Branch(done); | 1455 __ Branch(done); |
| 1457 } else if (var->mode() == DYNAMIC_LOCAL) { | 1456 } else if (var->mode() == DYNAMIC_LOCAL) { |
| 1458 Variable* local = var->local_if_not_shadowed(); | 1457 Variable* local = var->local_if_not_shadowed(); |
| 1459 __ ld(v0, ContextSlotOperandCheckExtensions(local, slow)); | 1458 __ ld(v0, ContextSlotOperandCheckExtensions(local, slow)); |
| 1460 if (local->mode() == LET || local->mode() == CONST || | 1459 if (local->mode() == LET || local->mode() == CONST || |
| 1461 local->mode() == CONST_LEGACY) { | 1460 local->mode() == CONST_LEGACY) { |
| 1462 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 1461 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
| 1463 __ dsubu(at, v0, at); // Sub as compare: at == 0 on eq. | 1462 __ dsubu(at, v0, at); // Sub as compare: at == 0 on eq. |
| 1464 if (local->mode() == CONST_LEGACY) { | 1463 if (local->mode() == CONST_LEGACY) { |
| 1465 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); | 1464 __ LoadRoot(a0, Heap::kUndefinedValueRootIndex); |
| 1466 __ Movz(v0, a0, at); // Conditional move: return Undefined if TheHole. | 1465 __ Movz(v0, a0, at); // Conditional move: return Undefined if TheHole. |
| 1467 } else { // LET || CONST | 1466 } else { // LET || CONST |
| 1468 __ Branch(done, ne, at, Operand(zero_reg)); | 1467 __ Branch(done, ne, at, Operand(zero_reg)); |
| 1469 __ li(a0, Operand(var->name())); | 1468 __ li(a0, Operand(var->name())); |
| 1470 __ push(a0); | 1469 __ push(a0); |
| 1471 __ CallRuntime(Runtime::kThrowReferenceError, 1); | 1470 __ CallRuntime(Runtime::kThrowReferenceError, 1); |
| 1472 } | 1471 } |
| 1473 } | 1472 } |
| 1474 __ Branch(done); | 1473 __ Branch(done); |
| 1475 } | 1474 } |
| 1476 } | 1475 } |
| 1477 | 1476 |
| 1478 | 1477 |
| 1479 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, | 1478 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, |
| 1480 TypeofState typeof_state) { | 1479 TypeofMode typeof_mode) { |
| 1481 Variable* var = proxy->var(); | 1480 Variable* var = proxy->var(); |
| 1482 DCHECK(var->IsUnallocatedOrGlobalSlot() || | 1481 DCHECK(var->IsUnallocatedOrGlobalSlot() || |
| 1483 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); | 1482 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); |
| 1484 if (var->IsGlobalSlot()) { | 1483 if (var->IsGlobalSlot()) { |
| 1485 DCHECK(var->index() > 0); | 1484 DCHECK(var->index() > 0); |
| 1486 DCHECK(var->IsStaticGlobalObjectProperty()); | 1485 DCHECK(var->IsStaticGlobalObjectProperty()); |
| 1487 // Each var occupies two slots in the context: for reads and writes. | 1486 // Each var occupies two slots in the context: for reads and writes. |
| 1488 int slot_index = var->index(); | 1487 int slot_index = var->index(); |
| 1489 int depth = scope()->ContextChainLength(var->scope()); | 1488 int depth = scope()->ContextChainLength(var->scope()); |
| 1490 __ li(LoadGlobalViaContextDescriptor::DepthRegister(), | 1489 __ li(LoadGlobalViaContextDescriptor::DepthRegister(), |
| 1491 Operand(Smi::FromInt(depth))); | 1490 Operand(Smi::FromInt(depth))); |
| 1492 __ li(LoadGlobalViaContextDescriptor::SlotRegister(), | 1491 __ li(LoadGlobalViaContextDescriptor::SlotRegister(), |
| 1493 Operand(Smi::FromInt(slot_index))); | 1492 Operand(Smi::FromInt(slot_index))); |
| 1494 __ li(LoadGlobalViaContextDescriptor::NameRegister(), Operand(var->name())); | 1493 __ li(LoadGlobalViaContextDescriptor::NameRegister(), Operand(var->name())); |
| 1495 LoadGlobalViaContextStub stub(isolate(), depth); | 1494 LoadGlobalViaContextStub stub(isolate(), depth); |
| 1496 __ CallStub(&stub); | 1495 __ CallStub(&stub); |
| 1497 | 1496 |
| 1498 } else { | 1497 } else { |
| 1499 __ ld(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand()); | 1498 __ ld(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand()); |
| 1500 __ li(LoadDescriptor::NameRegister(), Operand(var->name())); | 1499 __ li(LoadDescriptor::NameRegister(), Operand(var->name())); |
| 1501 __ li(LoadDescriptor::SlotRegister(), | 1500 __ li(LoadDescriptor::SlotRegister(), |
| 1502 Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); | 1501 Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); |
| 1503 // Inside typeof use a regular load, not a contextual load, to avoid | 1502 CallLoadIC(typeof_mode); |
| 1504 // a reference error. | |
| 1505 CallLoadIC(typeof_state == NOT_INSIDE_TYPEOF ? CONTEXTUAL : NOT_CONTEXTUAL); | |
| 1506 } | 1503 } |
| 1507 } | 1504 } |
| 1508 | 1505 |
| 1509 | 1506 |
| 1510 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, | 1507 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
| 1511 TypeofState typeof_state) { | 1508 TypeofMode typeof_mode) { |
| 1512 // Record position before possible IC call. | 1509 // Record position before possible IC call. |
| 1513 SetExpressionPosition(proxy); | 1510 SetExpressionPosition(proxy); |
| 1514 PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS); | 1511 PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS); |
| 1515 Variable* var = proxy->var(); | 1512 Variable* var = proxy->var(); |
| 1516 | 1513 |
| 1517 // Three cases: global variables, lookup variables, and all other types of | 1514 // Three cases: global variables, lookup variables, and all other types of |
| 1518 // variables. | 1515 // variables. |
| 1519 switch (var->location()) { | 1516 switch (var->location()) { |
| 1520 case VariableLocation::GLOBAL: | 1517 case VariableLocation::GLOBAL: |
| 1521 case VariableLocation::UNALLOCATED: { | 1518 case VariableLocation::UNALLOCATED: { |
| 1522 Comment cmnt(masm_, "[ Global variable"); | 1519 Comment cmnt(masm_, "[ Global variable"); |
| 1523 EmitGlobalVariableLoad(proxy, typeof_state); | 1520 EmitGlobalVariableLoad(proxy, typeof_mode); |
| 1524 context()->Plug(v0); | 1521 context()->Plug(v0); |
| 1525 break; | 1522 break; |
| 1526 } | 1523 } |
| 1527 | 1524 |
| 1528 case VariableLocation::PARAMETER: | 1525 case VariableLocation::PARAMETER: |
| 1529 case VariableLocation::LOCAL: | 1526 case VariableLocation::LOCAL: |
| 1530 case VariableLocation::CONTEXT: { | 1527 case VariableLocation::CONTEXT: { |
| 1531 DCHECK_EQ(NOT_INSIDE_TYPEOF, typeof_state); | 1528 DCHECK_EQ(NOT_INSIDE_TYPEOF, typeof_mode); |
| 1532 Comment cmnt(masm_, var->IsContextSlot() ? "[ Context variable" | 1529 Comment cmnt(masm_, var->IsContextSlot() ? "[ Context variable" |
| 1533 : "[ Stack variable"); | 1530 : "[ Stack variable"); |
| 1534 if (var->binding_needs_init()) { | 1531 if (var->binding_needs_init()) { |
| 1535 // var->scope() may be NULL when the proxy is located in eval code and | 1532 // var->scope() may be NULL when the proxy is located in eval code and |
| 1536 // refers to a potential outside binding. Currently those bindings are | 1533 // refers to a potential outside binding. Currently those bindings are |
| 1537 // always looked up dynamically, i.e. in that case | 1534 // always looked up dynamically, i.e. in that case |
| 1538 // var->location() == LOOKUP. | 1535 // var->location() == LOOKUP. |
| 1539 // always holds. | 1536 // always holds. |
| 1540 DCHECK(var->scope() != NULL); | 1537 DCHECK(var->scope() != NULL); |
| 1541 | 1538 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1597 } | 1594 } |
| 1598 context()->Plug(var); | 1595 context()->Plug(var); |
| 1599 break; | 1596 break; |
| 1600 } | 1597 } |
| 1601 | 1598 |
| 1602 case VariableLocation::LOOKUP: { | 1599 case VariableLocation::LOOKUP: { |
| 1603 Comment cmnt(masm_, "[ Lookup variable"); | 1600 Comment cmnt(masm_, "[ Lookup variable"); |
| 1604 Label done, slow; | 1601 Label done, slow; |
| 1605 // Generate code for loading from variables potentially shadowed | 1602 // Generate code for loading from variables potentially shadowed |
| 1606 // by eval-introduced variables. | 1603 // by eval-introduced variables. |
| 1607 EmitDynamicLookupFastCase(proxy, typeof_state, &slow, &done); | 1604 EmitDynamicLookupFastCase(proxy, typeof_mode, &slow, &done); |
| 1608 __ bind(&slow); | 1605 __ bind(&slow); |
| 1609 __ li(a1, Operand(var->name())); | 1606 __ li(a1, Operand(var->name())); |
| 1610 __ Push(cp, a1); // Context and name. | 1607 __ Push(cp, a1); // Context and name. |
| 1611 Runtime::FunctionId function_id = | 1608 Runtime::FunctionId function_id = |
| 1612 typeof_state == NOT_INSIDE_TYPEOF | 1609 typeof_mode == NOT_INSIDE_TYPEOF |
| 1613 ? Runtime::kLoadLookupSlot | 1610 ? Runtime::kLoadLookupSlot |
| 1614 : Runtime::kLoadLookupSlotNoReferenceError; | 1611 : Runtime::kLoadLookupSlotNoReferenceError; |
| 1615 __ CallRuntime(function_id, 2); | 1612 __ CallRuntime(function_id, 2); |
| 1616 __ bind(&done); | 1613 __ bind(&done); |
| 1617 context()->Plug(v0); | 1614 context()->Plug(v0); |
| 1618 } | 1615 } |
| 1619 } | 1616 } |
| 1620 } | 1617 } |
| 1621 | 1618 |
| 1622 | 1619 |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2284 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2281 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 2285 __ Drop(1); // The function is still on the stack; drop it. | 2282 __ Drop(1); // The function is still on the stack; drop it. |
| 2286 | 2283 |
| 2287 // if (!result.done) goto l_try; | 2284 // if (!result.done) goto l_try; |
| 2288 __ Move(load_receiver, v0); | 2285 __ Move(load_receiver, v0); |
| 2289 | 2286 |
| 2290 __ push(load_receiver); // save result | 2287 __ push(load_receiver); // save result |
| 2291 __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done" | 2288 __ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done" |
| 2292 __ li(LoadDescriptor::SlotRegister(), | 2289 __ li(LoadDescriptor::SlotRegister(), |
| 2293 Operand(SmiFromSlot(expr->DoneFeedbackSlot()))); | 2290 Operand(SmiFromSlot(expr->DoneFeedbackSlot()))); |
| 2294 CallLoadIC(NOT_CONTEXTUAL); // v0=result.done | 2291 CallLoadIC(NOT_INSIDE_TYPEOF); // v0=result.done |
| 2295 __ mov(a0, v0); | 2292 __ mov(a0, v0); |
| 2296 Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate()); | 2293 Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate()); |
| 2297 CallIC(bool_ic); | 2294 CallIC(bool_ic); |
| 2298 __ Branch(&l_try, eq, v0, Operand(zero_reg)); | 2295 __ Branch(&l_try, eq, v0, Operand(zero_reg)); |
| 2299 | 2296 |
| 2300 // result.value | 2297 // result.value |
| 2301 __ pop(load_receiver); // result | 2298 __ pop(load_receiver); // result |
| 2302 __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value" | 2299 __ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value" |
| 2303 __ li(LoadDescriptor::SlotRegister(), | 2300 __ li(LoadDescriptor::SlotRegister(), |
| 2304 Operand(SmiFromSlot(expr->ValueFeedbackSlot()))); | 2301 Operand(SmiFromSlot(expr->ValueFeedbackSlot()))); |
| 2305 CallLoadIC(NOT_CONTEXTUAL); // v0=result.value | 2302 CallLoadIC(NOT_INSIDE_TYPEOF); // v0=result.value |
| 2306 context()->DropAndPlug(2, v0); // drop iter and g | 2303 context()->DropAndPlug(2, v0); // drop iter and g |
| 2307 break; | 2304 break; |
| 2308 } | 2305 } |
| 2309 } | 2306 } |
| 2310 } | 2307 } |
| 2311 | 2308 |
| 2312 | 2309 |
| 2313 void FullCodeGenerator::EmitGeneratorResume(Expression *generator, | 2310 void FullCodeGenerator::EmitGeneratorResume(Expression *generator, |
| 2314 Expression *value, | 2311 Expression *value, |
| 2315 JSGeneratorObject::ResumeMode resume_mode) { | 2312 JSGeneratorObject::ResumeMode resume_mode) { |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2439 | 2436 |
| 2440 | 2437 |
| 2441 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { | 2438 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { |
| 2442 SetExpressionPosition(prop); | 2439 SetExpressionPosition(prop); |
| 2443 Literal* key = prop->key()->AsLiteral(); | 2440 Literal* key = prop->key()->AsLiteral(); |
| 2444 DCHECK(!prop->IsSuperAccess()); | 2441 DCHECK(!prop->IsSuperAccess()); |
| 2445 | 2442 |
| 2446 __ li(LoadDescriptor::NameRegister(), Operand(key->value())); | 2443 __ li(LoadDescriptor::NameRegister(), Operand(key->value())); |
| 2447 __ li(LoadDescriptor::SlotRegister(), | 2444 __ li(LoadDescriptor::SlotRegister(), |
| 2448 Operand(SmiFromSlot(prop->PropertyFeedbackSlot()))); | 2445 Operand(SmiFromSlot(prop->PropertyFeedbackSlot()))); |
| 2449 CallLoadIC(NOT_CONTEXTUAL, language_mode()); | 2446 CallLoadIC(NOT_INSIDE_TYPEOF, language_mode()); |
| 2450 } | 2447 } |
| 2451 | 2448 |
| 2452 | 2449 |
| 2453 void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) { | 2450 void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) { |
| 2454 // Stack: receiver, home_object. | 2451 // Stack: receiver, home_object. |
| 2455 SetExpressionPosition(prop); | 2452 SetExpressionPosition(prop); |
| 2456 | 2453 |
| 2457 Literal* key = prop->key()->AsLiteral(); | 2454 Literal* key = prop->key()->AsLiteral(); |
| 2458 DCHECK(!key->value()->IsSmi()); | 2455 DCHECK(!key->value()->IsSmi()); |
| 2459 DCHECK(prop->IsSuperAccess()); | 2456 DCHECK(prop->IsSuperAccess()); |
| (...skipping 2313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4773 // Push the builtins object as the receiver. | 4770 // Push the builtins object as the receiver. |
| 4774 Register receiver = LoadDescriptor::ReceiverRegister(); | 4771 Register receiver = LoadDescriptor::ReceiverRegister(); |
| 4775 __ ld(receiver, GlobalObjectOperand()); | 4772 __ ld(receiver, GlobalObjectOperand()); |
| 4776 __ ld(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset)); | 4773 __ ld(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset)); |
| 4777 __ push(receiver); | 4774 __ push(receiver); |
| 4778 | 4775 |
| 4779 // Load the function from the receiver. | 4776 // Load the function from the receiver. |
| 4780 __ li(LoadDescriptor::NameRegister(), Operand(expr->name())); | 4777 __ li(LoadDescriptor::NameRegister(), Operand(expr->name())); |
| 4781 __ li(LoadDescriptor::SlotRegister(), | 4778 __ li(LoadDescriptor::SlotRegister(), |
| 4782 Operand(SmiFromSlot(expr->CallRuntimeFeedbackSlot()))); | 4779 Operand(SmiFromSlot(expr->CallRuntimeFeedbackSlot()))); |
| 4783 CallLoadIC(NOT_CONTEXTUAL); | 4780 CallLoadIC(NOT_INSIDE_TYPEOF); |
| 4784 } | 4781 } |
| 4785 | 4782 |
| 4786 | 4783 |
| 4787 void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) { | 4784 void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) { |
| 4788 ZoneList<Expression*>* args = expr->arguments(); | 4785 ZoneList<Expression*>* args = expr->arguments(); |
| 4789 int arg_count = args->length(); | 4786 int arg_count = args->length(); |
| 4790 | 4787 |
| 4791 SetCallPosition(expr, arg_count); | 4788 SetCallPosition(expr, arg_count); |
| 4792 CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); | 4789 CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); |
| 4793 __ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); | 4790 __ ld(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
| (...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5590 reinterpret_cast<uint64_t>( | 5587 reinterpret_cast<uint64_t>( |
| 5591 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5588 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5592 return OSR_AFTER_STACK_CHECK; | 5589 return OSR_AFTER_STACK_CHECK; |
| 5593 } | 5590 } |
| 5594 | 5591 |
| 5595 | 5592 |
| 5596 } // namespace internal | 5593 } // namespace internal |
| 5597 } // namespace v8 | 5594 } // namespace v8 |
| 5598 | 5595 |
| 5599 #endif // V8_TARGET_ARCH_MIPS64 | 5596 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |