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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.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 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after
2006 void LCodeGen::DoLoadGlobal(LLoadGlobal* instr) { 2006 void LCodeGen::DoLoadGlobal(LLoadGlobal* instr) {
2007 Register result = ToRegister(instr->result()); 2007 Register result = ToRegister(instr->result());
2008 __ mov(result, Operand::Cell(instr->hydrogen()->cell())); 2008 __ mov(result, Operand::Cell(instr->hydrogen()->cell()));
2009 if (instr->hydrogen()->check_hole_value()) { 2009 if (instr->hydrogen()->check_hole_value()) {
2010 __ cmp(result, Factory::the_hole_value()); 2010 __ cmp(result, Factory::the_hole_value());
2011 DeoptimizeIf(equal, instr->environment()); 2011 DeoptimizeIf(equal, instr->environment());
2012 } 2012 }
2013 } 2013 }
2014 2014
2015 2015
2016 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2017 ASSERT(ToRegister(instr->context()).is(esi));
2018 ASSERT(ToRegister(instr->global_object()).is(eax));
2019 ASSERT(ToRegister(instr->result()).is(eax));
2020 __ mov(ecx, instr->hydrogen()->name());
2021 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize));
2022 RelocInfo::Mode mode = instr->hydrogen()->inside_typeof()
2023 ? RelocInfo::CODE_TARGET
2024 : RelocInfo::CODE_TARGET_CONTEXT;
2025 CallCode(ic, mode, instr);
2026 }
2027
2028
2016 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { 2029 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) {
2017 Register value = ToRegister(instr->InputAt(0)); 2030 Register value = ToRegister(instr->InputAt(0));
2018 Operand cell_operand = Operand::Cell(instr->hydrogen()->cell()); 2031 Operand cell_operand = Operand::Cell(instr->hydrogen()->cell());
2019 2032
2020 // If the cell we are storing to contains the hole it could have 2033 // If the cell we are storing to contains the hole it could have
2021 // been deleted from the property dictionary. In that case, we need 2034 // been deleted from the property dictionary. In that case, we need
2022 // to update the property details in the property dictionary to mark 2035 // to update the property details in the property dictionary to mark
2023 // it as no longer deleted. We deoptimize in that case. 2036 // it as no longer deleted. We deoptimize in that case.
2024 if (instr->hydrogen()->check_hole_value()) { 2037 if (instr->hydrogen()->check_hole_value()) {
2025 __ cmp(cell_operand, Factory::the_hole_value()); 2038 __ cmp(cell_operand, Factory::the_hole_value());
(...skipping 1844 matching lines...) Expand 10 before | Expand all | Expand 10 after
3870 ASSERT(osr_pc_offset_ == -1); 3883 ASSERT(osr_pc_offset_ == -1);
3871 osr_pc_offset_ = masm()->pc_offset(); 3884 osr_pc_offset_ = masm()->pc_offset();
3872 } 3885 }
3873 3886
3874 3887
3875 #undef __ 3888 #undef __
3876 3889
3877 } } // namespace v8::internal 3890 } } // namespace v8::internal
3878 3891
3879 #endif // V8_TARGET_ARCH_IA32 3892 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698