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

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

Issue 240143003: Revert "Implement structural function and array 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/accessors.cc ('k') | src/arm64/stub-cache-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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 HeapType* field_type = descriptors->GetFieldType(descriptor);
434 if (field_type->IsClass()) { 434 if (field_type->IsClass()) {
435 __ CheckMap(value_reg, scratch1, field_type->AsClass()->Map(), 435 __ CheckMap(value_reg, scratch1, field_type->AsClass(),
436 miss_label, DO_SMI_CHECK); 436 miss_label, DO_SMI_CHECK);
437 } else { 437 } else {
438 ASSERT(HeapType::Any()->Is(field_type)); 438 ASSERT(HeapType::Any()->Is(field_type));
439 __ JumpIfSmi(value_reg, miss_label); 439 __ JumpIfSmi(value_reg, miss_label);
440 } 440 }
441 } else if (representation.IsDouble()) { 441 } else if (representation.IsDouble()) {
442 Label do_store, heap_number; 442 Label do_store, heap_number;
443 __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex); 443 __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex);
444 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow); 444 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow);
445 445
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 // object and the number of in-object properties is not going to change. 594 // object and the number of in-object properties is not going to change.
595 index -= object->map()->inobject_properties(); 595 index -= object->map()->inobject_properties();
596 596
597 Representation representation = lookup->representation(); 597 Representation representation = lookup->representation();
598 ASSERT(!representation.IsNone()); 598 ASSERT(!representation.IsNone());
599 if (representation.IsSmi()) { 599 if (representation.IsSmi()) {
600 __ JumpIfNotSmi(value_reg, miss_label); 600 __ JumpIfNotSmi(value_reg, miss_label);
601 } else if (representation.IsHeapObject()) { 601 } else if (representation.IsHeapObject()) {
602 HeapType* field_type = lookup->GetFieldType(); 602 HeapType* field_type = lookup->GetFieldType();
603 if (field_type->IsClass()) { 603 if (field_type->IsClass()) {
604 __ CheckMap(value_reg, scratch1, field_type->AsClass()->Map(), 604 __ CheckMap(value_reg, scratch1, field_type->AsClass(),
605 miss_label, DO_SMI_CHECK); 605 miss_label, DO_SMI_CHECK);
606 } else { 606 } else {
607 ASSERT(HeapType::Any()->Is(field_type)); 607 ASSERT(HeapType::Any()->Is(field_type));
608 __ JumpIfSmi(value_reg, miss_label); 608 __ JumpIfSmi(value_reg, miss_label);
609 } 609 }
610 } else if (representation.IsDouble()) { 610 } else if (representation.IsDouble()) {
611 // Load the double storage. 611 // Load the double storage.
612 if (index < 0) { 612 if (index < 0) {
613 int offset = object->map()->instance_size() + (index * kPointerSize); 613 int offset = object->map()->instance_size() + (index * kPointerSize);
614 __ ldr(scratch1, FieldMemOperand(receiver_reg, offset)); 614 __ ldr(scratch1, FieldMemOperand(receiver_reg, offset));
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 // Make sure there's no overlap between holder and object registers. 843 // Make sure there's no overlap between holder and object registers.
844 ASSERT(!scratch1.is(object_reg) && !scratch1.is(holder_reg)); 844 ASSERT(!scratch1.is(object_reg) && !scratch1.is(holder_reg));
845 ASSERT(!scratch2.is(object_reg) && !scratch2.is(holder_reg) 845 ASSERT(!scratch2.is(object_reg) && !scratch2.is(holder_reg)
846 && !scratch2.is(scratch1)); 846 && !scratch2.is(scratch1));
847 847
848 // Keep track of the current object in register reg. 848 // Keep track of the current object in register reg.
849 Register reg = object_reg; 849 Register reg = object_reg;
850 int depth = 0; 850 int depth = 0;
851 851
852 Handle<JSObject> current = Handle<JSObject>::null(); 852 Handle<JSObject> current = Handle<JSObject>::null();
853 if (type->IsConstant()) { 853 if (type->IsConstant()) current = Handle<JSObject>::cast(type->AsConstant());
854 current = Handle<JSObject>::cast(type->AsConstant()->Value());
855 }
856 Handle<JSObject> prototype = Handle<JSObject>::null(); 854 Handle<JSObject> prototype = Handle<JSObject>::null();
857 Handle<Map> current_map = receiver_map; 855 Handle<Map> current_map = receiver_map;
858 Handle<Map> holder_map(holder->map()); 856 Handle<Map> holder_map(holder->map());
859 // Traverse the prototype chain and check the maps in the prototype chain for 857 // Traverse the prototype chain and check the maps in the prototype chain for
860 // fast and global objects or do negative lookup for normal objects. 858 // fast and global objects or do negative lookup for normal objects.
861 while (!current_map.is_identical_to(holder_map)) { 859 while (!current_map.is_identical_to(holder_map)) {
862 ++depth; 860 ++depth;
863 861
864 // Only global objects and objects that do not require access 862 // Only global objects and objects that do not require access
865 // checks are allowed in stubs. 863 // checks are allowed in stubs.
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 // ----------------------------------- 1536 // -----------------------------------
1539 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1537 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1540 } 1538 }
1541 1539
1542 1540
1543 #undef __ 1541 #undef __
1544 1542
1545 } } // namespace v8::internal 1543 } } // namespace v8::internal
1546 1544
1547 #endif // V8_TARGET_ARCH_ARM 1545 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/arm64/stub-cache-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698