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

Side by Side Diff: src/ic/x64/ic-x64.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/x64/ic-compiler-x64.cc ('k') | src/isolate.cc » ('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_X64 7 #if V8_TARGET_ARCH_X64
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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 rbx, rdi, slow); 505 rbx, rdi, slow);
506 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); 506 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS);
507 ElementsTransitionGenerator::GenerateDoubleToObject(masm, receiver, key, 507 ElementsTransitionGenerator::GenerateDoubleToObject(masm, receiver, key,
508 value, rbx, mode, slow); 508 value, rbx, mode, slow);
509 __ movp(rbx, FieldOperand(receiver, JSObject::kElementsOffset)); 509 __ movp(rbx, FieldOperand(receiver, JSObject::kElementsOffset));
510 __ jmp(&finish_object_store); 510 __ jmp(&finish_object_store);
511 } 511 }
512 512
513 513
514 void KeyedStoreIC::GenerateMegamorphic(MacroAssembler* masm, 514 void KeyedStoreIC::GenerateMegamorphic(MacroAssembler* masm,
515 StrictMode strict_mode) { 515 LanguageMode language_mode) {
516 // Return address is on the stack. 516 // Return address is on the stack.
517 Label slow, slow_with_tagged_index, fast_object, fast_object_grow; 517 Label slow, slow_with_tagged_index, fast_object, fast_object_grow;
518 Label fast_double, fast_double_grow; 518 Label fast_double, fast_double_grow;
519 Label array, extra, check_if_double_array, maybe_name_key, miss; 519 Label array, extra, check_if_double_array, maybe_name_key, miss;
520 Register receiver = StoreDescriptor::ReceiverRegister(); 520 Register receiver = StoreDescriptor::ReceiverRegister();
521 Register key = StoreDescriptor::NameRegister(); 521 Register key = StoreDescriptor::NameRegister();
522 DCHECK(receiver.is(rdx)); 522 DCHECK(receiver.is(rdx));
523 DCHECK(key.is(rcx)); 523 DCHECK(key.is(rcx));
524 524
525 // Check that the object isn't a smi. 525 // Check that the object isn't a smi.
(...skipping 19 matching lines...) Expand all
545 __ movp(rbx, FieldOperand(receiver, JSObject::kElementsOffset)); 545 __ movp(rbx, FieldOperand(receiver, JSObject::kElementsOffset));
546 // Check array bounds. 546 // Check array bounds.
547 __ SmiCompareInteger32(FieldOperand(rbx, FixedArray::kLengthOffset), key); 547 __ SmiCompareInteger32(FieldOperand(rbx, FixedArray::kLengthOffset), key);
548 // rbx: FixedArray 548 // rbx: FixedArray
549 __ j(above, &fast_object); 549 __ j(above, &fast_object);
550 550
551 // Slow case: call runtime. 551 // Slow case: call runtime.
552 __ bind(&slow); 552 __ bind(&slow);
553 __ Integer32ToSmi(key, key); 553 __ Integer32ToSmi(key, key);
554 __ bind(&slow_with_tagged_index); 554 __ bind(&slow_with_tagged_index);
555 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode); 555 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode);
556 // Never returns to here. 556 // Never returns to here.
557 557
558 __ bind(&maybe_name_key); 558 __ bind(&maybe_name_key);
559 __ movp(r9, FieldOperand(key, HeapObject::kMapOffset)); 559 __ movp(r9, FieldOperand(key, HeapObject::kMapOffset));
560 __ movzxbp(r9, FieldOperand(r9, Map::kInstanceTypeOffset)); 560 __ movzxbp(r9, FieldOperand(r9, Map::kInstanceTypeOffset));
561 __ JumpIfNotUniqueNameInstanceType(r9, &slow_with_tagged_index); 561 __ JumpIfNotUniqueNameInstanceType(r9, &slow_with_tagged_index);
562 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 562 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
563 Code::ComputeHandlerFlags(Code::STORE_IC)); 563 Code::ComputeHandlerFlags(Code::STORE_IC));
564 masm->isolate()->stub_cache()->GenerateProbe( 564 masm->isolate()->stub_cache()->GenerateProbe(
565 masm, Code::STORE_IC, flags, false, receiver, key, rbx, no_reg); 565 masm, Code::STORE_IC, flags, false, receiver, key, rbx, no_reg);
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 Condition cc = 962 Condition cc =
963 (check == ENABLE_INLINED_SMI_CHECK) 963 (check == ENABLE_INLINED_SMI_CHECK)
964 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 964 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
965 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 965 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
966 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 966 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
967 } 967 }
968 } 968 }
969 } // namespace v8::internal 969 } // namespace v8::internal
970 970
971 #endif // V8_TARGET_ARCH_X64 971 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ic/x64/ic-compiler-x64.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698