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

Side by Side Diff: src/ia32/builtins-ia32.cc

Issue 6614010: [Isolates] Merge 6700:7030 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 9 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/ia32/assembler-ia32.cc ('k') | src/ia32/code-stubs-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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); 583 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx);
584 __ j(not_equal, &non_function, not_taken); 584 __ j(not_equal, &non_function, not_taken);
585 585
586 586
587 // 3a. Patch the first argument if necessary when calling a function. 587 // 3a. Patch the first argument if necessary when calling a function.
588 Label shift_arguments; 588 Label shift_arguments;
589 { Label convert_to_object, use_global_receiver, patch_receiver; 589 { Label convert_to_object, use_global_receiver, patch_receiver;
590 // Change context eagerly in case we need the global receiver. 590 // Change context eagerly in case we need the global receiver.
591 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); 591 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
592 592
593 // Do not transform the receiver for strict mode functions.
594 __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
595 __ test_b(FieldOperand(ebx, SharedFunctionInfo::kStrictModeByteOffset),
596 1 << SharedFunctionInfo::kStrictModeBitWithinByte);
597 __ j(not_equal, &shift_arguments);
598
599 // Compute the receiver in non-strict mode.
593 __ mov(ebx, Operand(esp, eax, times_4, 0)); // First argument. 600 __ mov(ebx, Operand(esp, eax, times_4, 0)); // First argument.
594 __ test(ebx, Immediate(kSmiTagMask)); 601 __ test(ebx, Immediate(kSmiTagMask));
595 __ j(zero, &convert_to_object); 602 __ j(zero, &convert_to_object);
596 603
597 __ cmp(ebx, FACTORY->null_value()); 604 __ cmp(ebx, FACTORY->null_value());
598 __ j(equal, &use_global_receiver); 605 __ j(equal, &use_global_receiver);
599 __ cmp(ebx, FACTORY->undefined_value()); 606 __ cmp(ebx, FACTORY->undefined_value());
600 __ j(equal, &use_global_receiver); 607 __ j(equal, &use_global_receiver);
601 608
602 // We don't use IsObjectJSObjectType here because we jump on success. 609 // We don't use IsObjectJSObjectType here because we jump on success.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 __ push(Immediate(0)); // index 738 __ push(Immediate(0)); // index
732 739
733 // Change context eagerly to get the right global object if 740 // Change context eagerly to get the right global object if
734 // necessary. 741 // necessary.
735 __ mov(edi, Operand(ebp, 4 * kPointerSize)); 742 __ mov(edi, Operand(ebp, 4 * kPointerSize));
736 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); 743 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
737 744
738 // Compute the receiver. 745 // Compute the receiver.
739 Label call_to_object, use_global_receiver, push_receiver; 746 Label call_to_object, use_global_receiver, push_receiver;
740 __ mov(ebx, Operand(ebp, 3 * kPointerSize)); 747 __ mov(ebx, Operand(ebp, 3 * kPointerSize));
748
749 // Do not transform the receiver for strict mode functions.
750 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
751 __ test_b(FieldOperand(ecx, SharedFunctionInfo::kStrictModeByteOffset),
752 1 << SharedFunctionInfo::kStrictModeBitWithinByte);
753 __ j(not_equal, &push_receiver);
754
755 // Compute the receiver in non-strict mode.
741 __ test(ebx, Immediate(kSmiTagMask)); 756 __ test(ebx, Immediate(kSmiTagMask));
742 __ j(zero, &call_to_object); 757 __ j(zero, &call_to_object);
743 __ cmp(ebx, FACTORY->null_value()); 758 __ cmp(ebx, FACTORY->null_value());
744 __ j(equal, &use_global_receiver); 759 __ j(equal, &use_global_receiver);
745 __ cmp(ebx, FACTORY->undefined_value()); 760 __ cmp(ebx, FACTORY->undefined_value());
746 __ j(equal, &use_global_receiver); 761 __ j(equal, &use_global_receiver);
747 762
748 // If given receiver is already a JavaScript object then there's no 763 // If given receiver is already a JavaScript object then there's no
749 // reason for converting it. 764 // reason for converting it.
750 // We don't use IsObjectJSObjectType here because we jump on success. 765 // We don't use IsObjectJSObjectType here because we jump on success.
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); 1587 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR);
1573 generator.Generate(); 1588 generator.Generate();
1574 } 1589 }
1575 1590
1576 1591
1577 #undef __ 1592 #undef __
1578 1593
1579 } } // namespace v8::internal 1594 } } // namespace v8::internal
1580 1595
1581 #endif // V8_TARGET_ARCH_IA32 1596 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | src/ia32/code-stubs-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698