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

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

Issue 25666006: Get rid of the HInstanceSize instruction. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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.h ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2978 matching lines...) Expand 10 before | Expand all | Expand 10 after
2989 // Get the deoptimization index of the LLazyBailout-environment that 2989 // Get the deoptimization index of the LLazyBailout-environment that
2990 // corresponds to this instruction. 2990 // corresponds to this instruction.
2991 LEnvironment* env = instr->GetDeferredLazyDeoptimizationEnvironment(); 2991 LEnvironment* env = instr->GetDeferredLazyDeoptimizationEnvironment();
2992 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 2992 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
2993 2993
2994 // Put the result value into the eax slot and restore all registers. 2994 // Put the result value into the eax slot and restore all registers.
2995 __ StoreToSafepointRegisterSlot(eax, eax); 2995 __ StoreToSafepointRegisterSlot(eax, eax);
2996 } 2996 }
2997 2997
2998 2998
2999 void LCodeGen::DoInstanceSize(LInstanceSize* instr) {
3000 Register object = ToRegister(instr->object());
3001 Register result = ToRegister(instr->result());
3002 __ mov(result, FieldOperand(object, HeapObject::kMapOffset));
3003 __ movzx_b(result, FieldOperand(result, Map::kInstanceSizeOffset));
3004 }
3005
3006
3007 void LCodeGen::DoCmpT(LCmpT* instr) { 2999 void LCodeGen::DoCmpT(LCmpT* instr) {
3008 Token::Value op = instr->op(); 3000 Token::Value op = instr->op();
3009 3001
3010 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op); 3002 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op);
3011 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3003 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3012 3004
3013 Condition condition = ComputeCompareCondition(op); 3005 Condition condition = ComputeCompareCondition(op);
3014 Label true_value, done; 3006 Label true_value, done;
3015 __ test(eax, Operand(eax)); 3007 __ test(eax, Operand(eax));
3016 __ j(condition, &true_value, Label::kNear); 3008 __ j(condition, &true_value, Label::kNear);
(...skipping 3363 matching lines...) Expand 10 before | Expand all | Expand 10 after
6380 FixedArray::kHeaderSize - kPointerSize)); 6372 FixedArray::kHeaderSize - kPointerSize));
6381 __ bind(&done); 6373 __ bind(&done);
6382 } 6374 }
6383 6375
6384 6376
6385 #undef __ 6377 #undef __
6386 6378
6387 } } // namespace v8::internal 6379 } } // namespace v8::internal
6388 6380
6389 #endif // V8_TARGET_ARCH_IA32 6381 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698