| OLD | NEW |
| 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 3029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3040 __ mov(ecx, instr->name()); | 3040 __ mov(ecx, instr->name()); |
| 3041 CallCode(ic, mode, instr); | 3041 CallCode(ic, mode, instr); |
| 3042 } | 3042 } |
| 3043 | 3043 |
| 3044 | 3044 |
| 3045 void LCodeGen::DoCallFunction(LCallFunction* instr) { | 3045 void LCodeGen::DoCallFunction(LCallFunction* instr) { |
| 3046 ASSERT(ToRegister(instr->context()).is(esi)); | 3046 ASSERT(ToRegister(instr->context()).is(esi)); |
| 3047 ASSERT(ToRegister(instr->result()).is(eax)); | 3047 ASSERT(ToRegister(instr->result()).is(eax)); |
| 3048 | 3048 |
| 3049 int arity = instr->arity(); | 3049 int arity = instr->arity(); |
| 3050 CallFunctionStub stub(arity, RECEIVER_MIGHT_BE_IMPLICIT); | 3050 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); |
| 3051 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 3051 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 3052 __ Drop(1); | 3052 __ Drop(1); |
| 3053 } | 3053 } |
| 3054 | 3054 |
| 3055 | 3055 |
| 3056 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { | 3056 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { |
| 3057 ASSERT(ToRegister(instr->context()).is(esi)); | 3057 ASSERT(ToRegister(instr->context()).is(esi)); |
| 3058 ASSERT(ToRegister(instr->result()).is(eax)); | 3058 ASSERT(ToRegister(instr->result()).is(eax)); |
| 3059 | 3059 |
| 3060 int arity = instr->arity(); | 3060 int arity = instr->arity(); |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3918 __ movzx_b(temp, FieldOperand(temp, Map::kInstanceTypeOffset)); | 3918 __ movzx_b(temp, FieldOperand(temp, Map::kInstanceTypeOffset)); |
| 3919 __ and_(temp, mask); | 3919 __ and_(temp, mask); |
| 3920 __ cmpb(Operand(temp), tag); | 3920 __ cmpb(Operand(temp), tag); |
| 3921 DeoptimizeIf(not_equal, instr->environment()); | 3921 DeoptimizeIf(not_equal, instr->environment()); |
| 3922 } | 3922 } |
| 3923 } | 3923 } |
| 3924 } | 3924 } |
| 3925 | 3925 |
| 3926 | 3926 |
| 3927 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { | 3927 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { |
| 3928 ASSERT(instr->InputAt(0)->IsRegister()); | 3928 Handle<JSFunction> target = instr->hydrogen()->target(); |
| 3929 Operand operand = ToOperand(instr->InputAt(0)); | 3929 if (isolate()->heap()->InNewSpace(*target)) { |
| 3930 __ cmp(operand, instr->hydrogen()->target()); | 3930 Register reg = ToRegister(instr->value()); |
| 3931 Handle<JSGlobalPropertyCell> cell = |
| 3932 isolate()->factory()->NewJSGlobalPropertyCell(target); |
| 3933 __ cmp(reg, Operand::Cell(cell)); |
| 3934 } else { |
| 3935 Operand operand = ToOperand(instr->value()); |
| 3936 __ cmp(operand, instr->hydrogen()->target()); |
| 3937 } |
| 3931 DeoptimizeIf(not_equal, instr->environment()); | 3938 DeoptimizeIf(not_equal, instr->environment()); |
| 3932 } | 3939 } |
| 3933 | 3940 |
| 3934 | 3941 |
| 3935 void LCodeGen::DoCheckMap(LCheckMap* instr) { | 3942 void LCodeGen::DoCheckMap(LCheckMap* instr) { |
| 3936 LOperand* input = instr->InputAt(0); | 3943 LOperand* input = instr->InputAt(0); |
| 3937 ASSERT(input->IsRegister()); | 3944 ASSERT(input->IsRegister()); |
| 3938 Register reg = ToRegister(input); | 3945 Register reg = ToRegister(input); |
| 3939 __ cmp(FieldOperand(reg, HeapObject::kMapOffset), | 3946 __ cmp(FieldOperand(reg, HeapObject::kMapOffset), |
| 3940 instr->hydrogen()->map()); | 3947 instr->hydrogen()->map()); |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4423 env->deoptimization_index()); | 4430 env->deoptimization_index()); |
| 4424 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); | 4431 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); |
| 4425 } | 4432 } |
| 4426 | 4433 |
| 4427 | 4434 |
| 4428 #undef __ | 4435 #undef __ |
| 4429 | 4436 |
| 4430 } } // namespace v8::internal | 4437 } } // namespace v8::internal |
| 4431 | 4438 |
| 4432 #endif // V8_TARGET_ARCH_IA32 | 4439 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |