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

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 236843002: Revert "Track field types." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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/arm/lithium-codegen-arm.cc ('k') | src/arm64/lithium-codegen-arm64.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 // 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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 ASSERT(!representation.IsNone()); 423 ASSERT(!representation.IsNone());
424 424
425 if (details.type() == CONSTANT) { 425 if (details.type() == CONSTANT) {
426 Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate()); 426 Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate());
427 __ Move(scratch1, constant); 427 __ Move(scratch1, constant);
428 __ cmp(value_reg, scratch1); 428 __ cmp(value_reg, scratch1);
429 __ b(ne, miss_label); 429 __ b(ne, miss_label);
430 } else if (representation.IsSmi()) { 430 } else if (representation.IsSmi()) {
431 __ JumpIfNotSmi(value_reg, miss_label); 431 __ JumpIfNotSmi(value_reg, miss_label);
432 } else if (representation.IsHeapObject()) { 432 } else if (representation.IsHeapObject()) {
433 HeapType* field_type = descriptors->GetFieldType(descriptor); 433 __ JumpIfSmi(value_reg, miss_label);
434 if (field_type->IsClass()) {
435 __ CheckMap(value_reg, scratch1, field_type->AsClass(),
436 miss_label, DO_SMI_CHECK);
437 } else {
438 ASSERT(HeapType::Any()->Is(field_type));
439 __ JumpIfSmi(value_reg, miss_label);
440 }
441 } else if (representation.IsDouble()) { 434 } else if (representation.IsDouble()) {
442 Label do_store, heap_number; 435 Label do_store, heap_number;
443 __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex); 436 __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex);
444 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow); 437 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow);
445 438
446 __ JumpIfNotSmi(value_reg, &heap_number); 439 __ JumpIfNotSmi(value_reg, &heap_number);
447 __ SmiUntag(scratch1, value_reg); 440 __ SmiUntag(scratch1, value_reg);
448 __ vmov(s0, scratch1); 441 __ vmov(s0, scratch1);
449 __ vcvt_f64_s32(d0, s0); 442 __ vcvt_f64_s32(d0, s0);
450 __ jmp(&do_store); 443 __ jmp(&do_store);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 // Adjust for the number of properties stored in the object. Even in the 585 // Adjust for the number of properties stored in the object. Even in the
593 // face of a transition we can use the old map here because the size of the 586 // face of a transition we can use the old map here because the size of the
594 // object and the number of in-object properties is not going to change. 587 // object and the number of in-object properties is not going to change.
595 index -= object->map()->inobject_properties(); 588 index -= object->map()->inobject_properties();
596 589
597 Representation representation = lookup->representation(); 590 Representation representation = lookup->representation();
598 ASSERT(!representation.IsNone()); 591 ASSERT(!representation.IsNone());
599 if (representation.IsSmi()) { 592 if (representation.IsSmi()) {
600 __ JumpIfNotSmi(value_reg, miss_label); 593 __ JumpIfNotSmi(value_reg, miss_label);
601 } else if (representation.IsHeapObject()) { 594 } else if (representation.IsHeapObject()) {
602 HeapType* field_type = lookup->GetFieldType(); 595 __ JumpIfSmi(value_reg, miss_label);
603 if (field_type->IsClass()) {
604 __ CheckMap(value_reg, scratch1, field_type->AsClass(),
605 miss_label, DO_SMI_CHECK);
606 } else {
607 ASSERT(HeapType::Any()->Is(field_type));
608 __ JumpIfSmi(value_reg, miss_label);
609 }
610 } else if (representation.IsDouble()) { 596 } else if (representation.IsDouble()) {
611 // Load the double storage. 597 // Load the double storage.
612 if (index < 0) { 598 if (index < 0) {
613 int offset = object->map()->instance_size() + (index * kPointerSize); 599 int offset = object->map()->instance_size() + (index * kPointerSize);
614 __ ldr(scratch1, FieldMemOperand(receiver_reg, offset)); 600 __ ldr(scratch1, FieldMemOperand(receiver_reg, offset));
615 } else { 601 } else {
616 __ ldr(scratch1, 602 __ ldr(scratch1,
617 FieldMemOperand(receiver_reg, JSObject::kPropertiesOffset)); 603 FieldMemOperand(receiver_reg, JSObject::kPropertiesOffset));
618 int offset = index * kPointerSize + FixedArray::kHeaderSize; 604 int offset = index * kPointerSize + FixedArray::kHeaderSize;
619 __ ldr(scratch1, FieldMemOperand(scratch1, offset)); 605 __ ldr(scratch1, FieldMemOperand(scratch1, offset));
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 // ----------------------------------- 1522 // -----------------------------------
1537 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1523 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1538 } 1524 }
1539 1525
1540 1526
1541 #undef __ 1527 #undef __
1542 1528
1543 } } // namespace v8::internal 1529 } } // namespace v8::internal
1544 1530
1545 #endif // V8_TARGET_ARCH_ARM 1531 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698