Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 1700993002: Remove strong mode support from property loads. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comment. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 1885
1886 1886
1887 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { 1887 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
1888 SetExpressionPosition(prop); 1888 SetExpressionPosition(prop);
1889 Literal* key = prop->key()->AsLiteral(); 1889 Literal* key = prop->key()->AsLiteral();
1890 DCHECK(!prop->IsSuperAccess()); 1890 DCHECK(!prop->IsSuperAccess());
1891 1891
1892 __ Mov(LoadDescriptor::NameRegister(), Operand(key->value())); 1892 __ Mov(LoadDescriptor::NameRegister(), Operand(key->value()));
1893 __ Mov(LoadDescriptor::SlotRegister(), 1893 __ Mov(LoadDescriptor::SlotRegister(),
1894 SmiFromSlot(prop->PropertyFeedbackSlot())); 1894 SmiFromSlot(prop->PropertyFeedbackSlot()));
1895 CallLoadIC(NOT_INSIDE_TYPEOF, language_mode()); 1895 CallLoadIC(NOT_INSIDE_TYPEOF);
1896 } 1896 }
1897 1897
1898 1898
1899 void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) { 1899 void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
1900 // Stack: receiver, home_object. 1900 // Stack: receiver, home_object.
1901 SetExpressionPosition(prop); 1901 SetExpressionPosition(prop);
1902 Literal* key = prop->key()->AsLiteral(); 1902 Literal* key = prop->key()->AsLiteral();
1903 DCHECK(!key->value()->IsSmi()); 1903 DCHECK(!key->value()->IsSmi());
1904 DCHECK(prop->IsSuperAccess()); 1904 DCHECK(prop->IsSuperAccess());
1905 1905
1906 __ Push(key->value()); 1906 __ Push(key->value());
1907 __ Push(Smi::FromInt(language_mode()));
1908 __ CallRuntime(Runtime::kLoadFromSuper); 1907 __ CallRuntime(Runtime::kLoadFromSuper);
1909 } 1908 }
1910 1909
1911 1910
1912 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) { 1911 void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
1913 SetExpressionPosition(prop); 1912 SetExpressionPosition(prop);
1914 // Call keyed load IC. It has arguments key and receiver in x0 and x1. 1913 // Call keyed load IC. It has arguments key and receiver in x0 and x1.
1915 Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate(), language_mode()).code(); 1914 Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
1916 __ Mov(LoadDescriptor::SlotRegister(), 1915 __ Mov(LoadDescriptor::SlotRegister(),
1917 SmiFromSlot(prop->PropertyFeedbackSlot())); 1916 SmiFromSlot(prop->PropertyFeedbackSlot()));
1918 CallIC(ic); 1917 CallIC(ic);
1919 } 1918 }
1920 1919
1921 1920
1922 void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) { 1921 void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
1923 // Stack: receiver, home_object, key. 1922 // Stack: receiver, home_object, key.
1924 SetExpressionPosition(prop); 1923 SetExpressionPosition(prop);
1925 __ Push(Smi::FromInt(language_mode()));
1926 __ CallRuntime(Runtime::kLoadKeyedFromSuper); 1924 __ CallRuntime(Runtime::kLoadKeyedFromSuper);
1927 } 1925 }
1928 1926
1929 1927
1930 void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, 1928 void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
1931 Token::Value op, 1929 Token::Value op,
1932 Expression* left_expr, 1930 Expression* left_expr,
1933 Expression* right_expr) { 1931 Expression* right_expr) {
1934 Label done, both_smis, stub_call; 1932 Label done, both_smis, stub_call;
1935 1933
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
2452 // Load the function from the receiver. 2450 // Load the function from the receiver.
2453 const Register scratch = x10; 2451 const Register scratch = x10;
2454 SuperPropertyReference* super_ref = 2452 SuperPropertyReference* super_ref =
2455 callee->AsProperty()->obj()->AsSuperPropertyReference(); 2453 callee->AsProperty()->obj()->AsSuperPropertyReference();
2456 VisitForStackValue(super_ref->home_object()); 2454 VisitForStackValue(super_ref->home_object());
2457 VisitForAccumulatorValue(super_ref->this_var()); 2455 VisitForAccumulatorValue(super_ref->this_var());
2458 __ Push(x0); 2456 __ Push(x0);
2459 __ Peek(scratch, kPointerSize); 2457 __ Peek(scratch, kPointerSize);
2460 __ Push(x0, scratch); 2458 __ Push(x0, scratch);
2461 __ Push(key->value()); 2459 __ Push(key->value());
2462 __ Push(Smi::FromInt(language_mode()));
2463 2460
2464 // Stack here: 2461 // Stack here:
2465 // - home_object 2462 // - home_object
2466 // - this (receiver) 2463 // - this (receiver)
2467 // - this (receiver) <-- LoadFromSuper will pop here and below. 2464 // - this (receiver) <-- LoadFromSuper will pop here and below.
2468 // - home_object 2465 // - home_object
2469 // - language_mode
2470 __ CallRuntime(Runtime::kLoadFromSuper); 2466 __ CallRuntime(Runtime::kLoadFromSuper);
2471 2467
2472 // Replace home_object with target function. 2468 // Replace home_object with target function.
2473 __ Poke(x0, kPointerSize); 2469 __ Poke(x0, kPointerSize);
2474 2470
2475 // Stack here: 2471 // Stack here:
2476 // - target function 2472 // - target function
2477 // - this (receiver) 2473 // - this (receiver)
2478 EmitCall(expr); 2474 EmitCall(expr);
2479 } 2475 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
2514 // Load the function from the receiver. 2510 // Load the function from the receiver.
2515 const Register scratch = x10; 2511 const Register scratch = x10;
2516 SuperPropertyReference* super_ref = 2512 SuperPropertyReference* super_ref =
2517 callee->AsProperty()->obj()->AsSuperPropertyReference(); 2513 callee->AsProperty()->obj()->AsSuperPropertyReference();
2518 VisitForStackValue(super_ref->home_object()); 2514 VisitForStackValue(super_ref->home_object());
2519 VisitForAccumulatorValue(super_ref->this_var()); 2515 VisitForAccumulatorValue(super_ref->this_var());
2520 __ Push(x0); 2516 __ Push(x0);
2521 __ Peek(scratch, kPointerSize); 2517 __ Peek(scratch, kPointerSize);
2522 __ Push(x0, scratch); 2518 __ Push(x0, scratch);
2523 VisitForStackValue(prop->key()); 2519 VisitForStackValue(prop->key());
2524 __ Push(Smi::FromInt(language_mode()));
2525 2520
2526 // Stack here: 2521 // Stack here:
2527 // - home_object 2522 // - home_object
2528 // - this (receiver) 2523 // - this (receiver)
2529 // - this (receiver) <-- LoadKeyedFromSuper will pop here and below. 2524 // - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
2530 // - home_object 2525 // - home_object
2531 // - key 2526 // - key
2532 // - language_mode
2533 __ CallRuntime(Runtime::kLoadKeyedFromSuper); 2527 __ CallRuntime(Runtime::kLoadKeyedFromSuper);
2534 2528
2535 // Replace home_object with target function. 2529 // Replace home_object with target function.
2536 __ Poke(x0, kPointerSize); 2530 __ Poke(x0, kPointerSize);
2537 2531
2538 // Stack here: 2532 // Stack here:
2539 // - target function 2533 // - target function
2540 // - this (receiver) 2534 // - this (receiver)
2541 EmitCall(expr); 2535 EmitCall(expr);
2542 } 2536 }
(...skipping 2075 matching lines...) Expand 10 before | Expand all | Expand 10 after
4618 } 4612 }
4619 4613
4620 return INTERRUPT; 4614 return INTERRUPT;
4621 } 4615 }
4622 4616
4623 4617
4624 } // namespace internal 4618 } // namespace internal
4625 } // namespace v8 4619 } // namespace v8
4626 4620
4627 #endif // V8_TARGET_ARCH_ARM64 4621 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698