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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 3838003: Change the StackGuard runtime function to take no arguments. (Closed)
Patch Set: Fix ARM bug. Created 10 years, 2 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/code-stubs-arm.cc ('k') | src/runtime.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
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 2946 matching lines...) Expand 10 before | Expand all | Expand 10 after
2957 __ j(zero, label); 2957 __ j(zero, label);
2958 __ mov(scratch, FieldOperand(object, HeapObject::kMapOffset)); 2958 __ mov(scratch, FieldOperand(object, HeapObject::kMapOffset));
2959 __ movzx_b(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset)); 2959 __ movzx_b(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset));
2960 __ and_(scratch, kIsSymbolMask | kIsNotStringMask); 2960 __ and_(scratch, kIsSymbolMask | kIsNotStringMask);
2961 __ cmp(scratch, kSymbolTag | kStringTag); 2961 __ cmp(scratch, kSymbolTag | kStringTag);
2962 __ j(not_equal, label); 2962 __ j(not_equal, label);
2963 } 2963 }
2964 2964
2965 2965
2966 void StackCheckStub::Generate(MacroAssembler* masm) { 2966 void StackCheckStub::Generate(MacroAssembler* masm) {
2967 // Because builtins always remove the receiver from the stack, we 2967 __ TailCallRuntime(Runtime::kStackGuard, 0, 1);
2968 // have to fake one to avoid underflowing the stack. The receiver
2969 // must be inserted below the return address on the stack so we
2970 // temporarily store that in a register.
2971 __ pop(eax);
2972 __ push(Immediate(Smi::FromInt(0)));
2973 __ push(eax);
2974
2975 // Do tail-call to runtime routine.
2976 __ TailCallRuntime(Runtime::kStackGuard, 1, 1);
2977 } 2968 }
2978 2969
2979 2970
2980 void CallFunctionStub::Generate(MacroAssembler* masm) { 2971 void CallFunctionStub::Generate(MacroAssembler* masm) {
2981 Label slow; 2972 Label slow;
2982 2973
2983 // If the receiver might be a value (string, number or boolean) check for this 2974 // If the receiver might be a value (string, number or boolean) check for this
2984 // and box it if it is. 2975 // and box it if it is.
2985 if (ReceiverMightBeValue()) { 2976 if (ReceiverMightBeValue()) {
2986 // Get the receiver from the stack. 2977 // Get the receiver from the stack.
(...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after
4650 // tagged as a small integer. 4641 // tagged as a small integer.
4651 __ bind(&runtime); 4642 __ bind(&runtime);
4652 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); 4643 __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
4653 } 4644 }
4654 4645
4655 #undef __ 4646 #undef __
4656 4647
4657 } } // namespace v8::internal 4648 } } // namespace v8::internal
4658 4649
4659 #endif // V8_TARGET_ARCH_IA32 4650 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698