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

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

Issue 954863002: MIPS: Move Maps' back pointers from "transitions" to "constructor" field (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix register conflict again. Created 5 years, 9 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 2639 matching lines...) Expand 10 before | Expand all | Expand 10 after
2650 // Faster code path to avoid two compares: subtract lower bound from the 2650 // Faster code path to avoid two compares: subtract lower bound from the
2651 // actual type and do a signed compare with the width of the type range. 2651 // actual type and do a signed compare with the width of the type range.
2652 __ GetObjectType(input, temp, temp2); 2652 __ GetObjectType(input, temp, temp2);
2653 __ Subu(temp2, temp2, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); 2653 __ Subu(temp2, temp2, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE));
2654 __ Branch(is_false, gt, temp2, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE - 2654 __ Branch(is_false, gt, temp2, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE -
2655 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); 2655 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE));
2656 } 2656 }
2657 2657
2658 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range. 2658 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range.
2659 // Check if the constructor in the map is a function. 2659 // Check if the constructor in the map is a function.
2660 __ lw(temp, FieldMemOperand(temp, Map::kConstructorOffset)); 2660 Register instance_type = scratch1();
paul.l... 2015/02/25 02:17:56 Suggest adding DCHECK(!instance_type.is(temp)); DC
akos.palfi.imgtec 2015/02/25 02:25:38 Done.
2661 __ GetMapConstructor(temp, temp, temp2, instance_type);
2661 2662
2662 // Objects with a non-function constructor have class 'Object'. 2663 // Objects with a non-function constructor have class 'Object'.
2663 __ GetObjectType(temp, temp2, temp2);
2664 if (String::Equals(class_name, isolate()->factory()->Object_string())) { 2664 if (String::Equals(class_name, isolate()->factory()->Object_string())) {
2665 __ Branch(is_true, ne, temp2, Operand(JS_FUNCTION_TYPE)); 2665 __ Branch(is_true, ne, instance_type, Operand(JS_FUNCTION_TYPE));
2666 } else { 2666 } else {
2667 __ Branch(is_false, ne, temp2, Operand(JS_FUNCTION_TYPE)); 2667 __ Branch(is_false, ne, instance_type, Operand(JS_FUNCTION_TYPE));
2668 } 2668 }
2669 2669
2670 // temp now contains the constructor function. Grab the 2670 // temp now contains the constructor function. Grab the
2671 // instance class name from there. 2671 // instance class name from there.
2672 __ lw(temp, FieldMemOperand(temp, JSFunction::kSharedFunctionInfoOffset)); 2672 __ lw(temp, FieldMemOperand(temp, JSFunction::kSharedFunctionInfoOffset));
2673 __ lw(temp, FieldMemOperand(temp, 2673 __ lw(temp, FieldMemOperand(temp,
2674 SharedFunctionInfo::kInstanceClassNameOffset)); 2674 SharedFunctionInfo::kInstanceClassNameOffset));
2675 // The class name we are testing against is internalized since it's a literal. 2675 // The class name we are testing against is internalized since it's a literal.
2676 // The name in the constructor is internalized because of the way the context 2676 // The name in the constructor is internalized because of the way the context
2677 // is booted. This routine isn't expected to work for random API-created 2677 // is booted. This routine isn't expected to work for random API-created
(...skipping 3353 matching lines...) Expand 10 before | Expand all | Expand 10 after
6031 __ li(at, scope_info); 6031 __ li(at, scope_info);
6032 __ Push(at, ToRegister(instr->function())); 6032 __ Push(at, ToRegister(instr->function()));
6033 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6033 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6034 RecordSafepoint(Safepoint::kNoLazyDeopt); 6034 RecordSafepoint(Safepoint::kNoLazyDeopt);
6035 } 6035 }
6036 6036
6037 6037
6038 #undef __ 6038 #undef __
6039 6039
6040 } } // namespace v8::internal 6040 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698