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

Side by Side Diff: src/mips/full-codegen-mips.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 | « src/liveedit.cc ('k') | src/mips64/full-codegen-mips64.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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 362
363 } else { 363 } else {
364 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS); 364 PrepareForBailoutForId(BailoutId::FunctionEntry(), NO_REGISTERS);
365 { Comment cmnt(masm_, "[ Declarations"); 365 { Comment cmnt(masm_, "[ Declarations");
366 // For named function expressions, declare the function name as a 366 // For named function expressions, declare the function name as a
367 // constant. 367 // constant.
368 if (scope()->is_function_scope() && scope()->function() != NULL) { 368 if (scope()->is_function_scope() && scope()->function() != NULL) {
369 VariableDeclaration* function = scope()->function(); 369 VariableDeclaration* function = scope()->function();
370 DCHECK(function->proxy()->var()->mode() == CONST || 370 DCHECK(function->proxy()->var()->mode() == CONST ||
371 function->proxy()->var()->mode() == CONST_LEGACY); 371 function->proxy()->var()->mode() == CONST_LEGACY);
372 DCHECK(function->proxy()->var()->location() != Variable::UNALLOCATED); 372 DCHECK(!function->proxy()->var()->IsUnallocatedOrGlobalSlot());
373 VisitVariableDeclaration(function); 373 VisitVariableDeclaration(function);
374 } 374 }
375 VisitDeclarations(scope()->declarations()); 375 VisitDeclarations(scope()->declarations());
376 } 376 }
377 377
378 { Comment cmnt(masm_, "[ Stack check"); 378 { Comment cmnt(masm_, "[ Stack check");
379 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS); 379 PrepareForBailoutForId(BailoutId::Declarations(), NO_REGISTERS);
380 Label ok; 380 Label ok;
381 __ LoadRoot(at, Heap::kStackLimitRootIndex); 381 __ LoadRoot(at, Heap::kStackLimitRootIndex);
382 __ Branch(&ok, hs, sp, Operand(at)); 382 __ Branch(&ok, hs, sp, Operand(at));
(...skipping 485 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(t0, Heap::kTheHoleValueRootIndex); 891 __ LoadRoot(t0, Heap::kTheHoleValueRootIndex);
891 __ sw(t0, StackOperand(variable)); 892 __ sw(t0, 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(at, Heap::kTheHoleValueRootIndex); 900 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
900 __ sw(at, ContextOperand(cp, variable->index())); 901 __ sw(at, 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 __ li(a2, Operand(variable->name())); 909 __ li(a2, 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 __ li(a1, Operand(Smi::FromInt(attr))); 914 __ li(a1, 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 11 matching lines...) Expand all
928 } 929 }
929 } 930 }
930 } 931 }
931 932
932 933
933 void FullCodeGenerator::VisitFunctionDeclaration( 934 void FullCodeGenerator::VisitFunctionDeclaration(
934 FunctionDeclaration* declaration) { 935 FunctionDeclaration* declaration) {
935 VariableProxy* proxy = declaration->proxy(); 936 VariableProxy* proxy = declaration->proxy();
936 Variable* variable = proxy->var(); 937 Variable* variable = proxy->var();
937 switch (variable->location()) { 938 switch (variable->location()) {
938 case Variable::UNALLOCATED: { 939 case VariableLocation::GLOBAL:
940 case VariableLocation::UNALLOCATED: {
939 globals_->Add(variable->name(), zone()); 941 globals_->Add(variable->name(), zone());
940 Handle<SharedFunctionInfo> function = 942 Handle<SharedFunctionInfo> function =
941 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); 943 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_);
942 // Check for stack-overflow exception. 944 // Check for stack-overflow exception.
943 if (function.is_null()) return SetStackOverflow(); 945 if (function.is_null()) return SetStackOverflow();
944 globals_->Add(function, zone()); 946 globals_->Add(function, zone());
945 break; 947 break;
946 } 948 }
947 949
948 case Variable::PARAMETER: 950 case VariableLocation::PARAMETER:
949 case Variable::LOCAL: { 951 case VariableLocation::LOCAL: {
950 Comment cmnt(masm_, "[ FunctionDeclaration"); 952 Comment cmnt(masm_, "[ FunctionDeclaration");
951 VisitForAccumulatorValue(declaration->fun()); 953 VisitForAccumulatorValue(declaration->fun());
952 __ sw(result_register(), StackOperand(variable)); 954 __ sw(result_register(), StackOperand(variable));
953 break; 955 break;
954 } 956 }
955 957
956 case Variable::CONTEXT: { 958 case VariableLocation::CONTEXT: {
957 Comment cmnt(masm_, "[ FunctionDeclaration"); 959 Comment cmnt(masm_, "[ FunctionDeclaration");
958 EmitDebugCheckDeclarationContext(variable); 960 EmitDebugCheckDeclarationContext(variable);
959 VisitForAccumulatorValue(declaration->fun()); 961 VisitForAccumulatorValue(declaration->fun());
960 __ sw(result_register(), ContextOperand(cp, variable->index())); 962 __ sw(result_register(), ContextOperand(cp, variable->index()));
961 int offset = Context::SlotOffset(variable->index()); 963 int offset = Context::SlotOffset(variable->index());
962 // We know that we have written a function, which is not a smi. 964 // We know that we have written a function, which is not a smi.
963 __ RecordWriteContextSlot(cp, 965 __ RecordWriteContextSlot(cp,
964 offset, 966 offset,
965 result_register(), 967 result_register(),
966 a2, 968 a2,
967 kRAHasBeenSaved, 969 kRAHasBeenSaved,
968 kDontSaveFPRegs, 970 kDontSaveFPRegs,
969 EMIT_REMEMBERED_SET, 971 EMIT_REMEMBERED_SET,
970 OMIT_SMI_CHECK); 972 OMIT_SMI_CHECK);
971 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); 973 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
972 break; 974 break;
973 } 975 }
974 976
975 case Variable::LOOKUP: { 977 case VariableLocation::LOOKUP: {
976 Comment cmnt(masm_, "[ FunctionDeclaration"); 978 Comment cmnt(masm_, "[ FunctionDeclaration");
977 __ li(a2, Operand(variable->name())); 979 __ li(a2, Operand(variable->name()));
978 __ li(a1, Operand(Smi::FromInt(NONE))); 980 __ li(a1, Operand(Smi::FromInt(NONE)));
979 __ Push(cp, a2, a1); 981 __ Push(cp, a2, a1);
980 // Push initial value for function declaration. 982 // Push initial value for function declaration.
981 VisitForStackValue(declaration->fun()); 983 VisitForStackValue(declaration->fun());
982 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); 984 __ CallRuntime(Runtime::kDeclareLookupSlot, 4);
983 break; 985 break;
984 } 986 }
985 } 987 }
986 } 988 }
987 989
988 990
989 void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* declaration) { 991 void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* declaration) {
990 VariableProxy* proxy = declaration->proxy(); 992 VariableProxy* proxy = declaration->proxy();
991 Variable* variable = proxy->var(); 993 Variable* variable = proxy->var();
992 switch (variable->location()) { 994 switch (variable->location()) {
993 case Variable::UNALLOCATED: 995 case VariableLocation::GLOBAL:
996 case VariableLocation::UNALLOCATED:
994 // TODO(rossberg) 997 // TODO(rossberg)
995 break; 998 break;
996 999
997 case Variable::CONTEXT: { 1000 case VariableLocation::CONTEXT: {
998 Comment cmnt(masm_, "[ ImportDeclaration"); 1001 Comment cmnt(masm_, "[ ImportDeclaration");
999 EmitDebugCheckDeclarationContext(variable); 1002 EmitDebugCheckDeclarationContext(variable);
1000 // TODO(rossberg) 1003 // TODO(rossberg)
1001 break; 1004 break;
1002 } 1005 }
1003 1006
1004 case Variable::PARAMETER: 1007 case VariableLocation::PARAMETER:
1005 case Variable::LOCAL: 1008 case VariableLocation::LOCAL:
1006 case Variable::LOOKUP: 1009 case VariableLocation::LOOKUP:
1007 UNREACHABLE(); 1010 UNREACHABLE();
1008 } 1011 }
1009 } 1012 }
1010 1013
1011 1014
1012 void FullCodeGenerator::VisitExportDeclaration(ExportDeclaration* declaration) { 1015 void FullCodeGenerator::VisitExportDeclaration(ExportDeclaration* declaration) {
1013 // TODO(rossberg) 1016 // TODO(rossberg)
1014 } 1017 }
1015 1018
1016 1019
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 1487
1485 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) { 1488 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
1486 // Record position before possible IC call. 1489 // Record position before possible IC call.
1487 SetExpressionPosition(proxy); 1490 SetExpressionPosition(proxy);
1488 PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS); 1491 PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS);
1489 Variable* var = proxy->var(); 1492 Variable* var = proxy->var();
1490 1493
1491 // Three cases: global variables, lookup variables, and all other types of 1494 // Three cases: global variables, lookup variables, and all other types of
1492 // variables. 1495 // variables.
1493 switch (var->location()) { 1496 switch (var->location()) {
1494 case Variable::UNALLOCATED: { 1497 case VariableLocation::GLOBAL:
1498 case VariableLocation::UNALLOCATED: {
1495 Comment cmnt(masm_, "[ Global variable"); 1499 Comment cmnt(masm_, "[ Global variable");
1496 __ lw(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand()); 1500 __ lw(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
1497 __ li(LoadDescriptor::NameRegister(), Operand(var->name())); 1501 __ li(LoadDescriptor::NameRegister(), Operand(var->name()));
1498 __ li(LoadDescriptor::SlotRegister(), 1502 __ li(LoadDescriptor::SlotRegister(),
1499 Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); 1503 Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
1500 CallGlobalLoadIC(var->name()); 1504 CallGlobalLoadIC(var->name());
1501 context()->Plug(v0); 1505 context()->Plug(v0);
1502 break; 1506 break;
1503 } 1507 }
1504 1508
1505 case Variable::PARAMETER: 1509 case VariableLocation::PARAMETER:
1506 case Variable::LOCAL: 1510 case VariableLocation::LOCAL:
1507 case Variable::CONTEXT: { 1511 case VariableLocation::CONTEXT: {
1508 Comment cmnt(masm_, var->IsContextSlot() ? "[ Context variable" 1512 Comment cmnt(masm_, var->IsContextSlot() ? "[ Context variable"
1509 : "[ Stack variable"); 1513 : "[ Stack variable");
1510 if (var->binding_needs_init()) { 1514 if (var->binding_needs_init()) {
1511 // var->scope() may be NULL when the proxy is located in eval code and 1515 // var->scope() may be NULL when the proxy is located in eval code and
1512 // refers to a potential outside binding. Currently those bindings are 1516 // refers to a potential outside binding. Currently those bindings are
1513 // always looked up dynamically, i.e. in that case 1517 // always looked up dynamically, i.e. in that case
1514 // var->location() == LOOKUP. 1518 // var->location() == LOOKUP.
1515 // always holds. 1519 // always holds.
1516 DCHECK(var->scope() != NULL); 1520 DCHECK(var->scope() != NULL);
1517 1521
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 __ Movz(v0, a0, at); // Conditional move: Undefined if TheHole. 1572 __ Movz(v0, a0, at); // Conditional move: Undefined if TheHole.
1569 } 1573 }
1570 context()->Plug(v0); 1574 context()->Plug(v0);
1571 break; 1575 break;
1572 } 1576 }
1573 } 1577 }
1574 context()->Plug(var); 1578 context()->Plug(var);
1575 break; 1579 break;
1576 } 1580 }
1577 1581
1578 case Variable::LOOKUP: { 1582 case VariableLocation::LOOKUP: {
1579 Comment cmnt(masm_, "[ Lookup variable"); 1583 Comment cmnt(masm_, "[ Lookup variable");
1580 Label done, slow; 1584 Label done, slow;
1581 // Generate code for loading from variables potentially shadowed 1585 // Generate code for loading from variables potentially shadowed
1582 // by eval-introduced variables. 1586 // by eval-introduced variables.
1583 EmitDynamicLookupFastCase(proxy, NOT_INSIDE_TYPEOF, &slow, &done); 1587 EmitDynamicLookupFastCase(proxy, NOT_INSIDE_TYPEOF, &slow, &done);
1584 __ bind(&slow); 1588 __ bind(&slow);
1585 __ li(a1, Operand(var->name())); 1589 __ li(a1, Operand(var->name()));
1586 __ Push(cp, a1); // Context and name. 1590 __ Push(cp, a1); // Context and name.
1587 __ CallRuntime(Runtime::kLoadLookupSlot, 2); 1591 __ CallRuntime(Runtime::kLoadLookupSlot, 2);
1588 __ bind(&done); 1592 __ bind(&done);
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
2717 __ Move(a3, result_register()); 2721 __ Move(a3, result_register());
2718 int offset = Context::SlotOffset(var->index()); 2722 int offset = Context::SlotOffset(var->index());
2719 __ RecordWriteContextSlot( 2723 __ RecordWriteContextSlot(
2720 a1, offset, a3, a2, kRAHasBeenSaved, kDontSaveFPRegs); 2724 a1, offset, a3, a2, kRAHasBeenSaved, kDontSaveFPRegs);
2721 } 2725 }
2722 } 2726 }
2723 2727
2724 2728
2725 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, 2729 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
2726 FeedbackVectorICSlot slot) { 2730 FeedbackVectorICSlot slot) {
2727 if (var->IsUnallocated()) { 2731 if (var->IsUnallocatedOrGlobalSlot()) {
2728 // Global var, const, or let. 2732 // Global var, const, or let.
2729 __ mov(StoreDescriptor::ValueRegister(), result_register()); 2733 __ mov(StoreDescriptor::ValueRegister(), result_register());
2730 __ li(StoreDescriptor::NameRegister(), Operand(var->name())); 2734 __ li(StoreDescriptor::NameRegister(), Operand(var->name()));
2731 __ lw(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand()); 2735 __ lw(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand());
2732 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); 2736 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot);
2733 CallStoreIC(); 2737 CallStoreIC();
2734 2738
2735 } else if (var->mode() == LET && op != Token::INIT_LET) { 2739 } else if (var->mode() == LET && op != Token::INIT_LET) {
2736 // Non-initializing assignment to let variable needs a write barrier. 2740 // Non-initializing assignment to let variable needs a write barrier.
2737 DCHECK(!var->IsLookupSlot()); 2741 DCHECK(!var->IsLookupSlot());
(...skipping 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after
4809 __ li(a1, Operand(Smi::FromInt(language_mode()))); 4813 __ li(a1, Operand(Smi::FromInt(language_mode())));
4810 __ push(a1); 4814 __ push(a1);
4811 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); 4815 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION);
4812 context()->Plug(v0); 4816 context()->Plug(v0);
4813 } else if (proxy != NULL) { 4817 } else if (proxy != NULL) {
4814 Variable* var = proxy->var(); 4818 Variable* var = proxy->var();
4815 // Delete of an unqualified identifier is disallowed in strict mode but 4819 // Delete of an unqualified identifier is disallowed in strict mode but
4816 // "delete this" is allowed. 4820 // "delete this" is allowed.
4817 bool is_this = var->HasThisName(isolate()); 4821 bool is_this = var->HasThisName(isolate());
4818 DCHECK(is_sloppy(language_mode()) || is_this); 4822 DCHECK(is_sloppy(language_mode()) || is_this);
4819 if (var->IsUnallocated()) { 4823 if (var->IsUnallocatedOrGlobalSlot()) {
4820 __ lw(a2, GlobalObjectOperand()); 4824 __ lw(a2, GlobalObjectOperand());
4821 __ li(a1, Operand(var->name())); 4825 __ li(a1, Operand(var->name()));
4822 __ li(a0, Operand(Smi::FromInt(SLOPPY))); 4826 __ li(a0, Operand(Smi::FromInt(SLOPPY)));
4823 __ Push(a2, a1, a0); 4827 __ Push(a2, a1, a0);
4824 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); 4828 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION);
4825 context()->Plug(v0); 4829 context()->Plug(v0);
4826 } else if (var->IsStackAllocated() || var->IsContextSlot()) { 4830 } else if (var->IsStackAllocated() || var->IsContextSlot()) {
4827 // Result of deleting non-global, non-dynamic variables is false. 4831 // Result of deleting non-global, non-dynamic variables is false.
4828 // The subexpression does not have side effects. 4832 // The subexpression does not have side effects.
4829 context()->Plug(is_this); 4833 context()->Plug(is_this);
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
5170 break; 5174 break;
5171 } 5175 }
5172 } 5176 }
5173 } 5177 }
5174 5178
5175 5179
5176 void FullCodeGenerator::VisitForTypeofValue(Expression* expr) { 5180 void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
5177 DCHECK(!context()->IsEffect()); 5181 DCHECK(!context()->IsEffect());
5178 DCHECK(!context()->IsTest()); 5182 DCHECK(!context()->IsTest());
5179 VariableProxy* proxy = expr->AsVariableProxy(); 5183 VariableProxy* proxy = expr->AsVariableProxy();
5180 if (proxy != NULL && proxy->var()->IsUnallocated()) { 5184 if (proxy != NULL && proxy->var()->IsUnallocatedOrGlobalSlot()) {
5181 Comment cmnt(masm_, "[ Global variable"); 5185 Comment cmnt(masm_, "[ Global variable");
5182 __ lw(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand()); 5186 __ lw(LoadDescriptor::ReceiverRegister(), GlobalObjectOperand());
5183 __ li(LoadDescriptor::NameRegister(), Operand(proxy->name())); 5187 __ li(LoadDescriptor::NameRegister(), Operand(proxy->name()));
5184 __ li(LoadDescriptor::SlotRegister(), 5188 __ li(LoadDescriptor::SlotRegister(),
5185 Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); 5189 Operand(SmiFromSlot(proxy->VariableFeedbackSlot())));
5186 // Use a regular load, not a contextual load, to avoid a reference 5190 // Use a regular load, not a contextual load, to avoid a reference
5187 // error. 5191 // error.
5188 CallLoadIC(NOT_CONTEXTUAL); 5192 CallLoadIC(NOT_CONTEXTUAL);
5189 PrepareForBailout(expr, TOS_REG); 5193 PrepareForBailout(expr, TOS_REG);
5190 context()->Plug(v0); 5194 context()->Plug(v0);
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
5572 reinterpret_cast<uint32_t>( 5576 reinterpret_cast<uint32_t>(
5573 isolate->builtins()->OsrAfterStackCheck()->entry())); 5577 isolate->builtins()->OsrAfterStackCheck()->entry()));
5574 return OSR_AFTER_STACK_CHECK; 5578 return OSR_AFTER_STACK_CHECK;
5575 } 5579 }
5576 5580
5577 5581
5578 } // namespace internal 5582 } // namespace internal
5579 } // namespace v8 5583 } // namespace v8
5580 5584
5581 #endif // V8_TARGET_ARCH_MIPS 5585 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/liveedit.cc ('k') | src/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698