| OLD | NEW |
| 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 3026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3037 | 3037 |
| 3038 | 3038 |
| 3039 void LCodeGen::DoInstanceSize(LInstanceSize* instr) { | 3039 void LCodeGen::DoInstanceSize(LInstanceSize* instr) { |
| 3040 Register object = ToRegister(instr->object()); | 3040 Register object = ToRegister(instr->object()); |
| 3041 Register result = ToRegister(instr->result()); | 3041 Register result = ToRegister(instr->result()); |
| 3042 __ mov(result, FieldOperand(object, HeapObject::kMapOffset)); | 3042 __ mov(result, FieldOperand(object, HeapObject::kMapOffset)); |
| 3043 __ movzx_b(result, FieldOperand(result, Map::kInstanceSizeOffset)); | 3043 __ movzx_b(result, FieldOperand(result, Map::kInstanceSizeOffset)); |
| 3044 } | 3044 } |
| 3045 | 3045 |
| 3046 | 3046 |
| 3047 void LCodeGen::DoCompareGenericAndBranch(LCompareGenericAndBranch* instr) { | 3047 void LCodeGen::DoCmpT(LCmpT* instr) { |
| 3048 Token::Value op = instr->op(); | 3048 Token::Value op = instr->op(); |
| 3049 | 3049 |
| 3050 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op); | 3050 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op); |
| 3051 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3051 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3052 | 3052 |
| 3053 Condition condition = ComputeCompareCondition(op); | 3053 Condition condition = ComputeCompareCondition(op); |
| 3054 Label true_value, done; |
| 3054 __ test(eax, Operand(eax)); | 3055 __ test(eax, Operand(eax)); |
| 3055 EmitBranch(instr, condition); | 3056 __ j(condition, &true_value, Label::kNear); |
| 3057 __ mov(ToRegister(instr->result()), factory()->false_value()); |
| 3058 __ jmp(&done, Label::kNear); |
| 3059 __ bind(&true_value); |
| 3060 __ mov(ToRegister(instr->result()), factory()->true_value()); |
| 3061 __ bind(&done); |
| 3056 } | 3062 } |
| 3057 | 3063 |
| 3058 | 3064 |
| 3059 void LCodeGen::EmitReturn(LReturn* instr, bool dynamic_frame_alignment) { | 3065 void LCodeGen::EmitReturn(LReturn* instr, bool dynamic_frame_alignment) { |
| 3060 int extra_value_count = dynamic_frame_alignment ? 2 : 1; | 3066 int extra_value_count = dynamic_frame_alignment ? 2 : 1; |
| 3061 | 3067 |
| 3062 if (instr->has_constant_parameter_count()) { | 3068 if (instr->has_constant_parameter_count()) { |
| 3063 int parameter_count = ToInteger32(instr->constant_parameter_count()); | 3069 int parameter_count = ToInteger32(instr->constant_parameter_count()); |
| 3064 if (dynamic_frame_alignment && FLAG_debug_code) { | 3070 if (dynamic_frame_alignment && FLAG_debug_code) { |
| 3065 __ cmp(Operand(esp, | 3071 __ cmp(Operand(esp, |
| (...skipping 3322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6388 FixedArray::kHeaderSize - kPointerSize)); | 6394 FixedArray::kHeaderSize - kPointerSize)); |
| 6389 __ bind(&done); | 6395 __ bind(&done); |
| 6390 } | 6396 } |
| 6391 | 6397 |
| 6392 | 6398 |
| 6393 #undef __ | 6399 #undef __ |
| 6394 | 6400 |
| 6395 } } // namespace v8::internal | 6401 } } // namespace v8::internal |
| 6396 | 6402 |
| 6397 #endif // V8_TARGET_ARCH_IA32 | 6403 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |