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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 950283002: Move Maps' back pointers from "transitions" to "constructor" field (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix stupidity on arm64 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/arm/full-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.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 #include "src/arm/lithium-codegen-arm.h" 7 #include "src/arm/lithium-codegen-arm.h"
8 #include "src/arm/lithium-gap-resolver-arm.h" 8 #include "src/arm/lithium-gap-resolver-arm.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2712 matching lines...) Expand 10 before | Expand all | Expand 10 after
2723 __ ldr(temp, FieldMemOperand(input, HeapObject::kMapOffset)); 2723 __ ldr(temp, FieldMemOperand(input, HeapObject::kMapOffset));
2724 __ ldrb(temp2, FieldMemOperand(temp, Map::kInstanceTypeOffset)); 2724 __ ldrb(temp2, FieldMemOperand(temp, Map::kInstanceTypeOffset));
2725 __ sub(temp2, temp2, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); 2725 __ sub(temp2, temp2, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE));
2726 __ cmp(temp2, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE - 2726 __ cmp(temp2, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE -
2727 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); 2727 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE));
2728 __ b(gt, is_false); 2728 __ b(gt, is_false);
2729 } 2729 }
2730 2730
2731 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range. 2731 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range.
2732 // Check if the constructor in the map is a function. 2732 // Check if the constructor in the map is a function.
2733 __ ldr(temp, FieldMemOperand(temp, Map::kConstructorOffset)); 2733 Register instance_type = ip;
2734 __ GetMapConstructor(temp, temp, temp2, instance_type);
2734 2735
2735 // Objects with a non-function constructor have class 'Object'. 2736 // Objects with a non-function constructor have class 'Object'.
2736 __ CompareObjectType(temp, temp2, temp2, JS_FUNCTION_TYPE); 2737 __ cmp(instance_type, Operand(JS_FUNCTION_TYPE));
2737 if (class_name->IsOneByteEqualTo(STATIC_CHAR_VECTOR("Object"))) { 2738 if (class_name->IsOneByteEqualTo(STATIC_CHAR_VECTOR("Object"))) {
2738 __ b(ne, is_true); 2739 __ b(ne, is_true);
2739 } else { 2740 } else {
2740 __ b(ne, is_false); 2741 __ b(ne, is_false);
2741 } 2742 }
2742 2743
2743 // temp now contains the constructor function. Grab the 2744 // temp now contains the constructor function. Grab the
2744 // instance class name from there. 2745 // instance class name from there.
2745 __ ldr(temp, FieldMemOperand(temp, JSFunction::kSharedFunctionInfoOffset)); 2746 __ ldr(temp, FieldMemOperand(temp, JSFunction::kSharedFunctionInfoOffset));
2746 __ ldr(temp, FieldMemOperand(temp, 2747 __ ldr(temp, FieldMemOperand(temp,
(...skipping 3235 matching lines...) Expand 10 before | Expand all | Expand 10 after
5982 __ Push(scope_info); 5983 __ Push(scope_info);
5983 __ push(ToRegister(instr->function())); 5984 __ push(ToRegister(instr->function()));
5984 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5985 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5985 RecordSafepoint(Safepoint::kNoLazyDeopt); 5986 RecordSafepoint(Safepoint::kNoLazyDeopt);
5986 } 5987 }
5987 5988
5988 5989
5989 #undef __ 5990 #undef __
5990 5991
5991 } } // namespace v8::internal 5992 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698