| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 3294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3305 // Set rax to arguments count if adaption is not needed. Assumes that rax | 3305 // Set rax to arguments count if adaption is not needed. Assumes that rax |
| 3306 // is available to write to at this point. | 3306 // is available to write to at this point. |
| 3307 if (dont_adapt_arguments) { | 3307 if (dont_adapt_arguments) { |
| 3308 __ Set(rax, arity); | 3308 __ Set(rax, arity); |
| 3309 } | 3309 } |
| 3310 | 3310 |
| 3311 // Invoke function. | 3311 // Invoke function. |
| 3312 if (function.is_identical_to(info()->closure())) { | 3312 if (function.is_identical_to(info()->closure())) { |
| 3313 __ CallSelf(); | 3313 __ CallSelf(); |
| 3314 } else { | 3314 } else { |
| 3315 __ call(FieldOperand(rdi, JSFunction::kCodeEntryOffset)); | 3315 __ Call(FieldOperand(rdi, JSFunction::kCodeEntryOffset)); |
| 3316 } | 3316 } |
| 3317 | 3317 |
| 3318 // Set up deoptimization. | 3318 // Set up deoptimization. |
| 3319 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT, 0); | 3319 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT, 0); |
| 3320 } else { | 3320 } else { |
| 3321 // We need to adapt arguments. | 3321 // We need to adapt arguments. |
| 3322 SafepointGenerator generator( | 3322 SafepointGenerator generator( |
| 3323 this, pointers, Safepoint::kLazyDeopt); | 3323 this, pointers, Safepoint::kLazyDeopt); |
| 3324 ParameterCount count(arity); | 3324 ParameterCount count(arity); |
| 3325 ParameterCount expected(formal_parameter_count); | 3325 ParameterCount expected(formal_parameter_count); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3370 HConstant* fun_const = HConstant::cast(instr->hydrogen()->function()); | 3370 HConstant* fun_const = HConstant::cast(instr->hydrogen()->function()); |
| 3371 jsfun = Handle<JSFunction>::cast(fun_const->handle(isolate())); | 3371 jsfun = Handle<JSFunction>::cast(fun_const->handle(isolate())); |
| 3372 is_self_call = jsfun.is_identical_to(info()->closure()); | 3372 is_self_call = jsfun.is_identical_to(info()->closure()); |
| 3373 } | 3373 } |
| 3374 | 3374 |
| 3375 if (is_self_call) { | 3375 if (is_self_call) { |
| 3376 __ CallSelf(); | 3376 __ CallSelf(); |
| 3377 } else { | 3377 } else { |
| 3378 Operand target = FieldOperand(rdi, JSFunction::kCodeEntryOffset); | 3378 Operand target = FieldOperand(rdi, JSFunction::kCodeEntryOffset); |
| 3379 generator.BeforeCall(__ CallSize(target)); | 3379 generator.BeforeCall(__ CallSize(target)); |
| 3380 __ call(target); | 3380 __ Call(target); |
| 3381 } | 3381 } |
| 3382 generator.AfterCall(); | 3382 generator.AfterCall(); |
| 3383 } | 3383 } |
| 3384 | 3384 |
| 3385 | 3385 |
| 3386 void LCodeGen::DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr) { | 3386 void LCodeGen::DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr) { |
| 3387 Register input_reg = ToRegister(instr->value()); | 3387 Register input_reg = ToRegister(instr->value()); |
| 3388 __ CompareRoot(FieldOperand(input_reg, HeapObject::kMapOffset), | 3388 __ CompareRoot(FieldOperand(input_reg, HeapObject::kMapOffset), |
| 3389 Heap::kHeapNumberMapRootIndex); | 3389 Heap::kHeapNumberMapRootIndex); |
| 3390 DeoptimizeIf(not_equal, instr->environment()); | 3390 DeoptimizeIf(not_equal, instr->environment()); |
| (...skipping 2154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5545 FixedArray::kHeaderSize - kPointerSize)); | 5545 FixedArray::kHeaderSize - kPointerSize)); |
| 5546 __ bind(&done); | 5546 __ bind(&done); |
| 5547 } | 5547 } |
| 5548 | 5548 |
| 5549 | 5549 |
| 5550 #undef __ | 5550 #undef __ |
| 5551 | 5551 |
| 5552 } } // namespace v8::internal | 5552 } } // namespace v8::internal |
| 5553 | 5553 |
| 5554 #endif // V8_TARGET_ARCH_X64 | 5554 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |