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

Side by Side Diff: src/arm/macro-assembler-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/macro-assembler-arm.h ('k') | src/arm64/full-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 // 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 <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_ARM 9 #if V8_TARGET_ARCH_ARM
10 10
(...skipping 2274 matching lines...) Expand 10 before | Expand all | Expand 10 after
2285 } 2285 }
2286 2286
2287 2287
2288 void MacroAssembler::LoadWeakValue(Register value, Handle<WeakCell> cell, 2288 void MacroAssembler::LoadWeakValue(Register value, Handle<WeakCell> cell,
2289 Label* miss) { 2289 Label* miss) {
2290 GetWeakValue(value, cell); 2290 GetWeakValue(value, cell);
2291 JumpIfSmi(value, miss); 2291 JumpIfSmi(value, miss);
2292 } 2292 }
2293 2293
2294 2294
2295 void MacroAssembler::GetMapConstructor(Register result, Register map,
2296 Register temp, Register temp2) {
2297 Label done, loop;
2298 ldr(result, FieldMemOperand(map, Map::kConstructorOrBackPointerOffset));
2299 bind(&loop);
2300 JumpIfSmi(result, &done);
2301 CompareObjectType(result, temp, temp2, MAP_TYPE);
2302 b(ne, &done);
2303 ldr(result, FieldMemOperand(result, Map::kConstructorOrBackPointerOffset));
2304 b(&loop);
2305 bind(&done);
2306 }
2307
2308
2295 void MacroAssembler::TryGetFunctionPrototype(Register function, 2309 void MacroAssembler::TryGetFunctionPrototype(Register function,
2296 Register result, 2310 Register result,
2297 Register scratch, 2311 Register scratch,
2298 Label* miss, 2312 Label* miss,
2299 bool miss_on_bound_function) { 2313 bool miss_on_bound_function) {
2300 Label non_instance; 2314 Label non_instance;
2301 if (miss_on_bound_function) { 2315 if (miss_on_bound_function) {
2302 // Check that the receiver isn't a smi. 2316 // Check that the receiver isn't a smi.
2303 JumpIfSmi(function, miss); 2317 JumpIfSmi(function, miss);
2304 2318
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
2338 2352
2339 // Get the prototype from the initial map. 2353 // Get the prototype from the initial map.
2340 ldr(result, FieldMemOperand(result, Map::kPrototypeOffset)); 2354 ldr(result, FieldMemOperand(result, Map::kPrototypeOffset));
2341 2355
2342 if (miss_on_bound_function) { 2356 if (miss_on_bound_function) {
2343 jmp(&done); 2357 jmp(&done);
2344 2358
2345 // Non-instance prototype: Fetch prototype from constructor field 2359 // Non-instance prototype: Fetch prototype from constructor field
2346 // in initial map. 2360 // in initial map.
2347 bind(&non_instance); 2361 bind(&non_instance);
2348 ldr(result, FieldMemOperand(result, Map::kConstructorOffset)); 2362 GetMapConstructor(result, result, scratch, ip);
2349 } 2363 }
2350 2364
2351 // All done. 2365 // All done.
2352 bind(&done); 2366 bind(&done);
2353 } 2367 }
2354 2368
2355 2369
2356 void MacroAssembler::CallStub(CodeStub* stub, 2370 void MacroAssembler::CallStub(CodeStub* stub,
2357 TypeFeedbackId ast_id, 2371 TypeFeedbackId ast_id,
2358 Condition cond) { 2372 Condition cond) {
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after
3975 } 3989 }
3976 } 3990 }
3977 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 3991 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
3978 add(result, result, Operand(dividend, LSR, 31)); 3992 add(result, result, Operand(dividend, LSR, 31));
3979 } 3993 }
3980 3994
3981 } // namespace internal 3995 } // namespace internal
3982 } // namespace v8 3996 } // namespace v8
3983 3997
3984 #endif // V8_TARGET_ARCH_ARM 3998 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698