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

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

Issue 6665026: Increase coverage of global loads in optimized code... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' 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/full-codegen-ia32.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 2003 matching lines...) Expand 10 before | Expand all | Expand 10 after
2014 __ push(eax); 2014 __ push(eax);
2015 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 2015 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
2016 __ CallRuntime(Runtime::kTraceExit, 1); 2016 __ CallRuntime(Runtime::kTraceExit, 1);
2017 } 2017 }
2018 __ mov(esp, ebp); 2018 __ mov(esp, ebp);
2019 __ pop(ebp); 2019 __ pop(ebp);
2020 __ Ret((ParameterCount() + 1) * kPointerSize, ecx); 2020 __ Ret((ParameterCount() + 1) * kPointerSize, ecx);
2021 } 2021 }
2022 2022
2023 2023
2024 void LCodeGen::DoLoadGlobal(LLoadGlobal* instr) { 2024 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) {
2025 Register result = ToRegister(instr->result()); 2025 Register result = ToRegister(instr->result());
2026 __ mov(result, Operand::Cell(instr->hydrogen()->cell())); 2026 __ mov(result, Operand::Cell(instr->hydrogen()->cell()));
2027 if (instr->hydrogen()->check_hole_value()) { 2027 if (instr->hydrogen()->check_hole_value()) {
2028 __ cmp(result, Factory::the_hole_value()); 2028 __ cmp(result, Factory::the_hole_value());
2029 DeoptimizeIf(equal, instr->environment()); 2029 DeoptimizeIf(equal, instr->environment());
2030 } 2030 }
2031 } 2031 }
2032 2032
2033 2033
2034 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2035 ASSERT(ToRegister(instr->context()).is(esi));
2036 ASSERT(ToRegister(instr->global_object()).is(eax));
2037 ASSERT(ToRegister(instr->result()).is(eax));
2038
2039 __ mov(ecx, instr->name());
2040 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET :
2041 RelocInfo::CODE_TARGET_CONTEXT;
2042 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize));
2043 CallCode(ic, mode, instr);
2044 }
2045
2046
2034 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { 2047 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) {
2035 Register value = ToRegister(instr->InputAt(0)); 2048 Register value = ToRegister(instr->InputAt(0));
2036 Operand cell_operand = Operand::Cell(instr->hydrogen()->cell()); 2049 Operand cell_operand = Operand::Cell(instr->hydrogen()->cell());
2037 2050
2038 // If the cell we are storing to contains the hole it could have 2051 // If the cell we are storing to contains the hole it could have
2039 // been deleted from the property dictionary. In that case, we need 2052 // been deleted from the property dictionary. In that case, we need
2040 // to update the property details in the property dictionary to mark 2053 // to update the property details in the property dictionary to mark
2041 // it as no longer deleted. We deoptimize in that case. 2054 // it as no longer deleted. We deoptimize in that case.
2042 if (instr->hydrogen()->check_hole_value()) { 2055 if (instr->hydrogen()->check_hole_value()) {
2043 __ cmp(cell_operand, Factory::the_hole_value()); 2056 __ cmp(cell_operand, Factory::the_hole_value());
(...skipping 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after
3944 ASSERT(osr_pc_offset_ == -1); 3957 ASSERT(osr_pc_offset_ == -1);
3945 osr_pc_offset_ = masm()->pc_offset(); 3958 osr_pc_offset_ = masm()->pc_offset();
3946 } 3959 }
3947 3960
3948 3961
3949 #undef __ 3962 #undef __
3950 3963
3951 } } // namespace v8::internal 3964 } } // namespace v8::internal
3952 3965
3953 #endif // V8_TARGET_ARCH_IA32 3966 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698