| 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 2450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2461 Label success; | 2461 Label success; |
| 2462 // Check that the object is a boolean. | 2462 // Check that the object is a boolean. |
| 2463 __ cmp(object, factory()->true_value()); | 2463 __ cmp(object, factory()->true_value()); |
| 2464 __ j(equal, &success); | 2464 __ j(equal, &success); |
| 2465 __ cmp(object, factory()->false_value()); | 2465 __ cmp(object, factory()->false_value()); |
| 2466 __ j(not_equal, miss); | 2466 __ j(not_equal, miss); |
| 2467 __ bind(&success); | 2467 __ bind(&success); |
| 2468 } | 2468 } |
| 2469 | 2469 |
| 2470 | 2470 |
| 2471 void CallStubCompiler::PatchGlobalProxy(Handle<Object> object) { | 2471 void CallStubCompiler::PatchImplicitReceiver(Handle<Object> object) { |
| 2472 if (object->IsGlobalObject()) { | 2472 if (object->IsGlobalObject()) { |
| 2473 const int argc = arguments().immediate(); | 2473 const int argc = arguments().immediate(); |
| 2474 const int receiver_offset = (argc + 1) * kPointerSize; | 2474 const int receiver_offset = (argc + 1) * kPointerSize; |
| 2475 __ mov(edx, FieldOperand(edx, GlobalObject::kGlobalReceiverOffset)); | 2475 __ mov(Operand(esp, receiver_offset), |
| 2476 __ mov(Operand(esp, receiver_offset), edx); | 2476 isolate()->factory()->undefined_value()); |
| 2477 } | 2477 } |
| 2478 } | 2478 } |
| 2479 | 2479 |
| 2480 | 2480 |
| 2481 Register CallStubCompiler::HandlerFrontendHeader(Handle<Object> object, | 2481 Register CallStubCompiler::HandlerFrontendHeader(Handle<Object> object, |
| 2482 Handle<JSObject> holder, | 2482 Handle<JSObject> holder, |
| 2483 Handle<Name> name, | 2483 Handle<Name> name, |
| 2484 CheckType check, | 2484 CheckType check, |
| 2485 Label* miss) { | 2485 Label* miss) { |
| 2486 GenerateNameCheck(name, miss); | 2486 GenerateNameCheck(name, miss); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2559 } | 2559 } |
| 2560 | 2560 |
| 2561 | 2561 |
| 2562 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, | 2562 void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, |
| 2563 Register function, | 2563 Register function, |
| 2564 Label* miss) { | 2564 Label* miss) { |
| 2565 // Check that the function really is a function. | 2565 // Check that the function really is a function. |
| 2566 GenerateFunctionCheck(function, ebx, miss); | 2566 GenerateFunctionCheck(function, ebx, miss); |
| 2567 | 2567 |
| 2568 if (!function.is(edi)) __ mov(edi, function); | 2568 if (!function.is(edi)) __ mov(edi, function); |
| 2569 PatchGlobalProxy(object); | 2569 PatchImplicitReceiver(object); |
| 2570 | 2570 |
| 2571 // Invoke the function. | 2571 // Invoke the function. |
| 2572 __ InvokeFunction(edi, arguments(), JUMP_FUNCTION, | 2572 __ InvokeFunction(edi, arguments(), JUMP_FUNCTION, |
| 2573 NullCallWrapper(), call_kind()); | 2573 NullCallWrapper(), call_kind()); |
| 2574 } | 2574 } |
| 2575 | 2575 |
| 2576 | 2576 |
| 2577 Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object, | 2577 Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object, |
| 2578 Handle<JSObject> holder, | 2578 Handle<JSObject> holder, |
| 2579 Handle<Name> name) { | 2579 Handle<Name> name) { |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2993 // ----------------------------------- | 2993 // ----------------------------------- |
| 2994 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 2994 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 2995 } | 2995 } |
| 2996 | 2996 |
| 2997 | 2997 |
| 2998 #undef __ | 2998 #undef __ |
| 2999 | 2999 |
| 3000 } } // namespace v8::internal | 3000 } } // namespace v8::internal |
| 3001 | 3001 |
| 3002 #endif // V8_TARGET_ARCH_IA32 | 3002 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |