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

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

Issue 6758007: Increase coverage of global loads in optimized code (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 8 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
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 2014 matching lines...) Expand 10 before | Expand all | Expand 10 after
2025 __ push(eax); 2025 __ push(eax);
2026 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 2026 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
2027 __ CallRuntime(Runtime::kTraceExit, 1); 2027 __ CallRuntime(Runtime::kTraceExit, 1);
2028 } 2028 }
2029 __ mov(esp, ebp); 2029 __ mov(esp, ebp);
2030 __ pop(ebp); 2030 __ pop(ebp);
2031 __ Ret((ParameterCount() + 1) * kPointerSize, ecx); 2031 __ Ret((ParameterCount() + 1) * kPointerSize, ecx);
2032 } 2032 }
2033 2033
2034 2034
2035 void LCodeGen::DoLoadGlobal(LLoadGlobal* instr) { 2035 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) {
2036 Register result = ToRegister(instr->result()); 2036 Register result = ToRegister(instr->result());
2037 __ mov(result, Operand::Cell(instr->hydrogen()->cell())); 2037 __ mov(result, Operand::Cell(instr->hydrogen()->cell()));
2038 if (instr->hydrogen()->check_hole_value()) { 2038 if (instr->hydrogen()->check_hole_value()) {
2039 __ cmp(result, factory()->the_hole_value()); 2039 __ cmp(result, factory()->the_hole_value());
2040 DeoptimizeIf(equal, instr->environment()); 2040 DeoptimizeIf(equal, instr->environment());
2041 } 2041 }
2042 } 2042 }
2043 2043
2044 2044
2045 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2046 ASSERT(ToRegister(instr->context()).is(esi));
2047 ASSERT(ToRegister(instr->global_object()).is(eax));
2048 ASSERT(ToRegister(instr->result()).is(eax));
2049
2050 __ mov(ecx, instr->name());
2051 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET :
2052 RelocInfo::CODE_TARGET_CONTEXT;
2053 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
2054 CallCode(ic, mode, instr);
2055 }
2056
2057
2045 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { 2058 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) {
2046 Register value = ToRegister(instr->InputAt(0)); 2059 Register value = ToRegister(instr->InputAt(0));
2047 Operand cell_operand = Operand::Cell(instr->hydrogen()->cell()); 2060 Operand cell_operand = Operand::Cell(instr->hydrogen()->cell());
2048 2061
2049 // If the cell we are storing to contains the hole it could have 2062 // If the cell we are storing to contains the hole it could have
2050 // been deleted from the property dictionary. In that case, we need 2063 // been deleted from the property dictionary. In that case, we need
2051 // to update the property details in the property dictionary to mark 2064 // to update the property details in the property dictionary to mark
2052 // it as no longer deleted. We deoptimize in that case. 2065 // it as no longer deleted. We deoptimize in that case.
2053 if (instr->hydrogen()->check_hole_value()) { 2066 if (instr->hydrogen()->check_hole_value()) {
2054 __ cmp(cell_operand, factory()->the_hole_value()); 2067 __ cmp(cell_operand, factory()->the_hole_value());
(...skipping 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after
4103 ASSERT(osr_pc_offset_ == -1); 4116 ASSERT(osr_pc_offset_ == -1);
4104 osr_pc_offset_ = masm()->pc_offset(); 4117 osr_pc_offset_ = masm()->pc_offset();
4105 } 4118 }
4106 4119
4107 4120
4108 #undef __ 4121 #undef __
4109 4122
4110 } } // namespace v8::internal 4123 } } // namespace v8::internal
4111 4124
4112 #endif // V8_TARGET_ARCH_IA32 4125 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/ast.cc ('K') | « 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