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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 1010883002: Switch full-codegen from StackHandlers to handler table. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-isolate-dead-code
Patch Set: Fix debugger-pause-on-promise-rejection. 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/arm/macro-assembler-arm.h ('k') | src/arm64/code-stubs-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 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 1389
1390 void MacroAssembler::DebugBreak() { 1390 void MacroAssembler::DebugBreak() {
1391 mov(r0, Operand::Zero()); 1391 mov(r0, Operand::Zero());
1392 mov(r1, Operand(ExternalReference(Runtime::kDebugBreak, isolate()))); 1392 mov(r1, Operand(ExternalReference(Runtime::kDebugBreak, isolate())));
1393 CEntryStub ces(isolate(), 1); 1393 CEntryStub ces(isolate(), 1);
1394 DCHECK(AllowThisStubCall(&ces)); 1394 DCHECK(AllowThisStubCall(&ces));
1395 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK); 1395 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK);
1396 } 1396 }
1397 1397
1398 1398
1399 void MacroAssembler::PushTryHandler(StackHandler::Kind kind, 1399 void MacroAssembler::PushStackHandler() {
1400 int handler_index) {
1401 // Adjust this code if not the case. 1400 // Adjust this code if not the case.
1402 STATIC_ASSERT(StackHandlerConstants::kSize == 3 * kPointerSize); 1401 STATIC_ASSERT(StackHandlerConstants::kSize == 1 * kPointerSize);
1403 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); 1402 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize);
1404 STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize);
1405 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize);
1406
1407 // For the JSEntry handler, we must preserve r0-r4, r5-r6 are available.
1408 // We will build up the handler from the bottom by pushing on the stack.
1409 // Set up the the index (r6) for pushing.
1410 mov(r6, Operand(handler_index));
1411
1412 // Push the context and index.
1413 if (kind == StackHandler::JS_ENTRY) {
1414 mov(cp, Operand(Smi::FromInt(0))); // Indicates no context.
1415 stm(db_w, sp, r6.bit() | cp.bit());
1416 } else {
1417 stm(db_w, sp, r6.bit() | cp.bit());
1418 }
1419 1403
1420 // Link the current handler as the next handler. 1404 // Link the current handler as the next handler.
1421 mov(r6, Operand(ExternalReference(Isolate::kHandlerAddress, isolate()))); 1405 mov(r6, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
1422 ldr(r5, MemOperand(r6)); 1406 ldr(r5, MemOperand(r6));
1423 push(r5); 1407 push(r5);
1408
1424 // Set this new handler as the current one. 1409 // Set this new handler as the current one.
1425 str(sp, MemOperand(r6)); 1410 str(sp, MemOperand(r6));
1426 } 1411 }
1427 1412
1428 1413
1429 void MacroAssembler::PopTryHandler() { 1414 void MacroAssembler::PopStackHandler() {
1430 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0); 1415 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
1431 pop(r1); 1416 pop(r1);
1432 mov(ip, Operand(ExternalReference(Isolate::kHandlerAddress, isolate()))); 1417 mov(ip, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
1433 add(sp, sp, Operand(StackHandlerConstants::kSize - kPointerSize)); 1418 add(sp, sp, Operand(StackHandlerConstants::kSize - kPointerSize));
1434 str(r1, MemOperand(ip)); 1419 str(r1, MemOperand(ip));
1435 } 1420 }
1436 1421
1437 1422
1438 void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg, 1423 void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg,
1439 Register scratch, 1424 Register scratch,
(...skipping 2451 matching lines...) Expand 10 before | Expand all | Expand 10 after
3891 } 3876 }
3892 } 3877 }
3893 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 3878 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
3894 add(result, result, Operand(dividend, LSR, 31)); 3879 add(result, result, Operand(dividend, LSR, 31));
3895 } 3880 }
3896 3881
3897 } // namespace internal 3882 } // namespace internal
3898 } // namespace v8 3883 } // namespace v8
3899 3884
3900 #endif // V8_TARGET_ARCH_ARM 3885 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698