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

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

Issue 1040703003: Fix variable decl register collision on ARM. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 | test/mjsunit/regress/regress-455207.js » ('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 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 globals_->Add(variable->binding_needs_init() 857 globals_->Add(variable->binding_needs_init()
858 ? isolate()->factory()->the_hole_value() 858 ? isolate()->factory()->the_hole_value()
859 : isolate()->factory()->undefined_value(), 859 : isolate()->factory()->undefined_value(),
860 zone()); 860 zone());
861 break; 861 break;
862 862
863 case Variable::PARAMETER: 863 case Variable::PARAMETER:
864 case Variable::LOCAL: 864 case Variable::LOCAL:
865 if (hole_init) { 865 if (hole_init) {
866 Comment cmnt(masm_, "[ VariableDeclaration"); 866 Comment cmnt(masm_, "[ VariableDeclaration");
867 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 867 __ LoadRoot(r0, Heap::kTheHoleValueRootIndex);
868 __ str(ip, StackOperand(variable)); 868 __ str(r0, StackOperand(variable));
Dmitry Lomov (no reviews) 2015/03/28 10:41:18 Actually there are more usages of ip below this, s
Jarin 2015/03/30 05:54:50 Well, the test case is not really valid code (it r
869 } 869 }
870 break; 870 break;
871 871
872 case Variable::CONTEXT: 872 case Variable::CONTEXT:
873 if (hole_init) { 873 if (hole_init) {
874 Comment cmnt(masm_, "[ VariableDeclaration"); 874 Comment cmnt(masm_, "[ VariableDeclaration");
875 EmitDebugCheckDeclarationContext(variable); 875 EmitDebugCheckDeclarationContext(variable);
876 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 876 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
877 __ str(ip, ContextOperand(cp, variable->index())); 877 __ str(ip, ContextOperand(cp, variable->index()));
Benedikt Meurer 2015/03/29 09:07:04 As noted by Dmitry, this will also cause trouble i
Jarin 2015/03/30 05:54:50 Done.
878 // No write barrier since the_hole_value is in old space. 878 // No write barrier since the_hole_value is in old space.
879 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); 879 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
880 } 880 }
881 break; 881 break;
882 882
883 case Variable::LOOKUP: { 883 case Variable::LOOKUP: {
884 Comment cmnt(masm_, "[ VariableDeclaration"); 884 Comment cmnt(masm_, "[ VariableDeclaration");
885 __ mov(r2, Operand(variable->name())); 885 __ mov(r2, Operand(variable->name()));
886 // Declaration nodes are always introduced in one of four modes. 886 // Declaration nodes are always introduced in one of four modes.
887 DCHECK(IsDeclaredVariableMode(mode)); 887 DCHECK(IsDeclaredVariableMode(mode));
(...skipping 4603 matching lines...) Expand 10 before | Expand all | Expand 10 after
5491 5491
5492 DCHECK(interrupt_address == 5492 DCHECK(interrupt_address ==
5493 isolate->builtins()->OsrAfterStackCheck()->entry()); 5493 isolate->builtins()->OsrAfterStackCheck()->entry());
5494 return OSR_AFTER_STACK_CHECK; 5494 return OSR_AFTER_STACK_CHECK;
5495 } 5495 }
5496 5496
5497 5497
5498 } } // namespace v8::internal 5498 } } // namespace v8::internal
5499 5499
5500 #endif // V8_TARGET_ARCH_ARM 5500 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-455207.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698