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

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

Issue 894683003: Introduce LanguageMode, drop StrictMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased (w/ conflicts) Created 5 years, 10 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
« no previous file with comments | « src/ic/ia32/ic-compiler-ia32.cc ('k') | src/ic/ic.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 ebx, edi, slow); 605 ebx, edi, slow);
606 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); 606 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS);
607 ElementsTransitionGenerator::GenerateDoubleToObject(masm, receiver, key, 607 ElementsTransitionGenerator::GenerateDoubleToObject(masm, receiver, key,
608 value, ebx, mode, slow); 608 value, ebx, mode, slow);
609 __ mov(ebx, FieldOperand(receiver, JSObject::kElementsOffset)); 609 __ mov(ebx, FieldOperand(receiver, JSObject::kElementsOffset));
610 __ jmp(&finish_object_store); 610 __ jmp(&finish_object_store);
611 } 611 }
612 612
613 613
614 void KeyedStoreIC::GenerateMegamorphic(MacroAssembler* masm, 614 void KeyedStoreIC::GenerateMegamorphic(MacroAssembler* masm,
615 StrictMode strict_mode) { 615 LanguageMode language_mode) {
616 // Return address is on the stack. 616 // Return address is on the stack.
617 Label slow, fast_object, fast_object_grow; 617 Label slow, fast_object, fast_object_grow;
618 Label fast_double, fast_double_grow; 618 Label fast_double, fast_double_grow;
619 Label array, extra, check_if_double_array, maybe_name_key, miss; 619 Label array, extra, check_if_double_array, maybe_name_key, miss;
620 Register receiver = StoreDescriptor::ReceiverRegister(); 620 Register receiver = StoreDescriptor::ReceiverRegister();
621 Register key = StoreDescriptor::NameRegister(); 621 Register key = StoreDescriptor::NameRegister();
622 DCHECK(receiver.is(edx)); 622 DCHECK(receiver.is(edx));
623 DCHECK(key.is(ecx)); 623 DCHECK(key.is(ecx));
624 624
625 // Check that the object isn't a smi. 625 // Check that the object isn't a smi.
(...skipping 16 matching lines...) Expand all
642 // Object case: Check key against length in the elements array. 642 // Object case: Check key against length in the elements array.
643 // Key is a smi. 643 // Key is a smi.
644 // edi: receiver map 644 // edi: receiver map
645 __ mov(ebx, FieldOperand(receiver, JSObject::kElementsOffset)); 645 __ mov(ebx, FieldOperand(receiver, JSObject::kElementsOffset));
646 // Check array bounds. Both the key and the length of FixedArray are smis. 646 // Check array bounds. Both the key and the length of FixedArray are smis.
647 __ cmp(key, FieldOperand(ebx, FixedArray::kLengthOffset)); 647 __ cmp(key, FieldOperand(ebx, FixedArray::kLengthOffset));
648 __ j(below, &fast_object); 648 __ j(below, &fast_object);
649 649
650 // Slow case: call runtime. 650 // Slow case: call runtime.
651 __ bind(&slow); 651 __ bind(&slow);
652 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode); 652 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode);
653 // Never returns to here. 653 // Never returns to here.
654 654
655 __ bind(&maybe_name_key); 655 __ bind(&maybe_name_key);
656 __ mov(ebx, FieldOperand(key, HeapObject::kMapOffset)); 656 __ mov(ebx, FieldOperand(key, HeapObject::kMapOffset));
657 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset)); 657 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset));
658 __ JumpIfNotUniqueNameInstanceType(ebx, &slow); 658 __ JumpIfNotUniqueNameInstanceType(ebx, &slow);
659 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 659 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
660 Code::ComputeHandlerFlags(Code::STORE_IC)); 660 Code::ComputeHandlerFlags(Code::STORE_IC));
661 masm->isolate()->stub_cache()->GenerateProbe( 661 masm->isolate()->stub_cache()->GenerateProbe(
662 masm, Code::STORE_IC, flags, false, receiver, key, ebx, no_reg); 662 masm, Code::STORE_IC, flags, false, receiver, key, ebx, no_reg);
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 Condition cc = 959 Condition cc =
960 (check == ENABLE_INLINED_SMI_CHECK) 960 (check == ENABLE_INLINED_SMI_CHECK)
961 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 961 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
962 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 962 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
963 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 963 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
964 } 964 }
965 } 965 }
966 } // namespace v8::internal 966 } // namespace v8::internal
967 967
968 #endif // V8_TARGET_ARCH_IA32 968 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ic/ia32/ic-compiler-ia32.cc ('k') | src/ic/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698