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

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

Issue 5550003: Add optimized compiler support for generic global loads.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: ported to x64 and arm Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after
2091 __ mov(ip, Operand(Handle<Object>(instr->hydrogen()->cell()))); 2091 __ mov(ip, Operand(Handle<Object>(instr->hydrogen()->cell())));
2092 __ ldr(result, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset)); 2092 __ ldr(result, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset));
2093 if (instr->hydrogen()->check_hole_value()) { 2093 if (instr->hydrogen()->check_hole_value()) {
2094 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 2094 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
2095 __ cmp(result, ip); 2095 __ cmp(result, ip);
2096 DeoptimizeIf(eq, instr->environment()); 2096 DeoptimizeIf(eq, instr->environment());
2097 } 2097 }
2098 } 2098 }
2099 2099
2100 2100
2101 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2102 ASSERT(ToRegister(instr->result()).is(r0));
2103 __ ldr(r0, GlobalObjectOperand());
2104 __ mov(r2, Operand(instr->hydrogen()->name()));
2105 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize));
2106 RelocInfo::Mode mode = instr->hydrogen()->inside_typeof()
2107 ? RelocInfo::CODE_TARGET
2108 : RelocInfo::CODE_TARGET_CONTEXT;
2109 CallCode(ic, mode, instr);
2110 }
2111
2112
2101 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { 2113 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) {
2102 Register value = ToRegister(instr->InputAt(0)); 2114 Register value = ToRegister(instr->InputAt(0));
2103 Register scratch = scratch0(); 2115 Register scratch = scratch0();
2104 2116
2105 // Load the cell. 2117 // Load the cell.
2106 __ mov(scratch, Operand(Handle<Object>(instr->hydrogen()->cell()))); 2118 __ mov(scratch, Operand(Handle<Object>(instr->hydrogen()->cell())));
2107 2119
2108 // If the cell we are storing to contains the hole it could have 2120 // If the cell we are storing to contains the hole it could have
2109 // been deleted from the property dictionary. In that case, we need 2121 // been deleted from the property dictionary. In that case, we need
2110 // to update the property details in the property dictionary to mark 2122 // to update the property details in the property dictionary to mark
(...skipping 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after
3877 ASSERT(!environment->HasBeenRegistered()); 3889 ASSERT(!environment->HasBeenRegistered());
3878 RegisterEnvironmentForDeoptimization(environment); 3890 RegisterEnvironmentForDeoptimization(environment);
3879 ASSERT(osr_pc_offset_ == -1); 3891 ASSERT(osr_pc_offset_ == -1);
3880 osr_pc_offset_ = masm()->pc_offset(); 3892 osr_pc_offset_ = masm()->pc_offset();
3881 } 3893 }
3882 3894
3883 3895
3884 #undef __ 3896 #undef __
3885 3897
3886 } } // namespace v8::internal 3898 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698