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

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

Issue 1218783005: Support for global var shortcuts in script contexts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixing builds Created 5 years, 5 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 | « no previous file | src/arm64/full-codegen-arm64.cc » ('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 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_ARM 7 #if V8_TARGET_ARCH_ARM
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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 344
345 } else { 345 } else {
346 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); 346 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS);
347 { Comment cmnt(masm_, "[ Declarations"); 347 { Comment cmnt(masm_, "[ Declarations");
348 // For named function expressions, declare the function name as a 348 // For named function expressions, declare the function name as a
349 // constant. 349 // constant.
350 if (scope()->is_function_scope() && scope()->function() != NULL) { 350 if (scope()->is_function_scope() && scope()->function() != NULL) {
351 VariableDeclaration* function = scope()->function(); 351 VariableDeclaration* function = scope()->function();
352 DCHECK(function->proxy()->var()->mode() == CONST || 352 DCHECK(function->proxy()->var()->mode() == CONST ||
353 function->proxy()->var()->mode() == CONST_LEGACY); 353 function->proxy()->var()->mode() == CONST_LEGACY);
354 DCHECK(function->proxy()->var()->location() != Variable::UNALLOCATED); 354 DCHECK(!function->proxy()->var()->IsUnallocatedOrGlobalSlot());
355 VisitVariableDeclaration(function); 355 VisitVariableDeclaration(function);
356 } 356 }
357 VisitDeclarations(scope()->declarations()); 357 VisitDeclarations(scope()->declarations());
358 } 358 }
359 359
360 { Comment cmnt(masm_, "[ Stack check"); 360 { Comment cmnt(masm_, "[ Stack check");
361 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); 361 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS);
362 Label ok; 362 Label ok;
363 __ LoadRoot(ip, Heap::kStackLimitRootIndex); 363 __ LoadRoot(ip, Heap::kStackLimitRootIndex);
364 __ cmp(sp, Operand(ip)); 364 __ cmp(sp, Operand(ip));
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 void FullCodeGenerator::VisitVariableDeclaration( 868 void FullCodeGenerator::VisitVariableDeclaration(
869 VariableDeclaration* declaration) { 869 VariableDeclaration* declaration) {
870 // If it was not possible to allocate the variable at compile time, we 870 // If it was not possible to allocate the variable at compile time, we
871 // need to "declare" it at runtime to make sure it actually exists in the 871 // need to "declare" it at runtime to make sure it actually exists in the
872 // local context. 872 // local context.
873 VariableProxy* proxy = declaration->proxy(); 873 VariableProxy* proxy = declaration->proxy();
874 VariableMode mode = declaration->mode(); 874 VariableMode mode = declaration->mode();
875 Variable* variable = proxy->var(); 875 Variable* variable = proxy->var();
876 bool hole_init = mode == LET || mode == CONST || mode == CONST_LEGACY; 876 bool hole_init = mode == LET || mode == CONST || mode == CONST_LEGACY;
877 switch (variable->location()) { 877 switch (variable->location()) {
878 case Variable::UNALLOCATED: 878 case VariableLocation::GLOBAL:
879 case VariableLocation::UNALLOCATED:
879 globals_->Add(variable->name(), zone()); 880 globals_->Add(variable->name(), zone());
880 globals_->Add(variable->binding_needs_init() 881 globals_->Add(variable->binding_needs_init()
881 ? isolate()->factory()->the_hole_value() 882 ? isolate()->factory()->the_hole_value()
882 : isolate()->factory()->undefined_value(), 883 : isolate()->factory()->undefined_value(),
883 zone()); 884 zone());
884 break; 885 break;
885 886
886 case Variable::PARAMETER: 887 case VariableLocation::PARAMETER:
887 case Variable::LOCAL: 888 case VariableLocation::LOCAL:
888 if (hole_init) { 889 if (hole_init) {
889 Comment cmnt(masm_, "[ VariableDeclaration"); 890 Comment cmnt(masm_, "[ VariableDeclaration");
890 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 891 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
891 __ str(ip, StackOperand(variable)); 892 __ str(ip, StackOperand(variable));
892 } 893 }
893 break; 894 break;
894 895
895 case Variable::CONTEXT: 896 case VariableLocation::CONTEXT:
896 if (hole_init) { 897 if (hole_init) {
897 Comment cmnt(masm_, "[ VariableDeclaration"); 898 Comment cmnt(masm_, "[ VariableDeclaration");
898 EmitDebugCheckDeclarationContext(variable); 899 EmitDebugCheckDeclarationContext(variable);
899 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 900 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
900 __ str(ip, ContextOperand(cp, variable->index())); 901 __ str(ip, ContextOperand(cp, variable->index()));
901 // No write barrier since the_hole_value is in old space. 902 // No write barrier since the_hole_value is in old space.
902 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); 903 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
903 } 904 }
904 break; 905 break;
905 906
906 case Variable::LOOKUP: { 907 case VariableLocation::LOOKUP: {
907 Comment cmnt(masm_, "[ VariableDeclaration"); 908 Comment cmnt(masm_, "[ VariableDeclaration");
908 __ mov(r2, Operand(variable->name())); 909 __ mov(r2, Operand(variable->name()));
909 // Declaration nodes are always introduced in one of four modes. 910 // Declaration nodes are always introduced in one of four modes.
910 DCHECK(IsDeclaredVariableMode(mode)); 911 DCHECK(IsDeclaredVariableMode(mode));
911 PropertyAttributes attr = 912 PropertyAttributes attr =
912 IsImmutableVariableMode(mode) ? READ_ONLY : NONE; 913 IsImmutableVariableMode(mode) ? READ_ONLY : NONE;
913 __ mov(r1, Operand(Smi::FromInt(attr))); 914 __ mov(r1, Operand(Smi::FromInt(attr)));
914 // Push initial value, if any. 915 // Push initial value, if any.
915 // Note: For variables we must not push an initial value (such as 916 // Note: For variables we must not push an initial value (such as
916 // 'undefined') because we may have a (legal) redeclaration and we 917 // 'undefined') because we may have a (legal) redeclaration and we
(...skipping 10 matching lines...) Expand all
927 } 928 }
928 } 929 }
929 } 930 }
930 931
931 932
932 void FullCodeGenerator::VisitFunctionDeclaration( 933 void FullCodeGenerator::VisitFunctionDeclaration(
933 FunctionDeclaration* declaration) { 934 FunctionDeclaration* declaration) {
934 VariableProxy* proxy = declaration->proxy(); 935 VariableProxy* proxy = declaration->proxy();
935 Variable* variable = proxy->var(); 936 Variable* variable = proxy->var();
936 switch (variable->location()) { 937 switch (variable->location()) {
937 case Variable::UNALLOCATED: { 938 case VariableLocation::GLOBAL:
939 case VariableLocation::UNALLOCATED: {
938 globals_->Add(variable->name(), zone()); 940 globals_->Add(variable->name(), zone());
939 Handle<SharedFunctionInfo> function = 941 Handle<SharedFunctionInfo> function =
940 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); 942 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_);
941 // Check for stack-overflow exception. 943 // Check for stack-overflow exception.
942 if (function.is_null()) return SetStackOverflow(); 944 if (function.is_null()) return SetStackOverflow();
943 globals_->Add(function, zone()); 945 globals_->Add(function, zone());
944 break; 946 break;
945 } 947 }
946 948
947 case Variable::PARAMETER: 949 case VariableLocation::PARAMETER:
948 case Variable::LOCAL: { 950 case VariableLocation::LOCAL: {
949 Comment cmnt(masm_, "[ FunctionDeclaration"); 951 Comment cmnt(masm_, "[ FunctionDeclaration");
950 VisitForAccumulatorValue(declaration->fun()); 952 VisitForAccumulatorValue(declaration->fun());
951 __ str(result_register(), StackOperand(variable)); 953 __ str(result_register(), StackOperand(variable));
952 break; 954 break;
953 } 955 }
954 956
955 case Variable::CONTEXT: { 957 case VariableLocation::CONTEXT: {
956 Comment cmnt(masm_, "[ FunctionDeclaration"); 958 Comment cmnt(masm_, "[ FunctionDeclaration");
957 EmitDebugCheckDeclarationContext(variable); 959 EmitDebugCheckDeclarationContext(variable);
958 VisitForAccumulatorValue(declaration->fun()); 960 VisitForAccumulatorValue(declaration->fun());
959 __ str(result_register(), ContextOperand(cp, variable->index())); 961 __ str(result_register(), ContextOperand(cp, variable->index()));
960 int offset = Context::SlotOffset(variable->index()); 962 int offset = Context::SlotOffset(variable->index());
961 // We know that we have written a function, which is not a smi. 963 // We know that we have written a function, which is not a smi.
962 __ RecordWriteContextSlot(cp, 964 __ RecordWriteContextSlot(cp,
963 offset, 965 offset,
964 result_register(), 966 result_register(),
965 r2, 967 r2,
966 kLRHasBeenSaved, 968 kLRHasBeenSaved,
967 kDontSaveFPRegs, 969 kDontSaveFPRegs,
968 EMIT_REMEMBERED_SET, 970 EMIT_REMEMBERED_SET,
969 OMIT_SMI_CHECK); 971 OMIT_SMI_CHECK);
970 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); 972 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
971 break; 973 break;
972 } 974 }
973 975
974 case Variable::LOOKUP: { 976 case VariableLocation::LOOKUP: {
975 Comment cmnt(masm_, "[ FunctionDeclaration"); 977 Comment cmnt(masm_, "[ FunctionDeclaration");
976 __ mov(r2, Operand(variable->name())); 978 __ mov(r2, Operand(variable->name()));
977 __ mov(r1, Operand(Smi::FromInt(NONE))); 979 __ mov(r1, Operand(Smi::FromInt(NONE)));
978 __ Push(cp, r2, r1); 980 __ Push(cp, r2, r1);
979 // Push initial value for function declaration. 981 // Push initial value for function declaration.
980 VisitForStackValue(declaration->fun()); 982 VisitForStackValue(declaration->fun());
981 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); 983 __ CallRuntime(Runtime::kDeclareLookupSlot, 4);
982 break; 984 break;
983 } 985 }
984 } 986 }
985 } 987 }
986 988
987 989
988 void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* declaration) { 990 void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* declaration) {
989 VariableProxy* proxy = declaration->proxy(); 991 VariableProxy* proxy = declaration->proxy();
990 Variable* variable = proxy->var(); 992 Variable* variable = proxy->var();
991 switch (variable->location()) { 993 switch (variable->location()) {
992 case Variable::UNALLOCATED: 994 case VariableLocation::GLOBAL:
995 case VariableLocation::UNALLOCATED:
993 // TODO(rossberg) 996 // TODO(rossberg)
994 break; 997 break;
995 998
996 case Variable::CONTEXT: { 999 case VariableLocation::CONTEXT: {
997 Comment cmnt(masm_, "[ ImportDeclaration"); 1000 Comment cmnt(masm_, "[ ImportDeclaration");
998 EmitDebugCheckDeclarationContext(variable); 1001 EmitDebugCheckDeclarationContext(variable);
999 // TODO(rossberg) 1002 // TODO(rossberg)
1000 break; 1003 break;
1001 } 1004 }
1002 1005
1003 case Variable::PARAMETER: 1006 case VariableLocation::PARAMETER:
1004 case Variable::LOCAL: 1007 case VariableLocation::LOCAL:
1005 case Variable::LOOKUP: 1008 case VariableLocation::LOOKUP:
1006 UNREACHABLE(); 1009 UNREACHABLE();
1007 } 1010 }
1008 } 1011 }
1009 1012
1010 1013
1011 void FullCodeGenerator::VisitExportDeclaration(ExportDeclaration* declaration) { 1014 void FullCodeGenerator::VisitExportDeclaration(ExportDeclaration* declaration) {
1012 // TODO(rossberg) 1015 // TODO(rossberg)
1013 } 1016 }
1014 1017
1015 1018
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 1495
1493 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) { 1496 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
1494 // Record position before possible IC call. 1497 // Record position before possible IC call.
1495 SetExpressionPosition(proxy); 1498 SetExpressionPosition(proxy);
1496 PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS); 1499 PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS);
1497 Variable* var = proxy->var(); 1500 Variable* var = proxy->var();
1498 1501
1499 // Three cases: global variables, lookup variables, and all other types of 1502 // Three cases: global variables, lookup variables, and all other types of
1500 // variables. 1503 // variables.
1501 switch (var->location()) { 1504 switch (var->location()) {
1502 case Variable::UNALLOCATED: { 1505 case VariableLocation::GLOBAL:
1506 case VariableLocation::UNALLOCATED: {
1503 Comment cmnt(masm_, "[ Global variable"); 1507 Comment cmnt(masm_, "[ Global variable");
1504 __ ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand()); 1508 __ ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
1505 __ mov(LoadDescriptor::NameRegister(), Operand(var->name())); 1509 __ mov(LoadDescriptor::NameRegister(), Operand(var->name()));
1506 __ mov(LoadDescriptor::SlotRegister(), 1510 __ mov(LoadDescriptor::SlotRegister(),
1507 Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); 1511 Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
1508 CallGlobalLoadIC(var->name()); 1512 CallGlobalLoadIC(var->name());
1509 context()->Plug(r0); 1513 context()->Plug(r0);
1510 break; 1514 break;
1511 } 1515 }
1512 1516
1513 case Variable::PARAMETER: 1517 case VariableLocation::PARAMETER:
1514 case Variable::LOCAL: 1518 case VariableLocation::LOCAL:
1515 case Variable::CONTEXT: { 1519 case VariableLocation::CONTEXT: {
1516 Comment cmnt(masm_, var->IsContextSlot() ? "[ Context variable" 1520 Comment cmnt(masm_, var->IsContextSlot() ? "[ Context variable"
1517 : "[ Stack variable"); 1521 : "[ Stack variable");
1518 if (var->binding_needs_init()) { 1522 if (var->binding_needs_init()) {
1519 // var->scope() may be NULL when the proxy is located in eval code and 1523 // var->scope() may be NULL when the proxy is located in eval code and
1520 // refers to a potential outside binding. Currently those bindings are 1524 // refers to a potential outside binding. Currently those bindings are
1521 // always looked up dynamically, i.e. in that case 1525 // always looked up dynamically, i.e. in that case
1522 // var->location() == LOOKUP. 1526 // var->location() == LOOKUP.
1523 // always holds. 1527 // always holds.
1524 DCHECK(var->scope() != NULL); 1528 DCHECK(var->scope() != NULL);
1525 1529
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex, eq); 1578 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex, eq);
1575 } 1579 }
1576 context()->Plug(r0); 1580 context()->Plug(r0);
1577 break; 1581 break;
1578 } 1582 }
1579 } 1583 }
1580 context()->Plug(var); 1584 context()->Plug(var);
1581 break; 1585 break;
1582 } 1586 }
1583 1587
1584 case Variable::LOOKUP: { 1588 case VariableLocation::LOOKUP: {
1585 Comment cmnt(masm_, "[ Lookup variable"); 1589 Comment cmnt(masm_, "[ Lookup variable");
1586 Label done, slow; 1590 Label done, slow;
1587 // Generate code for loading from variables potentially shadowed 1591 // Generate code for loading from variables potentially shadowed
1588 // by eval-introduced variables. 1592 // by eval-introduced variables.
1589 EmitDynamicLookupFastCase(proxy, NOT_INSIDE_TYPEOF, &slow, &done); 1593 EmitDynamicLookupFastCase(proxy, NOT_INSIDE_TYPEOF, &slow, &done);
1590 __ bind(&slow); 1594 __ bind(&slow);
1591 __ mov(r1, Operand(var->name())); 1595 __ mov(r1, Operand(var->name()));
1592 __ Push(cp, r1); // Context and name. 1596 __ Push(cp, r1); // Context and name.
1593 __ CallRuntime(Runtime::kLoadLookupSlot, 2); 1597 __ CallRuntime(Runtime::kLoadLookupSlot, 2);
1594 __ bind(&done); 1598 __ bind(&done);
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
2730 __ mov(r3, result_register()); 2734 __ mov(r3, result_register());
2731 int offset = Context::SlotOffset(var->index()); 2735 int offset = Context::SlotOffset(var->index());
2732 __ RecordWriteContextSlot( 2736 __ RecordWriteContextSlot(
2733 r1, offset, r3, r2, kLRHasBeenSaved, kDontSaveFPRegs); 2737 r1, offset, r3, r2, kLRHasBeenSaved, kDontSaveFPRegs);
2734 } 2738 }
2735 } 2739 }
2736 2740
2737 2741
2738 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, 2742 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
2739 FeedbackVectorICSlot slot) { 2743 FeedbackVectorICSlot slot) {
2740 if (var->IsUnallocated()) { 2744 if (var->IsUnallocatedOrGlobalSlot()) {
2741 // Global var, const, or let. 2745 // Global var, const, or let.
2742 __ mov(StoreDescriptor::NameRegister(), Operand(var->name())); 2746 __ mov(StoreDescriptor::NameRegister(), Operand(var->name()));
2743 __ ldr(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand()); 2747 __ ldr(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand());
2744 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); 2748 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot);
2745 CallStoreIC(); 2749 CallStoreIC();
2746 2750
2747 } else if (var->mode() == LET && op != Token::INIT_LET) { 2751 } else if (var->mode() == LET && op != Token::INIT_LET) {
2748 // Non-initializing assignment to let variable needs a write barrier. 2752 // Non-initializing assignment to let variable needs a write barrier.
2749 DCHECK(!var->IsLookupSlot()); 2753 DCHECK(!var->IsLookupSlot());
2750 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); 2754 DCHECK(var->IsStackAllocated() || var->IsContextSlot());
(...skipping 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after
4790 __ mov(r1, Operand(Smi::FromInt(language_mode()))); 4794 __ mov(r1, Operand(Smi::FromInt(language_mode())));
4791 __ push(r1); 4795 __ push(r1);
4792 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); 4796 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION);
4793 context()->Plug(r0); 4797 context()->Plug(r0);
4794 } else if (proxy != NULL) { 4798 } else if (proxy != NULL) {
4795 Variable* var = proxy->var(); 4799 Variable* var = proxy->var();
4796 // Delete of an unqualified identifier is disallowed in strict mode but 4800 // Delete of an unqualified identifier is disallowed in strict mode but
4797 // "delete this" is allowed. 4801 // "delete this" is allowed.
4798 bool is_this = var->HasThisName(isolate()); 4802 bool is_this = var->HasThisName(isolate());
4799 DCHECK(is_sloppy(language_mode()) || is_this); 4803 DCHECK(is_sloppy(language_mode()) || is_this);
4800 if (var->IsUnallocated()) { 4804 if (var->IsUnallocatedOrGlobalSlot()) {
4801 __ ldr(r2, GlobalObjectOperand()); 4805 __ ldr(r2, GlobalObjectOperand());
4802 __ mov(r1, Operand(var->name())); 4806 __ mov(r1, Operand(var->name()));
4803 __ mov(r0, Operand(Smi::FromInt(SLOPPY))); 4807 __ mov(r0, Operand(Smi::FromInt(SLOPPY)));
4804 __ Push(r2, r1, r0); 4808 __ Push(r2, r1, r0);
4805 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); 4809 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION);
4806 context()->Plug(r0); 4810 context()->Plug(r0);
4807 } else if (var->IsStackAllocated() || var->IsContextSlot()) { 4811 } else if (var->IsStackAllocated() || var->IsContextSlot()) {
4808 // Result of deleting non-global, non-dynamic variables is false. 4812 // Result of deleting non-global, non-dynamic variables is false.
4809 // The subexpression does not have side effects. 4813 // The subexpression does not have side effects.
4810 context()->Plug(is_this); 4814 context()->Plug(is_this);
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
5147 break; 5151 break;
5148 } 5152 }
5149 } 5153 }
5150 } 5154 }
5151 5155
5152 5156
5153 void FullCodeGenerator::VisitForTypeofValue(Expression* expr) { 5157 void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
5154 DCHECK(!context()->IsEffect()); 5158 DCHECK(!context()->IsEffect());
5155 DCHECK(!context()->IsTest()); 5159 DCHECK(!context()->IsTest());
5156 VariableProxy* proxy = expr->AsVariableProxy(); 5160 VariableProxy* proxy = expr->AsVariableProxy();
5157 if (proxy != NULL && proxy->var()->IsUnallocated()) { 5161 if (proxy != NULL && proxy->var()->IsUnallocatedOrGlobalSlot()) {
5158 Comment cmnt(masm_, "[ Global variable"); 5162 Comment cmnt(masm_, "[ Global variable");
5159 __ ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand()); 5163 __ ldr(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
5160 __ mov(LoadDescriptor::NameRegister(), Operand(proxy->name())); 5164 __ mov(LoadDescriptor::NameRegister(), Operand(proxy->name()));
5161 __ mov(LoadDescriptor::SlotRegister(), 5165 __ mov(LoadDescriptor::SlotRegister(),
5162 Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); 5166 Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
5163 // Use a regular load, not a contextual load, to avoid a reference 5167 // Use a regular load, not a contextual load, to avoid a reference
5164 // error. 5168 // error.
5165 CallLoadIC(NOT_CONTEXTUAL); 5169 CallLoadIC(NOT_CONTEXTUAL);
5166 PrepareForBailout(expr, TOS_REG); 5170 PrepareForBailout(expr, TOS_REG);
5167 context()->Plug(r0); 5171 context()->Plug(r0);
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
5614 DCHECK(interrupt_address == 5618 DCHECK(interrupt_address ==
5615 isolate->builtins()->OsrAfterStackCheck()->entry()); 5619 isolate->builtins()->OsrAfterStackCheck()->entry());
5616 return OSR_AFTER_STACK_CHECK; 5620 return OSR_AFTER_STACK_CHECK;
5617 } 5621 }
5618 5622
5619 5623
5620 } // namespace internal 5624 } // namespace internal
5621 } // namespace v8 5625 } // namespace v8
5622 5626
5623 #endif // V8_TARGET_ARCH_ARM 5627 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698