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

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

Issue 24072016: Use Unique<Cell> and Unique<PropertyCell> in LoadGlobalCell and StoreGlobalCell. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/hydrogen-instructions.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2936 matching lines...) Expand 10 before | Expand all | Expand 10 after
2947 __ Jump(lr); 2947 __ Jump(lr);
2948 2948
2949 if (no_frame_start != -1) { 2949 if (no_frame_start != -1) {
2950 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset()); 2950 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset());
2951 } 2951 }
2952 } 2952 }
2953 2953
2954 2954
2955 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { 2955 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) {
2956 Register result = ToRegister(instr->result()); 2956 Register result = ToRegister(instr->result());
2957 __ mov(ip, Operand(Handle<Object>(instr->hydrogen()->cell()))); 2957 __ mov(ip, Operand(Handle<Object>(instr->hydrogen()->cell().handle())));
2958 __ ldr(result, FieldMemOperand(ip, Cell::kValueOffset)); 2958 __ ldr(result, FieldMemOperand(ip, Cell::kValueOffset));
2959 if (instr->hydrogen()->RequiresHoleCheck()) { 2959 if (instr->hydrogen()->RequiresHoleCheck()) {
2960 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 2960 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
2961 __ cmp(result, ip); 2961 __ cmp(result, ip);
2962 DeoptimizeIf(eq, instr->environment()); 2962 DeoptimizeIf(eq, instr->environment());
2963 } 2963 }
2964 } 2964 }
2965 2965
2966 2966
2967 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2967 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2968 ASSERT(ToRegister(instr->global_object()).is(r0)); 2968 ASSERT(ToRegister(instr->global_object()).is(r0));
2969 ASSERT(ToRegister(instr->result()).is(r0)); 2969 ASSERT(ToRegister(instr->result()).is(r0));
2970 2970
2971 __ mov(r2, Operand(instr->name())); 2971 __ mov(r2, Operand(instr->name()));
2972 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET 2972 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET
2973 : RelocInfo::CODE_TARGET_CONTEXT; 2973 : RelocInfo::CODE_TARGET_CONTEXT;
2974 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); 2974 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
2975 CallCode(ic, mode, instr); 2975 CallCode(ic, mode, instr);
2976 } 2976 }
2977 2977
2978 2978
2979 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { 2979 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
2980 Register value = ToRegister(instr->value()); 2980 Register value = ToRegister(instr->value());
2981 Register cell = scratch0(); 2981 Register cell = scratch0();
2982 2982
2983 // Load the cell. 2983 // Load the cell.
2984 __ mov(cell, Operand(instr->hydrogen()->cell())); 2984 __ mov(cell, Operand(instr->hydrogen()->cell().handle()));
2985 2985
2986 // If the cell we are storing to contains the hole it could have 2986 // If the cell we are storing to contains the hole it could have
2987 // been deleted from the property dictionary. In that case, we need 2987 // been deleted from the property dictionary. In that case, we need
2988 // to update the property details in the property dictionary to mark 2988 // to update the property details in the property dictionary to mark
2989 // it as no longer deleted. 2989 // it as no longer deleted.
2990 if (instr->hydrogen()->RequiresHoleCheck()) { 2990 if (instr->hydrogen()->RequiresHoleCheck()) {
2991 // We use a temp to check the payload (CompareRoot might clobber ip). 2991 // We use a temp to check the payload (CompareRoot might clobber ip).
2992 Register payload = ToRegister(instr->temp()); 2992 Register payload = ToRegister(instr->temp());
2993 __ ldr(payload, FieldMemOperand(cell, Cell::kValueOffset)); 2993 __ ldr(payload, FieldMemOperand(cell, Cell::kValueOffset));
2994 __ CompareRoot(payload, Heap::kTheHoleValueRootIndex); 2994 __ CompareRoot(payload, Heap::kTheHoleValueRootIndex);
(...skipping 2792 matching lines...) Expand 10 before | Expand all | Expand 10 after
5787 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5787 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5788 __ ldr(result, FieldMemOperand(scratch, 5788 __ ldr(result, FieldMemOperand(scratch,
5789 FixedArray::kHeaderSize - kPointerSize)); 5789 FixedArray::kHeaderSize - kPointerSize));
5790 __ bind(&done); 5790 __ bind(&done);
5791 } 5791 }
5792 5792
5793 5793
5794 #undef __ 5794 #undef __
5795 5795
5796 } } // namespace v8::internal 5796 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698