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

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

Issue 6158004: Remove duplicate members from some LIR instruction by using the HIR accessors... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 11 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after
2002 2002
2003 // There are two words between the frame pointer and the last argument. 2003 // There are two words between the frame pointer and the last argument.
2004 // Subtracting from length accounts for one of them add one more. 2004 // Subtracting from length accounts for one of them add one more.
2005 __ mov(result, Operand(arguments, length, times_4, kPointerSize)); 2005 __ mov(result, Operand(arguments, length, times_4, kPointerSize));
2006 } 2006 }
2007 2007
2008 2008
2009 void LCodeGen::DoLoadKeyedFastElement(LLoadKeyedFastElement* instr) { 2009 void LCodeGen::DoLoadKeyedFastElement(LLoadKeyedFastElement* instr) {
2010 Register elements = ToRegister(instr->elements()); 2010 Register elements = ToRegister(instr->elements());
2011 Register key = ToRegister(instr->key()); 2011 Register key = ToRegister(instr->key());
2012 Register result; 2012 Register result = ToRegister(instr->result());
2013 if (instr->load_result() != NULL) { 2013 ASSERT(result.is(elements));
2014 result = ToRegister(instr->load_result());
2015 } else {
2016 result = ToRegister(instr->result());
2017 ASSERT(result.is(elements));
2018 }
2019 2014
2020 // Load the result. 2015 // Load the result.
2021 __ mov(result, FieldOperand(elements, key, times_4, FixedArray::kHeaderSize)); 2016 __ mov(result, FieldOperand(elements, key, times_4, FixedArray::kHeaderSize));
2022 2017
2023 Representation r = instr->hydrogen()->representation(); 2018 // Check for the hole value.
2024 if (r.IsInteger32()) { 2019 __ cmp(result, Factory::the_hole_value());
2025 // Untag and check for smi. 2020 DeoptimizeIf(equal, instr->environment());
2026 __ SmiUntag(result);
2027 DeoptimizeIf(carry, instr->environment());
2028 } else if (r.IsDouble()) {
2029 EmitNumberUntagD(result,
2030 ToDoubleRegister(instr->result()),
2031 instr->environment());
2032 } else {
2033 // Check for the hole value.
2034 ASSERT(r.IsTagged());
2035 __ cmp(result, Factory::the_hole_value());
2036 DeoptimizeIf(equal, instr->environment());
2037 }
2038 } 2021 }
2039 2022
2040 2023
2041 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 2024 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
2042 ASSERT(ToRegister(instr->object()).is(edx)); 2025 ASSERT(ToRegister(instr->object()).is(edx));
2043 ASSERT(ToRegister(instr->key()).is(eax)); 2026 ASSERT(ToRegister(instr->key()).is(eax));
2044 2027
2045 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize)); 2028 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize));
2046 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2029 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2047 } 2030 }
(...skipping 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after
3403 ASSERT(!environment->HasBeenRegistered()); 3386 ASSERT(!environment->HasBeenRegistered());
3404 RegisterEnvironmentForDeoptimization(environment); 3387 RegisterEnvironmentForDeoptimization(environment);
3405 ASSERT(osr_pc_offset_ == -1); 3388 ASSERT(osr_pc_offset_ == -1);
3406 osr_pc_offset_ = masm()->pc_offset(); 3389 osr_pc_offset_ = masm()->pc_offset();
3407 } 3390 }
3408 3391
3409 3392
3410 #undef __ 3393 #undef __
3411 3394
3412 } } // namespace v8::internal 3395 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698