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_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1840 context()->Plug(rax); | 1840 context()->Plug(rax); |
1841 } | 1841 } |
1842 } | 1842 } |
1843 | 1843 |
1844 | 1844 |
1845 void FullCodeGenerator::VisitAssignment(Assignment* expr) { | 1845 void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
1846 DCHECK(expr->target()->IsValidReferenceExpression()); | 1846 DCHECK(expr->target()->IsValidReferenceExpression()); |
1847 | 1847 |
1848 Comment cmnt(masm_, "[ Assignment"); | 1848 Comment cmnt(masm_, "[ Assignment"); |
1849 | 1849 |
1850 // Left-hand side can only be a property, a global or a (parameter or local) | |
1851 // slot. | |
1852 enum LhsKind { | |
1853 VARIABLE, | |
1854 NAMED_PROPERTY, | |
1855 KEYED_PROPERTY, | |
1856 NAMED_SUPER_PROPERTY | |
1857 }; | |
1858 LhsKind assign_type = VARIABLE; | |
1859 Property* property = expr->target()->AsProperty(); | 1850 Property* property = expr->target()->AsProperty(); |
1860 if (property != NULL) { | 1851 LhsKind assign_type = GetAssignType(property); |
1861 assign_type = (property->key()->IsPropertyName()) | |
1862 ? (property->IsSuperAccess() ? NAMED_SUPER_PROPERTY | |
1863 : NAMED_PROPERTY) | |
1864 : KEYED_PROPERTY; | |
1865 } | |
1866 | 1852 |
1867 // Evaluate LHS expression. | 1853 // Evaluate LHS expression. |
1868 switch (assign_type) { | 1854 switch (assign_type) { |
1869 case VARIABLE: | 1855 case VARIABLE: |
1870 // Nothing to do here. | 1856 // Nothing to do here. |
1871 break; | 1857 break; |
1872 case NAMED_PROPERTY: | 1858 case NAMED_PROPERTY: |
1873 if (expr->is_compound()) { | 1859 if (expr->is_compound()) { |
1874 // We need the receiver both on the stack and in the register. | 1860 // We need the receiver both on the stack and in the register. |
1875 VisitForStackValue(property->obj()); | 1861 VisitForStackValue(property->obj()); |
1876 __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, 0)); | 1862 __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, 0)); |
1877 } else { | 1863 } else { |
1878 VisitForStackValue(property->obj()); | 1864 VisitForStackValue(property->obj()); |
1879 } | 1865 } |
1880 break; | 1866 break; |
1881 case NAMED_SUPER_PROPERTY: | 1867 case NAMED_SUPER_PROPERTY: |
1882 VisitForStackValue(property->obj()->AsSuperReference()->this_var()); | 1868 VisitForStackValue(property->obj()->AsSuperReference()->this_var()); |
1883 EmitLoadHomeObject(property->obj()->AsSuperReference()); | 1869 EmitLoadHomeObject(property->obj()->AsSuperReference()); |
1884 __ Push(result_register()); | 1870 __ Push(result_register()); |
1885 if (expr->is_compound()) { | 1871 if (expr->is_compound()) { |
1886 __ Push(MemOperand(rsp, kPointerSize)); | 1872 __ Push(MemOperand(rsp, kPointerSize)); |
1887 __ Push(result_register()); | 1873 __ Push(result_register()); |
1888 } | 1874 } |
1889 break; | 1875 break; |
| 1876 case KEYED_SUPER_PROPERTY: |
| 1877 VisitForStackValue(property->obj()->AsSuperReference()->this_var()); |
| 1878 EmitLoadHomeObject(property->obj()->AsSuperReference()); |
| 1879 __ Push(result_register()); |
| 1880 VisitForAccumulatorValue(property->key()); |
| 1881 __ Push(result_register()); |
| 1882 if (expr->is_compound()) { |
| 1883 __ Push(MemOperand(rsp, 2 * kPointerSize)); |
| 1884 __ Push(MemOperand(rsp, 2 * kPointerSize)); |
| 1885 __ Push(result_register()); |
| 1886 } |
| 1887 break; |
1890 case KEYED_PROPERTY: { | 1888 case KEYED_PROPERTY: { |
1891 if (expr->is_compound()) { | 1889 if (expr->is_compound()) { |
1892 VisitForStackValue(property->obj()); | 1890 VisitForStackValue(property->obj()); |
1893 VisitForStackValue(property->key()); | 1891 VisitForStackValue(property->key()); |
1894 __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, kPointerSize)); | 1892 __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, kPointerSize)); |
1895 __ movp(LoadDescriptor::NameRegister(), Operand(rsp, 0)); | 1893 __ movp(LoadDescriptor::NameRegister(), Operand(rsp, 0)); |
1896 } else { | 1894 } else { |
1897 VisitForStackValue(property->obj()); | 1895 VisitForStackValue(property->obj()); |
1898 VisitForStackValue(property->key()); | 1896 VisitForStackValue(property->key()); |
1899 } | 1897 } |
(...skipping 11 matching lines...) Expand all Loading... |
1911 PrepareForBailout(expr->target(), TOS_REG); | 1909 PrepareForBailout(expr->target(), TOS_REG); |
1912 break; | 1910 break; |
1913 case NAMED_PROPERTY: | 1911 case NAMED_PROPERTY: |
1914 EmitNamedPropertyLoad(property); | 1912 EmitNamedPropertyLoad(property); |
1915 PrepareForBailoutForId(property->LoadId(), TOS_REG); | 1913 PrepareForBailoutForId(property->LoadId(), TOS_REG); |
1916 break; | 1914 break; |
1917 case NAMED_SUPER_PROPERTY: | 1915 case NAMED_SUPER_PROPERTY: |
1918 EmitNamedSuperPropertyLoad(property); | 1916 EmitNamedSuperPropertyLoad(property); |
1919 PrepareForBailoutForId(property->LoadId(), TOS_REG); | 1917 PrepareForBailoutForId(property->LoadId(), TOS_REG); |
1920 break; | 1918 break; |
| 1919 case KEYED_SUPER_PROPERTY: |
| 1920 EmitKeyedSuperPropertyLoad(property); |
| 1921 PrepareForBailoutForId(property->LoadId(), TOS_REG); |
| 1922 break; |
1921 case KEYED_PROPERTY: | 1923 case KEYED_PROPERTY: |
1922 EmitKeyedPropertyLoad(property); | 1924 EmitKeyedPropertyLoad(property); |
1923 PrepareForBailoutForId(property->LoadId(), TOS_REG); | 1925 PrepareForBailoutForId(property->LoadId(), TOS_REG); |
1924 break; | 1926 break; |
1925 } | 1927 } |
1926 } | 1928 } |
1927 | 1929 |
1928 Token::Value op = expr->binary_op(); | 1930 Token::Value op = expr->binary_op(); |
1929 __ Push(rax); // Left operand goes on the stack. | 1931 __ Push(rax); // Left operand goes on the stack. |
1930 VisitForAccumulatorValue(expr->value()); | 1932 VisitForAccumulatorValue(expr->value()); |
(...skipping 29 matching lines...) Expand all Loading... |
1960 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 1962 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
1961 context()->Plug(rax); | 1963 context()->Plug(rax); |
1962 break; | 1964 break; |
1963 case NAMED_PROPERTY: | 1965 case NAMED_PROPERTY: |
1964 EmitNamedPropertyAssignment(expr); | 1966 EmitNamedPropertyAssignment(expr); |
1965 break; | 1967 break; |
1966 case NAMED_SUPER_PROPERTY: | 1968 case NAMED_SUPER_PROPERTY: |
1967 EmitNamedSuperPropertyStore(property); | 1969 EmitNamedSuperPropertyStore(property); |
1968 context()->Plug(rax); | 1970 context()->Plug(rax); |
1969 break; | 1971 break; |
| 1972 case KEYED_SUPER_PROPERTY: |
| 1973 EmitKeyedSuperPropertyStore(property); |
| 1974 context()->Plug(rax); |
| 1975 break; |
1970 case KEYED_PROPERTY: | 1976 case KEYED_PROPERTY: |
1971 EmitKeyedPropertyAssignment(expr); | 1977 EmitKeyedPropertyAssignment(expr); |
1972 break; | 1978 break; |
1973 } | 1979 } |
1974 } | 1980 } |
1975 | 1981 |
1976 | 1982 |
1977 void FullCodeGenerator::VisitYield(Yield* expr) { | 1983 void FullCodeGenerator::VisitYield(Yield* expr) { |
1978 Comment cmnt(masm_, "[ Yield"); | 1984 Comment cmnt(masm_, "[ Yield"); |
1979 // Evaluate yielded value first; the initial iterator definition depends on | 1985 // Evaluate yielded value first; the initial iterator definition depends on |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2557 | 2563 |
2558 | 2564 |
2559 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { | 2565 void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { |
2560 // Assignment to named property of super. | 2566 // Assignment to named property of super. |
2561 // rax : value | 2567 // rax : value |
2562 // stack : receiver ('this'), home_object | 2568 // stack : receiver ('this'), home_object |
2563 DCHECK(prop != NULL); | 2569 DCHECK(prop != NULL); |
2564 Literal* key = prop->key()->AsLiteral(); | 2570 Literal* key = prop->key()->AsLiteral(); |
2565 DCHECK(key != NULL); | 2571 DCHECK(key != NULL); |
2566 | 2572 |
| 2573 __ Push(key->value()); |
2567 __ Push(rax); | 2574 __ Push(rax); |
2568 __ Push(key->value()); | |
2569 __ CallRuntime((strict_mode() == STRICT ? Runtime::kStoreToSuper_Strict | 2575 __ CallRuntime((strict_mode() == STRICT ? Runtime::kStoreToSuper_Strict |
2570 : Runtime::kStoreToSuper_Sloppy), | 2576 : Runtime::kStoreToSuper_Sloppy), |
2571 4); | 2577 4); |
2572 } | 2578 } |
2573 | 2579 |
2574 | 2580 |
| 2581 void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) { |
| 2582 // Assignment to named property of super. |
| 2583 // rax : value |
| 2584 // stack : receiver ('this'), home_object, key |
| 2585 DCHECK(prop != NULL); |
| 2586 |
| 2587 __ Push(rax); |
| 2588 __ CallRuntime((strict_mode() == STRICT ? Runtime::kStoreKeyedToSuper_Strict |
| 2589 : Runtime::kStoreKeyedToSuper_Sloppy), |
| 2590 4); |
| 2591 } |
| 2592 |
| 2593 |
2575 void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { | 2594 void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
2576 // Assignment to a property, using a keyed store IC. | 2595 // Assignment to a property, using a keyed store IC. |
2577 | 2596 |
2578 __ Pop(StoreDescriptor::NameRegister()); // Key. | 2597 __ Pop(StoreDescriptor::NameRegister()); // Key. |
2579 __ Pop(StoreDescriptor::ReceiverRegister()); | 2598 __ Pop(StoreDescriptor::ReceiverRegister()); |
2580 DCHECK(StoreDescriptor::ValueRegister().is(rax)); | 2599 DCHECK(StoreDescriptor::ValueRegister().is(rax)); |
2581 // Record source code position before IC call. | 2600 // Record source code position before IC call. |
2582 SetSourcePosition(expr->position()); | 2601 SetSourcePosition(expr->position()); |
2583 Handle<Code> ic = CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); | 2602 Handle<Code> ic = CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); |
2584 CallIC(ic, expr->AssignmentFeedbackId()); | 2603 CallIC(ic, expr->AssignmentFeedbackId()); |
(...skipping 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4392 } | 4411 } |
4393 } | 4412 } |
4394 | 4413 |
4395 | 4414 |
4396 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { | 4415 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
4397 DCHECK(expr->expression()->IsValidReferenceExpression()); | 4416 DCHECK(expr->expression()->IsValidReferenceExpression()); |
4398 | 4417 |
4399 Comment cmnt(masm_, "[ CountOperation"); | 4418 Comment cmnt(masm_, "[ CountOperation"); |
4400 SetSourcePosition(expr->position()); | 4419 SetSourcePosition(expr->position()); |
4401 | 4420 |
4402 // Expression can only be a property, a global or a (parameter or local) | |
4403 // slot. | |
4404 enum LhsKind { | |
4405 VARIABLE, | |
4406 NAMED_PROPERTY, | |
4407 KEYED_PROPERTY, | |
4408 NAMED_SUPER_PROPERTY | |
4409 }; | |
4410 LhsKind assign_type = VARIABLE; | |
4411 Property* prop = expr->expression()->AsProperty(); | 4421 Property* prop = expr->expression()->AsProperty(); |
4412 // In case of a property we use the uninitialized expression context | 4422 LhsKind assign_type = GetAssignType(prop); |
4413 // of the key to detect a named property. | |
4414 if (prop != NULL) { | |
4415 assign_type = | |
4416 (prop->key()->IsPropertyName()) | |
4417 ? (prop->IsSuperAccess() ? NAMED_SUPER_PROPERTY : NAMED_PROPERTY) | |
4418 : KEYED_PROPERTY; | |
4419 } | |
4420 | 4423 |
4421 // Evaluate expression and get value. | 4424 // Evaluate expression and get value. |
4422 if (assign_type == VARIABLE) { | 4425 if (assign_type == VARIABLE) { |
4423 DCHECK(expr->expression()->AsVariableProxy()->var() != NULL); | 4426 DCHECK(expr->expression()->AsVariableProxy()->var() != NULL); |
4424 AccumulatorValueContext context(this); | 4427 AccumulatorValueContext context(this); |
4425 EmitVariableLoad(expr->expression()->AsVariableProxy()); | 4428 EmitVariableLoad(expr->expression()->AsVariableProxy()); |
4426 } else { | 4429 } else { |
4427 // Reserve space for result of postfix operation. | 4430 // Reserve space for result of postfix operation. |
4428 if (expr->is_postfix() && !context()->IsEffect()) { | 4431 if (expr->is_postfix() && !context()->IsEffect()) { |
4429 __ Push(Smi::FromInt(0)); | 4432 __ Push(Smi::FromInt(0)); |
4430 } | 4433 } |
4431 if (assign_type == NAMED_PROPERTY) { | 4434 switch (assign_type) { |
4432 VisitForStackValue(prop->obj()); | 4435 case NAMED_PROPERTY: { |
4433 __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, 0)); | 4436 VisitForStackValue(prop->obj()); |
4434 EmitNamedPropertyLoad(prop); | 4437 __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, 0)); |
4435 } else if (assign_type == NAMED_SUPER_PROPERTY) { | 4438 EmitNamedPropertyLoad(prop); |
4436 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); | 4439 break; |
4437 EmitLoadHomeObject(prop->obj()->AsSuperReference()); | 4440 } |
4438 __ Push(result_register()); | 4441 |
4439 __ Push(MemOperand(rsp, kPointerSize)); | 4442 case NAMED_SUPER_PROPERTY: { |
4440 __ Push(result_register()); | 4443 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); |
4441 EmitNamedSuperPropertyLoad(prop); | 4444 EmitLoadHomeObject(prop->obj()->AsSuperReference()); |
4442 } else { | 4445 __ Push(result_register()); |
4443 VisitForStackValue(prop->obj()); | 4446 __ Push(MemOperand(rsp, kPointerSize)); |
4444 VisitForStackValue(prop->key()); | 4447 __ Push(result_register()); |
4445 // Leave receiver on stack | 4448 EmitNamedSuperPropertyLoad(prop); |
4446 __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, kPointerSize)); | 4449 break; |
4447 // Copy of key, needed for later store. | 4450 } |
4448 __ movp(LoadDescriptor::NameRegister(), Operand(rsp, 0)); | 4451 |
4449 EmitKeyedPropertyLoad(prop); | 4452 case KEYED_SUPER_PROPERTY: { |
| 4453 VisitForStackValue(prop->obj()->AsSuperReference()->this_var()); |
| 4454 EmitLoadHomeObject(prop->obj()->AsSuperReference()); |
| 4455 __ Push(result_register()); |
| 4456 VisitForAccumulatorValue(prop->key()); |
| 4457 __ Push(result_register()); |
| 4458 __ Push(MemOperand(rsp, 2 * kPointerSize)); |
| 4459 __ Push(MemOperand(rsp, 2 * kPointerSize)); |
| 4460 __ Push(result_register()); |
| 4461 EmitKeyedSuperPropertyLoad(prop); |
| 4462 break; |
| 4463 } |
| 4464 |
| 4465 case KEYED_PROPERTY: { |
| 4466 VisitForStackValue(prop->obj()); |
| 4467 VisitForStackValue(prop->key()); |
| 4468 // Leave receiver on stack |
| 4469 __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, kPointerSize)); |
| 4470 // Copy of key, needed for later store. |
| 4471 __ movp(LoadDescriptor::NameRegister(), Operand(rsp, 0)); |
| 4472 EmitKeyedPropertyLoad(prop); |
| 4473 break; |
| 4474 } |
| 4475 |
| 4476 case VARIABLE: |
| 4477 UNREACHABLE(); |
4450 } | 4478 } |
4451 } | 4479 } |
4452 | 4480 |
4453 // We need a second deoptimization point after loading the value | 4481 // We need a second deoptimization point after loading the value |
4454 // in case evaluating the property load my have a side effect. | 4482 // in case evaluating the property load my have a side effect. |
4455 if (assign_type == VARIABLE) { | 4483 if (assign_type == VARIABLE) { |
4456 PrepareForBailout(expr->expression(), TOS_REG); | 4484 PrepareForBailout(expr->expression(), TOS_REG); |
4457 } else { | 4485 } else { |
4458 PrepareForBailoutForId(prop->LoadId(), TOS_REG); | 4486 PrepareForBailoutForId(prop->LoadId(), TOS_REG); |
4459 } | 4487 } |
(...skipping 17 matching lines...) Expand all Loading... |
4477 break; | 4505 break; |
4478 case NAMED_PROPERTY: | 4506 case NAMED_PROPERTY: |
4479 __ movp(Operand(rsp, kPointerSize), rax); | 4507 __ movp(Operand(rsp, kPointerSize), rax); |
4480 break; | 4508 break; |
4481 case NAMED_SUPER_PROPERTY: | 4509 case NAMED_SUPER_PROPERTY: |
4482 __ movp(Operand(rsp, 2 * kPointerSize), rax); | 4510 __ movp(Operand(rsp, 2 * kPointerSize), rax); |
4483 break; | 4511 break; |
4484 case KEYED_PROPERTY: | 4512 case KEYED_PROPERTY: |
4485 __ movp(Operand(rsp, 2 * kPointerSize), rax); | 4513 __ movp(Operand(rsp, 2 * kPointerSize), rax); |
4486 break; | 4514 break; |
| 4515 case KEYED_SUPER_PROPERTY: |
| 4516 __ movp(Operand(rsp, 3 * kPointerSize), rax); |
| 4517 break; |
4487 } | 4518 } |
4488 } | 4519 } |
4489 } | 4520 } |
4490 | 4521 |
4491 SmiOperationExecutionMode mode; | 4522 SmiOperationExecutionMode mode; |
4492 mode.Add(PRESERVE_SOURCE_REGISTER); | 4523 mode.Add(PRESERVE_SOURCE_REGISTER); |
4493 mode.Add(BAILOUT_ON_NO_OVERFLOW); | 4524 mode.Add(BAILOUT_ON_NO_OVERFLOW); |
4494 if (expr->op() == Token::INC) { | 4525 if (expr->op() == Token::INC) { |
4495 __ SmiAddConstant(rax, rax, Smi::FromInt(1), mode, &done, Label::kNear); | 4526 __ SmiAddConstant(rax, rax, Smi::FromInt(1), mode, &done, Label::kNear); |
4496 } else { | 4527 } else { |
(...skipping 18 matching lines...) Expand all Loading... |
4515 break; | 4546 break; |
4516 case NAMED_PROPERTY: | 4547 case NAMED_PROPERTY: |
4517 __ movp(Operand(rsp, kPointerSize), rax); | 4548 __ movp(Operand(rsp, kPointerSize), rax); |
4518 break; | 4549 break; |
4519 case NAMED_SUPER_PROPERTY: | 4550 case NAMED_SUPER_PROPERTY: |
4520 __ movp(Operand(rsp, 2 * kPointerSize), rax); | 4551 __ movp(Operand(rsp, 2 * kPointerSize), rax); |
4521 break; | 4552 break; |
4522 case KEYED_PROPERTY: | 4553 case KEYED_PROPERTY: |
4523 __ movp(Operand(rsp, 2 * kPointerSize), rax); | 4554 __ movp(Operand(rsp, 2 * kPointerSize), rax); |
4524 break; | 4555 break; |
| 4556 case KEYED_SUPER_PROPERTY: |
| 4557 __ movp(Operand(rsp, 3 * kPointerSize), rax); |
| 4558 break; |
4525 } | 4559 } |
4526 } | 4560 } |
4527 } | 4561 } |
4528 | 4562 |
4529 // Record position before stub call. | 4563 // Record position before stub call. |
4530 SetSourcePosition(expr->position()); | 4564 SetSourcePosition(expr->position()); |
4531 | 4565 |
4532 // Call stub for +1/-1. | 4566 // Call stub for +1/-1. |
4533 __ bind(&stub_call); | 4567 __ bind(&stub_call); |
4534 __ movp(rdx, rax); | 4568 __ movp(rdx, rax); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4582 EmitNamedSuperPropertyStore(prop); | 4616 EmitNamedSuperPropertyStore(prop); |
4583 if (expr->is_postfix()) { | 4617 if (expr->is_postfix()) { |
4584 if (!context()->IsEffect()) { | 4618 if (!context()->IsEffect()) { |
4585 context()->PlugTOS(); | 4619 context()->PlugTOS(); |
4586 } | 4620 } |
4587 } else { | 4621 } else { |
4588 context()->Plug(rax); | 4622 context()->Plug(rax); |
4589 } | 4623 } |
4590 break; | 4624 break; |
4591 } | 4625 } |
| 4626 case KEYED_SUPER_PROPERTY: { |
| 4627 EmitKeyedSuperPropertyStore(prop); |
| 4628 if (expr->is_postfix()) { |
| 4629 if (!context()->IsEffect()) { |
| 4630 context()->PlugTOS(); |
| 4631 } |
| 4632 } else { |
| 4633 context()->Plug(rax); |
| 4634 } |
| 4635 break; |
| 4636 } |
4592 case KEYED_PROPERTY: { | 4637 case KEYED_PROPERTY: { |
4593 __ Pop(StoreDescriptor::NameRegister()); | 4638 __ Pop(StoreDescriptor::NameRegister()); |
4594 __ Pop(StoreDescriptor::ReceiverRegister()); | 4639 __ Pop(StoreDescriptor::ReceiverRegister()); |
4595 Handle<Code> ic = | 4640 Handle<Code> ic = |
4596 CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); | 4641 CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); |
4597 CallIC(ic, expr->CountStoreFeedbackId()); | 4642 CallIC(ic, expr->CountStoreFeedbackId()); |
4598 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 4643 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
4599 if (expr->is_postfix()) { | 4644 if (expr->is_postfix()) { |
4600 if (!context()->IsEffect()) { | 4645 if (!context()->IsEffect()) { |
4601 context()->PlugTOS(); | 4646 context()->PlugTOS(); |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5045 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5090 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5046 Assembler::target_address_at(call_target_address, | 5091 Assembler::target_address_at(call_target_address, |
5047 unoptimized_code)); | 5092 unoptimized_code)); |
5048 return OSR_AFTER_STACK_CHECK; | 5093 return OSR_AFTER_STACK_CHECK; |
5049 } | 5094 } |
5050 | 5095 |
5051 | 5096 |
5052 } } // namespace v8::internal | 5097 } } // namespace v8::internal |
5053 | 5098 |
5054 #endif // V8_TARGET_ARCH_X64 | 5099 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |