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

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

Issue 1009903002: Revert of Remove kind field from StackHandler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/isolate.cc ('k') | no next file » | 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 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/division-by-constant.h" 10 #include "src/base/division-by-constant.h"
(...skipping 2977 matching lines...) Expand 10 before | Expand all | Expand 10 after
2988 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize); 2988 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize);
2989 2989
2990 // We will build up the handler from the bottom by pushing on the stack. 2990 // We will build up the handler from the bottom by pushing on the stack.
2991 // First push the context. 2991 // First push the context.
2992 if (kind == StackHandler::JS_ENTRY) { 2992 if (kind == StackHandler::JS_ENTRY) {
2993 Push(Smi::FromInt(0)); // No context. 2993 Push(Smi::FromInt(0)); // No context.
2994 } else { 2994 } else {
2995 Push(rsi); 2995 Push(rsi);
2996 } 2996 }
2997 2997
2998 // Push the index. 2998 // Push the state.
2999 Push(Immediate(handler_index)); 2999 unsigned state =
3000 StackHandler::IndexField::encode(handler_index) |
3001 StackHandler::KindField::encode(kind);
3002 Push(Immediate(state));
3000 3003
3001 // Link the current handler as the next handler. 3004 // Link the current handler as the next handler.
3002 ExternalReference handler_address(Isolate::kHandlerAddress, isolate()); 3005 ExternalReference handler_address(Isolate::kHandlerAddress, isolate());
3003 Push(ExternalOperand(handler_address)); 3006 Push(ExternalOperand(handler_address));
3004 // Set this new handler as the current one. 3007 // Set this new handler as the current one.
3005 movp(ExternalOperand(handler_address), rsp); 3008 movp(ExternalOperand(handler_address), rsp);
3006 } 3009 }
3007 3010
3008 3011
3009 void MacroAssembler::PopTryHandler() { 3012 void MacroAssembler::PopTryHandler() {
(...skipping 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after
5076 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); 5079 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift));
5077 movl(rax, dividend); 5080 movl(rax, dividend);
5078 shrl(rax, Immediate(31)); 5081 shrl(rax, Immediate(31));
5079 addl(rdx, rax); 5082 addl(rdx, rax);
5080 } 5083 }
5081 5084
5082 5085
5083 } } // namespace v8::internal 5086 } } // namespace v8::internal
5084 5087
5085 #endif // V8_TARGET_ARCH_X64 5088 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698