| 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 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1871 context()->Plug(v0); | 1871 context()->Plug(v0); |
| 1872 } | 1872 } |
| 1873 } | 1873 } |
| 1874 | 1874 |
| 1875 | 1875 |
| 1876 void FullCodeGenerator::VisitAssignment(Assignment* expr) { | 1876 void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
| 1877 DCHECK(expr->target()->IsValidReferenceExpression()); | 1877 DCHECK(expr->target()->IsValidReferenceExpression()); |
| 1878 | 1878 |
| 1879 Comment cmnt(masm_, "[ Assignment"); | 1879 Comment cmnt(masm_, "[ Assignment"); |
| 1880 | 1880 |
| 1881 // Left-hand side can only be a property, a global or a (parameter or local) | |
| 1882 // slot. | |
| 1883 enum LhsKind { | |
| 1884 VARIABLE, | |
| 1885 NAMED_PROPERTY, | |
| 1886 KEYED_PROPERTY, | |
| 1887 NAMED_SUPER_PROPERTY | |
| 1888 }; | |
| 1889 LhsKind assign_type = VARIABLE; | |
| 1890 Property* property = expr->target()->AsProperty(); | 1881 Property* property = expr->target()->AsProperty(); |
| 1891 if (property != NULL) { | 1882 LhsKind assign_type = GetAssignType(property); |
| 1892 assign_type = (property->key()->IsPropertyName()) | |
| 1893 ? (property->IsSuperAccess() ? NAMED_SUPER_PROPERTY | |
| 1894 : NAMED_PROPERTY) | |
| 1895 : KEYED_PROPERTY; | |
| 1896 } | |
| 1897 | 1883 |
| 1898 // Evaluate LHS expression. | 1884 // Evaluate LHS expression. |
| 1899 switch (assign_type) { | 1885 switch (assign_type) { |
| 1900 case VARIABLE: | 1886 case VARIABLE: |
| 1901 // Nothing to do here. | 1887 // Nothing to do here. |
| 1902 break; | 1888 break; |
| 1903 case NAMED_PROPERTY: | 1889 case NAMED_PROPERTY: |
| 1904 if (expr->is_compound()) { | 1890 if (expr->is_compound()) { |
| 1905 // We need the receiver both on the stack and in the register. | 1891 // We need the receiver both on the stack and in the register. |
| 1906 VisitForStackValue(property->obj()); | 1892 VisitForStackValue(property->obj()); |
| 1907 __ lw(LoadDescriptor::ReceiverRegister(), MemOperand(sp, 0)); | 1893 __ lw(LoadDescriptor::ReceiverRegister(), MemOperand(sp, 0)); |
| 1908 } else { | 1894 } else { |
| 1909 VisitForStackValue(property->obj()); | 1895 VisitForStackValue(property->obj()); |
| 1910 } | 1896 } |
| 1911 break; | 1897 break; |
| 1912 case NAMED_SUPER_PROPERTY: | 1898 case NAMED_SUPER_PROPERTY: |
| 1913 VisitForStackValue(property->obj()->AsSuperReference()->this_var()); | 1899 VisitForStackValue(property->obj()->AsSuperReference()->this_var()); |
| 1914 EmitLoadHomeObject(property->obj()->AsSuperReference()); | 1900 EmitLoadHomeObject(property->obj()->AsSuperReference()); |
| 1915 __ Push(result_register()); | 1901 __ Push(result_register()); |
| 1916 if (expr->is_compound()) { | 1902 if (expr->is_compound()) { |
| 1917 const Register scratch = a1; | 1903 const Register scratch = a1; |
| 1918 __ lw(scratch, MemOperand(sp, kPointerSize)); | 1904 __ lw(scratch, MemOperand(sp, kPointerSize)); |
| 1919 __ Push(scratch, result_register()); | 1905 __ Push(scratch, result_register()); |
| 1920 } | 1906 } |
| 1921 break; | 1907 break; |
| 1908 case KEYED_SUPER_PROPERTY: { |
| 1909 const Register scratch = a1; |
| 1910 VisitForStackValue(property->obj()->AsSuperReference()->this_var()); |
| 1911 EmitLoadHomeObject(property->obj()->AsSuperReference()); |
| 1912 __ Move(scratch, result_register()); |
| 1913 VisitForAccumulatorValue(property->key()); |
| 1914 __ Push(scratch, result_register()); |
| 1915 if (expr->is_compound()) { |
| 1916 const Register scratch1 = t0; |
| 1917 __ lw(scratch1, MemOperand(sp, 2 * kPointerSize)); |
| 1918 __ Push(scratch1, scratch, result_register()); |
| 1919 } |
| 1920 break; |
| 1921 } |
| 1922 case KEYED_PROPERTY: | 1922 case KEYED_PROPERTY: |
| 1923 // We need the key and receiver on both the stack and in v0 and a1. | 1923 // We need the key and receiver on both the stack and in v0 and a1. |
| 1924 if (expr->is_compound()) { | 1924 if (expr->is_compound()) { |
| 1925 VisitForStackValue(property->obj()); | 1925 VisitForStackValue(property->obj()); |
| 1926 VisitForStackValue(property->key()); | 1926 VisitForStackValue(property->key()); |
| 1927 __ lw(LoadDescriptor::ReceiverRegister(), | 1927 __ lw(LoadDescriptor::ReceiverRegister(), |
| 1928 MemOperand(sp, 1 * kPointerSize)); | 1928 MemOperand(sp, 1 * kPointerSize)); |
| 1929 __ lw(LoadDescriptor::NameRegister(), MemOperand(sp, 0)); | 1929 __ lw(LoadDescriptor::NameRegister(), MemOperand(sp, 0)); |
| 1930 } else { | 1930 } else { |
| 1931 VisitForStackValue(property->obj()); | 1931 VisitForStackValue(property->obj()); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1944 PrepareForBailout(expr->target(), TOS_REG); | 1944 PrepareForBailout(expr->target(), TOS_REG); |
| 1945 break; | 1945 break; |
| 1946 case NAMED_PROPERTY: | 1946 case NAMED_PROPERTY: |
| 1947 EmitNamedPropertyLoad(property); | 1947 EmitNamedPropertyLoad(property); |
| 1948 PrepareForBailoutForId(property->LoadId(), TOS_REG); | 1948 PrepareForBailoutForId(property->LoadId(), TOS_REG); |
| 1949 break; | 1949 break; |
| 1950 case NAMED_SUPER_PROPERTY: | 1950 case NAMED_SUPER_PROPERTY: |
| 1951 EmitNamedSuperPropertyLoad(property); | 1951 EmitNamedSuperPropertyLoad(property); |
| 1952 PrepareForBailoutForId(property->LoadId(), TOS_REG); | 1952 PrepareForBailoutForId(property->LoadId(), TOS_REG); |
| 1953 break; | 1953 break; |
| 1954 case KEYED_SUPER_PROPERTY: |
| 1955 EmitKeyedSuperPropertyLoad(property); |
| 1956 PrepareForBailoutForId(property->LoadId(), TOS_REG); |
| 1957 break; |
| 1954 case KEYED_PROPERTY: | 1958 case KEYED_PROPERTY: |
| 1955 EmitKeyedPropertyLoad(property); | 1959 EmitKeyedPropertyLoad(property); |
| 1956 PrepareForBailoutForId(property->LoadId(), TOS_REG); | 1960 PrepareForBailoutForId(property->LoadId(), TOS_REG); |
| 1957 break; | 1961 break; |
| 1958 } | 1962 } |
| 1959 } | 1963 } |
| 1960 | 1964 |
| 1961 Token::Value op = expr->binary_op(); | 1965 Token::Value op = expr->binary_op(); |
| 1962 __ push(v0); // Left operand goes on the stack. | 1966 __ push(v0); // Left operand goes on the stack. |
| 1963 VisitForAccumulatorValue(expr->value()); | 1967 VisitForAccumulatorValue(expr->value()); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 1994 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 1998 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
| 1995 context()->Plug(v0); | 1999 context()->Plug(v0); |
| 1996 break; | 2000 break; |
| 1997 case NAMED_PROPERTY: | 2001 case NAMED_PROPERTY: |
| 1998 EmitNamedPropertyAssignment(expr); | 2002 EmitNamedPropertyAssignment(expr); |
| 1999 break; | 2003 break; |
| 2000 case NAMED_SUPER_PROPERTY: | 2004 case NAMED_SUPER_PROPERTY: |
| 2001 EmitNamedSuperPropertyStore(property); | 2005 EmitNamedSuperPropertyStore(property); |
| 2002 context()->Plug(v0); | 2006 context()->Plug(v0); |
| 2003 break; | 2007 break; |
| 2008 case KEYED_SUPER_PROPERTY: |
| 2009 EmitKeyedSuperPropertyStore(property); |
| 2010 context()->Plug(v0); |
| 2011 break; |
| 2004 case KEYED_PROPERTY: | 2012 case KEYED_PROPERTY: |
| 2005 EmitKeyedPropertyAssignment(expr); | 2013 EmitKeyedPropertyAssignment(expr); |
| 2006 break; | 2014 break; |
| 2007 } | 2015 } |
| 2008 } | 2016 } |
| 2009 | 2017 |
| 2010 | 2018 |
| 2011 void FullCodeGenerator::VisitYield(Yield* expr) { | 2019 void FullCodeGenerator::VisitYield(Yield* expr) { |
| 2012 Comment cmnt(masm_, "[ Yield"); | 2020 Comment cmnt(masm_, "[ Yield"); |
| 2013 // Evaluate yielded value first; the initial iterator definition depends on | 2021 // Evaluate yielded value first; the initial iterator definition depends on |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2629 | 2637 |
| 2630 | 2638 |
| 2631 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { | 2639 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { |
| 2632 // Assignment to named property of super. | 2640 // Assignment to named property of super. |
| 2633 // v0 : value | 2641 // v0 : value |
| 2634 // stack : receiver ('this'), home_object | 2642 // stack : receiver ('this'), home_object |
| 2635 DCHECK(prop != NULL); | 2643 DCHECK(prop != NULL); |
| 2636 Literal* key = prop->key()->AsLiteral(); | 2644 Literal* key = prop->key()->AsLiteral(); |
| 2637 DCHECK(key != NULL); | 2645 DCHECK(key != NULL); |
| 2638 | 2646 |
| 2647 __ Push(key->value()); |
| 2639 __ Push(v0); | 2648 __ Push(v0); |
| 2640 __ Push(key->value()); | |
| 2641 __ CallRuntime((strict_mode() == STRICT ? Runtime::kStoreToSuper_Strict | 2649 __ CallRuntime((strict_mode() == STRICT ? Runtime::kStoreToSuper_Strict |
| 2642 : Runtime::kStoreToSuper_Sloppy), | 2650 : Runtime::kStoreToSuper_Sloppy), |
| 2643 4); | 2651 4); |
| 2644 } | 2652 } |
| 2645 | 2653 |
| 2646 | 2654 |
| 2655 void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) { |
| 2656 // Assignment to named property of super. |
| 2657 // v0 : value |
| 2658 // stack : receiver ('this'), home_object, key |
| 2659 DCHECK(prop != NULL); |
| 2660 |
| 2661 __ Push(v0); |
| 2662 __ CallRuntime((strict_mode() == STRICT ? Runtime::kStoreKeyedToSuper_Strict |
| 2663 : Runtime::kStoreKeyedToSuper_Sloppy), |
| 2664 4); |
| 2665 } |
| 2666 |
| 2667 |
| 2647 void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { | 2668 void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
| 2648 // Assignment to a property, using a keyed store IC. | 2669 // Assignment to a property, using a keyed store IC. |
| 2649 | 2670 |
| 2650 // Record source code position before IC call. | 2671 // Record source code position before IC call. |
| 2651 SetSourcePosition(expr->position()); | 2672 SetSourcePosition(expr->position()); |
| 2652 // Call keyed store IC. | 2673 // Call keyed store IC. |
| 2653 // The arguments are: | 2674 // The arguments are: |
| 2654 // - a0 is the value, | 2675 // - a0 is the value, |
| 2655 // - a1 is the key, | 2676 // - a1 is the key, |
| 2656 // - a2 is the receiver. | 2677 // - a2 is the receiver. |
| (...skipping 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4434 } | 4455 } |
| 4435 } | 4456 } |
| 4436 | 4457 |
| 4437 | 4458 |
| 4438 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { | 4459 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
| 4439 DCHECK(expr->expression()->IsValidReferenceExpression()); | 4460 DCHECK(expr->expression()->IsValidReferenceExpression()); |
| 4440 | 4461 |
| 4441 Comment cmnt(masm_, "[ CountOperation"); | 4462 Comment cmnt(masm_, "[ CountOperation"); |
| 4442 SetSourcePosition(expr->position()); | 4463 SetSourcePosition(expr->position()); |
| 4443 | 4464 |
| 4444 // Expression can only be a property, a global or a (parameter or local) | |
| 4445 // slot. | |
| 4446 enum LhsKind { | |
| 4447 VARIABLE, | |
| 4448 NAMED_PROPERTY, | |
| 4449 KEYED_PROPERTY, | |
| 4450 NAMED_SUPER_PROPERTY | |
| 4451 }; | |
| 4452 LhsKind assign_type = VARIABLE; | |
| 4453 Property* prop = expr->expression()->AsProperty(); | 4465 Property* prop = expr->expression()->AsProperty(); |
| 4454 // In case of a property we use the uninitialized expression context | 4466 LhsKind assign_type = GetAssignType(prop); |
| 4455 // of the key to detect a named property. | |
| 4456 if (prop != NULL) { | |
| 4457 assign_type = | |
| 4458 (prop->key()->IsPropertyName()) | |
| 4459 ? (prop->IsSuperAccess() ? NAMED_SUPER_PROPERTY : NAMED_PROPERTY) | |
| 4460 : KEYED_PROPERTY; | |
| 4461 } | |
| 4462 | 4467 |
| 4463 // Evaluate expression and get value. | 4468 // Evaluate expression and get value. |
| 4464 if (assign_type == VARIABLE) { | 4469 if (assign_type == VARIABLE) { |
| 4465 DCHECK(expr->expression()->AsVariableProxy()->var() != NULL); | 4470 DCHECK(expr->expression()->AsVariableProxy()->var() != NULL); |
| 4466 AccumulatorValueContext context(this); | 4471 AccumulatorValueContext context(this); |
| 4467 EmitVariableLoad(expr->expression()->AsVariableProxy()); | 4472 EmitVariableLoad(expr->expression()->AsVariableProxy()); |
| 4468 } else { | 4473 } else { |
| 4469 // Reserve space for result of postfix operation. | 4474 // Reserve space for result of postfix operation. |
| 4470 if (expr->is_postfix() && !context()->IsEffect()) { | 4475 if (expr->is_postfix() && !context()->IsEffect()) { |
| 4471 __ li(at, Operand(Smi::FromInt(0))); | 4476 __ li(at, Operand(Smi::FromInt(0))); |
| 4472 __ push(at); | 4477 __ push(at); |
| 4473 } | 4478 } |
| 4474 if (assign_type == NAMED_PROPERTY) { | 4479 switch (assign_type) { |
| 4475 // Put the object both on the stack and in the register. | 4480 case NAMED_PROPERTY: { |
| 4476 VisitForStackValue(prop->obj()); | 4481 // Put the object both on the stack and in the register. |
| 4477 __ lw(LoadDescriptor::ReceiverRegister(), MemOperand(sp, 0)); | 4482 VisitForStackValue(prop->obj()); |
| 4478 EmitNamedPropertyLoad(prop); | 4483 __ lw(LoadDescriptor::ReceiverRegister(), MemOperand(sp, 0)); |
| 4479 } else if (assign_type == NAMED_SUPER_PROPERTY) { | 4484 EmitNamedPropertyLoad(prop); |
| 4480 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); | 4485 break; |
| 4481 EmitLoadHomeObject(prop->obj()->AsSuperReference()); | 4486 } |
| 4482 __ Push(result_register()); | 4487 |
| 4483 const Register scratch = a1; | 4488 case NAMED_SUPER_PROPERTY: { |
| 4484 __ lw(scratch, MemOperand(sp, kPointerSize)); | 4489 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); |
| 4485 __ Push(scratch, result_register()); | 4490 EmitLoadHomeObject(prop->obj()->AsSuperReference()); |
| 4486 EmitNamedSuperPropertyLoad(prop); | 4491 __ Push(result_register()); |
| 4487 } else { | 4492 const Register scratch = a1; |
| 4488 VisitForStackValue(prop->obj()); | 4493 __ lw(scratch, MemOperand(sp, kPointerSize)); |
| 4489 VisitForStackValue(prop->key()); | 4494 __ Push(scratch, result_register()); |
| 4490 __ lw(LoadDescriptor::ReceiverRegister(), | 4495 EmitNamedSuperPropertyLoad(prop); |
| 4491 MemOperand(sp, 1 * kPointerSize)); | 4496 break; |
| 4492 __ lw(LoadDescriptor::NameRegister(), MemOperand(sp, 0)); | 4497 } |
| 4493 EmitKeyedPropertyLoad(prop); | 4498 |
| 4499 case KEYED_SUPER_PROPERTY: { |
| 4500 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); |
| 4501 EmitLoadHomeObject(prop->obj()->AsSuperReference()); |
| 4502 const Register scratch = a1; |
| 4503 const Register scratch1 = t0; |
| 4504 __ Move(scratch, result_register()); |
| 4505 VisitForAccumulatorValue(prop->key()); |
| 4506 __ Push(scratch, result_register()); |
| 4507 __ lw(scratch1, MemOperand(sp, 2 * kPointerSize)); |
| 4508 __ Push(scratch1, scratch, result_register()); |
| 4509 EmitKeyedSuperPropertyLoad(prop); |
| 4510 break; |
| 4511 } |
| 4512 |
| 4513 case KEYED_PROPERTY: { |
| 4514 VisitForStackValue(prop->obj()); |
| 4515 VisitForStackValue(prop->key()); |
| 4516 __ lw(LoadDescriptor::ReceiverRegister(), |
| 4517 MemOperand(sp, 1 * kPointerSize)); |
| 4518 __ lw(LoadDescriptor::NameRegister(), MemOperand(sp, 0)); |
| 4519 EmitKeyedPropertyLoad(prop); |
| 4520 } |
| 4521 |
| 4522 case VARIABLE: |
| 4523 UNREACHABLE(); |
| 4494 } | 4524 } |
| 4495 } | 4525 } |
| 4496 | 4526 |
| 4497 // We need a second deoptimization point after loading the value | 4527 // We need a second deoptimization point after loading the value |
| 4498 // in case evaluating the property load my have a side effect. | 4528 // in case evaluating the property load my have a side effect. |
| 4499 if (assign_type == VARIABLE) { | 4529 if (assign_type == VARIABLE) { |
| 4500 PrepareForBailout(expr->expression(), TOS_REG); | 4530 PrepareForBailout(expr->expression(), TOS_REG); |
| 4501 } else { | 4531 } else { |
| 4502 PrepareForBailoutForId(prop->LoadId(), TOS_REG); | 4532 PrepareForBailoutForId(prop->LoadId(), TOS_REG); |
| 4503 } | 4533 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 4524 break; | 4554 break; |
| 4525 case NAMED_PROPERTY: | 4555 case NAMED_PROPERTY: |
| 4526 __ sw(v0, MemOperand(sp, kPointerSize)); | 4556 __ sw(v0, MemOperand(sp, kPointerSize)); |
| 4527 break; | 4557 break; |
| 4528 case NAMED_SUPER_PROPERTY: | 4558 case NAMED_SUPER_PROPERTY: |
| 4529 __ sw(v0, MemOperand(sp, 2 * kPointerSize)); | 4559 __ sw(v0, MemOperand(sp, 2 * kPointerSize)); |
| 4530 break; | 4560 break; |
| 4531 case KEYED_PROPERTY: | 4561 case KEYED_PROPERTY: |
| 4532 __ sw(v0, MemOperand(sp, 2 * kPointerSize)); | 4562 __ sw(v0, MemOperand(sp, 2 * kPointerSize)); |
| 4533 break; | 4563 break; |
| 4564 case KEYED_SUPER_PROPERTY: |
| 4565 __ sw(v0, MemOperand(sp, 3 * kPointerSize)); |
| 4566 break; |
| 4534 } | 4567 } |
| 4535 } | 4568 } |
| 4536 } | 4569 } |
| 4537 | 4570 |
| 4538 Register scratch1 = a1; | 4571 Register scratch1 = a1; |
| 4539 Register scratch2 = t0; | 4572 Register scratch2 = t0; |
| 4540 __ li(scratch1, Operand(Smi::FromInt(count_value))); | 4573 __ li(scratch1, Operand(Smi::FromInt(count_value))); |
| 4541 __ AdduAndCheckForOverflow(v0, v0, scratch1, scratch2); | 4574 __ AdduAndCheckForOverflow(v0, v0, scratch1, scratch2); |
| 4542 __ BranchOnNoOverflow(&done, scratch2); | 4575 __ BranchOnNoOverflow(&done, scratch2); |
| 4543 // Call stub. Undo operation first. | 4576 // Call stub. Undo operation first. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 4560 break; | 4593 break; |
| 4561 case NAMED_PROPERTY: | 4594 case NAMED_PROPERTY: |
| 4562 __ sw(v0, MemOperand(sp, kPointerSize)); | 4595 __ sw(v0, MemOperand(sp, kPointerSize)); |
| 4563 break; | 4596 break; |
| 4564 case NAMED_SUPER_PROPERTY: | 4597 case NAMED_SUPER_PROPERTY: |
| 4565 __ sw(v0, MemOperand(sp, 2 * kPointerSize)); | 4598 __ sw(v0, MemOperand(sp, 2 * kPointerSize)); |
| 4566 break; | 4599 break; |
| 4567 case KEYED_PROPERTY: | 4600 case KEYED_PROPERTY: |
| 4568 __ sw(v0, MemOperand(sp, 2 * kPointerSize)); | 4601 __ sw(v0, MemOperand(sp, 2 * kPointerSize)); |
| 4569 break; | 4602 break; |
| 4603 case KEYED_SUPER_PROPERTY: |
| 4604 __ sw(v0, MemOperand(sp, 3 * kPointerSize)); |
| 4605 break; |
| 4570 } | 4606 } |
| 4571 } | 4607 } |
| 4572 } | 4608 } |
| 4573 | 4609 |
| 4574 __ bind(&stub_call); | 4610 __ bind(&stub_call); |
| 4575 __ mov(a1, v0); | 4611 __ mov(a1, v0); |
| 4576 __ li(a0, Operand(Smi::FromInt(count_value))); | 4612 __ li(a0, Operand(Smi::FromInt(count_value))); |
| 4577 | 4613 |
| 4578 // Record position before stub call. | 4614 // Record position before stub call. |
| 4579 SetSourcePosition(expr->position()); | 4615 SetSourcePosition(expr->position()); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4626 EmitNamedSuperPropertyStore(prop); | 4662 EmitNamedSuperPropertyStore(prop); |
| 4627 if (expr->is_postfix()) { | 4663 if (expr->is_postfix()) { |
| 4628 if (!context()->IsEffect()) { | 4664 if (!context()->IsEffect()) { |
| 4629 context()->PlugTOS(); | 4665 context()->PlugTOS(); |
| 4630 } | 4666 } |
| 4631 } else { | 4667 } else { |
| 4632 context()->Plug(v0); | 4668 context()->Plug(v0); |
| 4633 } | 4669 } |
| 4634 break; | 4670 break; |
| 4635 } | 4671 } |
| 4672 case KEYED_SUPER_PROPERTY: { |
| 4673 EmitKeyedSuperPropertyStore(prop); |
| 4674 if (expr->is_postfix()) { |
| 4675 if (!context()->IsEffect()) { |
| 4676 context()->PlugTOS(); |
| 4677 } |
| 4678 } else { |
| 4679 context()->Plug(v0); |
| 4680 } |
| 4681 break; |
| 4682 } |
| 4636 case KEYED_PROPERTY: { | 4683 case KEYED_PROPERTY: { |
| 4637 __ mov(StoreDescriptor::ValueRegister(), result_register()); | 4684 __ mov(StoreDescriptor::ValueRegister(), result_register()); |
| 4638 __ Pop(StoreDescriptor::ReceiverRegister(), | 4685 __ Pop(StoreDescriptor::ReceiverRegister(), |
| 4639 StoreDescriptor::NameRegister()); | 4686 StoreDescriptor::NameRegister()); |
| 4640 Handle<Code> ic = | 4687 Handle<Code> ic = |
| 4641 CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); | 4688 CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); |
| 4642 CallIC(ic, expr->CountStoreFeedbackId()); | 4689 CallIC(ic, expr->CountStoreFeedbackId()); |
| 4643 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4690 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
| 4644 if (expr->is_postfix()) { | 4691 if (expr->is_postfix()) { |
| 4645 if (!context()->IsEffect()) { | 4692 if (!context()->IsEffect()) { |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5089 Assembler::target_address_at(pc_immediate_load_address)) == | 5136 Assembler::target_address_at(pc_immediate_load_address)) == |
| 5090 reinterpret_cast<uint32_t>( | 5137 reinterpret_cast<uint32_t>( |
| 5091 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5138 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5092 return OSR_AFTER_STACK_CHECK; | 5139 return OSR_AFTER_STACK_CHECK; |
| 5093 } | 5140 } |
| 5094 | 5141 |
| 5095 | 5142 |
| 5096 } } // namespace v8::internal | 5143 } } // namespace v8::internal |
| 5097 | 5144 |
| 5098 #endif // V8_TARGET_ARCH_MIPS | 5145 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |