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

Side by Side Diff: src/x64/code-stubs-x64.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/runtime.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 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 2376 matching lines...) Expand 10 before | Expand all | Expand 10 after
2387 FieldOperand(scratch, Map::kInstanceTypeOffset)); 2387 FieldOperand(scratch, Map::kInstanceTypeOffset));
2388 // Ensure that no non-strings have the symbol bit set. 2388 // Ensure that no non-strings have the symbol bit set.
2389 STATIC_ASSERT(LAST_TYPE < kNotStringTag + kIsSymbolMask); 2389 STATIC_ASSERT(LAST_TYPE < kNotStringTag + kIsSymbolMask);
2390 STATIC_ASSERT(kSymbolTag != 0); 2390 STATIC_ASSERT(kSymbolTag != 0);
2391 __ testb(scratch, Immediate(kIsSymbolMask)); 2391 __ testb(scratch, Immediate(kIsSymbolMask));
2392 __ j(zero, label); 2392 __ j(zero, label);
2393 } 2393 }
2394 2394
2395 2395
2396 void StackCheckStub::Generate(MacroAssembler* masm) { 2396 void StackCheckStub::Generate(MacroAssembler* masm) {
2397 // Because builtins always remove the receiver from the stack, we 2397 __ TailCallRuntime(Runtime::kStackGuard, 0, 1);
2398 // have to fake one to avoid underflowing the stack. The receiver
2399 // must be inserted below the return address on the stack so we
2400 // temporarily store that in a register.
2401 __ pop(rax);
2402 __ Push(Smi::FromInt(0));
2403 __ push(rax);
2404
2405 // Do tail-call to runtime routine.
2406 __ TailCallRuntime(Runtime::kStackGuard, 1, 1);
2407 } 2398 }
2408 2399
2409 2400
2410 void CallFunctionStub::Generate(MacroAssembler* masm) { 2401 void CallFunctionStub::Generate(MacroAssembler* masm) {
2411 Label slow; 2402 Label slow;
2412 2403
2413 // If the receiver might be a value (string, number or boolean) check for this 2404 // If the receiver might be a value (string, number or boolean) check for this
2414 // and box it if it is. 2405 // and box it if it is.
2415 if (ReceiverMightBeValue()) { 2406 if (ReceiverMightBeValue()) {
2416 // Get the receiver from the stack. 2407 // Get the receiver from the stack.
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after
4033 // tagged as a small integer. 4024 // tagged as a small integer.
4034 __ bind(&runtime); 4025 __ bind(&runtime);
4035 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); 4026 __ TailCallRuntime(Runtime::kStringCompare, 2, 1);
4036 } 4027 }
4037 4028
4038 #undef __ 4029 #undef __
4039 4030
4040 } } // namespace v8::internal 4031 } } // namespace v8::internal
4041 4032
4042 #endif // V8_TARGET_ARCH_X64 4033 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698