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

Side by Side Diff: src/arm64/lithium-codegen-arm64.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, 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
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/arm64/macro-assembler-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/arm64/lithium-codegen-arm64.h" 7 #include "src/arm64/lithium-codegen-arm64.h"
8 #include "src/arm64/lithium-gap-resolver-arm64.h" 8 #include "src/arm64/lithium-gap-resolver-arm64.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 2420 matching lines...) Expand 10 before | Expand all | Expand 10 after
2431 __ B(lt, false_label); 2431 __ B(lt, false_label);
2432 __ B(eq, true_label); 2432 __ B(eq, true_label);
2433 __ Cmp(scratch1, LAST_SPEC_OBJECT_TYPE); 2433 __ Cmp(scratch1, LAST_SPEC_OBJECT_TYPE);
2434 __ B(eq, true_label); 2434 __ B(eq, true_label);
2435 } else { 2435 } else {
2436 __ IsObjectJSObjectType(input, map, scratch1, false_label); 2436 __ IsObjectJSObjectType(input, map, scratch1, false_label);
2437 } 2437 }
2438 2438
2439 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range. 2439 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range.
2440 // Check if the constructor in the map is a function. 2440 // Check if the constructor in the map is a function.
2441 __ Ldr(scratch1, FieldMemOperand(map, Map::kConstructorOffset)); 2441 {
2442 2442 UseScratchRegisterScope temps(masm());
2443 Register instance_type = temps.AcquireX();
2444 __ GetMapConstructor(scratch1, map, scratch2, instance_type);
2445 __ Cmp(instance_type, JS_FUNCTION_TYPE);
2446 }
2443 // Objects with a non-function constructor have class 'Object'. 2447 // Objects with a non-function constructor have class 'Object'.
2444 if (String::Equals(class_name, isolate()->factory()->Object_string())) { 2448 if (String::Equals(class_name, isolate()->factory()->Object_string())) {
2445 __ JumpIfNotObjectType( 2449 __ B(ne, true_label);
2446 scratch1, scratch2, scratch2, JS_FUNCTION_TYPE, true_label);
2447 } else { 2450 } else {
2448 __ JumpIfNotObjectType( 2451 __ B(ne, false_label);
2449 scratch1, scratch2, scratch2, JS_FUNCTION_TYPE, false_label);
2450 } 2452 }
2451 2453
2452 // The constructor function is in scratch1. Get its instance class name. 2454 // The constructor function is in scratch1. Get its instance class name.
2453 __ Ldr(scratch1, 2455 __ Ldr(scratch1,
2454 FieldMemOperand(scratch1, JSFunction::kSharedFunctionInfoOffset)); 2456 FieldMemOperand(scratch1, JSFunction::kSharedFunctionInfoOffset));
2455 __ Ldr(scratch1, 2457 __ Ldr(scratch1,
2456 FieldMemOperand(scratch1, 2458 FieldMemOperand(scratch1,
2457 SharedFunctionInfo::kInstanceClassNameOffset)); 2459 SharedFunctionInfo::kInstanceClassNameOffset));
2458 2460
2459 // The class name we are testing against is internalized since it's a literal. 2461 // The class name we are testing against is internalized since it's a literal.
(...skipping 3642 matching lines...) Expand 10 before | Expand all | Expand 10 after
6102 Handle<ScopeInfo> scope_info = instr->scope_info(); 6104 Handle<ScopeInfo> scope_info = instr->scope_info();
6103 __ Push(scope_info); 6105 __ Push(scope_info);
6104 __ Push(ToRegister(instr->function())); 6106 __ Push(ToRegister(instr->function()));
6105 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6107 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6106 RecordSafepoint(Safepoint::kNoLazyDeopt); 6108 RecordSafepoint(Safepoint::kNoLazyDeopt);
6107 } 6109 }
6108 6110
6109 6111
6110 6112
6111 } } // namespace v8::internal 6113 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/arm64/macro-assembler-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698