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

Side by Side Diff: src/x64/lithium-codegen-x64.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/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.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 1963 matching lines...) Expand 10 before | Expand all | Expand 10 after
1974 __ movq(result, instr->hydrogen()->cell(), RelocInfo::GLOBAL_PROPERTY_CELL); 1974 __ movq(result, instr->hydrogen()->cell(), RelocInfo::GLOBAL_PROPERTY_CELL);
1975 __ movq(result, Operand(result, 0)); 1975 __ movq(result, Operand(result, 0));
1976 } 1976 }
1977 if (instr->hydrogen()->check_hole_value()) { 1977 if (instr->hydrogen()->check_hole_value()) {
1978 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 1978 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
1979 DeoptimizeIf(equal, instr->environment()); 1979 DeoptimizeIf(equal, instr->environment());
1980 } 1980 }
1981 } 1981 }
1982 1982
1983 1983
1984 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
1985 ASSERT(ToRegister(instr->result()).is(rax));
1986 __ movq(rax, GlobalObjectOperand());
1987 __ Move(rcx, instr->hydrogen()->name());
1988 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize));
1989 RelocInfo::Mode mode = instr->hydrogen()->inside_typeof()
1990 ? RelocInfo::CODE_TARGET
1991 : RelocInfo::CODE_TARGET_CONTEXT;
1992 CallCode(ic, mode, instr);
1993 }
1994
1995
1984 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { 1996 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) {
1985 Register value = ToRegister(instr->InputAt(0)); 1997 Register value = ToRegister(instr->InputAt(0));
1986 Register temp = ToRegister(instr->TempAt(0)); 1998 Register temp = ToRegister(instr->TempAt(0));
1987 ASSERT(!value.is(temp)); 1999 ASSERT(!value.is(temp));
1988 bool check_hole = instr->hydrogen()->check_hole_value(); 2000 bool check_hole = instr->hydrogen()->check_hole_value();
1989 if (!check_hole && value.is(rax)) { 2001 if (!check_hole && value.is(rax)) {
1990 __ store_rax(instr->hydrogen()->cell().location(), 2002 __ store_rax(instr->hydrogen()->cell().location(),
1991 RelocInfo::GLOBAL_PROPERTY_CELL); 2003 RelocInfo::GLOBAL_PROPERTY_CELL);
1992 return; 2004 return;
1993 } 2005 }
(...skipping 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after
3691 RegisterEnvironmentForDeoptimization(environment); 3703 RegisterEnvironmentForDeoptimization(environment);
3692 ASSERT(osr_pc_offset_ == -1); 3704 ASSERT(osr_pc_offset_ == -1);
3693 osr_pc_offset_ = masm()->pc_offset(); 3705 osr_pc_offset_ = masm()->pc_offset();
3694 } 3706 }
3695 3707
3696 #undef __ 3708 #undef __
3697 3709
3698 } } // namespace v8::internal 3710 } } // namespace v8::internal
3699 3711
3700 #endif // V8_TARGET_ARCH_X64 3712 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698