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

Side by Side Diff: src/ia32/builtins-ia32.cc

Issue 1773653002: [strong] Remove all remainders of strong mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Oversight Created 4 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/heap-symbols.h ('k') | src/interpreter/bytecode-array-builder.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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 2353 matching lines...) Expand 10 before | Expand all | Expand 10 after
2364 __ push(Operand(edi, 0)); 2364 __ push(Operand(edi, 0));
2365 __ sub(edi, Immediate(kPointerSize)); 2365 __ sub(edi, Immediate(kPointerSize));
2366 __ cmp(eax, ebx); 2366 __ cmp(eax, ebx);
2367 __ j(less, &copy); 2367 __ j(less, &copy);
2368 // eax now contains the expected number of arguments. 2368 // eax now contains the expected number of arguments.
2369 __ jmp(&invoke); 2369 __ jmp(&invoke);
2370 } 2370 }
2371 2371
2372 { // Too few parameters: Actual < expected. 2372 { // Too few parameters: Actual < expected.
2373 __ bind(&too_few); 2373 __ bind(&too_few);
2374
2375 // If the function is strong we need to throw an error.
2376 Label no_strong_error;
2377 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
2378 __ test_b(FieldOperand(ecx, SharedFunctionInfo::kStrongModeByteOffset),
2379 1 << SharedFunctionInfo::kStrongModeBitWithinByte);
2380 __ j(equal, &no_strong_error, Label::kNear);
2381
2382 // What we really care about is the required number of arguments.
2383 __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kLengthOffset));
2384 __ SmiUntag(ecx);
2385 __ cmp(eax, ecx);
2386 __ j(greater_equal, &no_strong_error, Label::kNear);
2387
2388 {
2389 FrameScope frame(masm, StackFrame::MANUAL);
2390 EnterArgumentsAdaptorFrame(masm);
2391 __ CallRuntime(Runtime::kThrowStrongModeTooFewArguments);
2392 }
2393
2394 __ bind(&no_strong_error);
2395 EnterArgumentsAdaptorFrame(masm); 2374 EnterArgumentsAdaptorFrame(masm);
2396 ArgumentsAdaptorStackCheck(masm, &stack_overflow); 2375 ArgumentsAdaptorStackCheck(masm, &stack_overflow);
2397 2376
2398 // Remember expected arguments in ecx. 2377 // Remember expected arguments in ecx.
2399 __ mov(ecx, ebx); 2378 __ mov(ecx, ebx);
2400 2379
2401 // Copy receiver and all actual arguments. 2380 // Copy receiver and all actual arguments.
2402 const int offset = StandardFrameConstants::kCallerSPOffset; 2381 const int offset = StandardFrameConstants::kCallerSPOffset;
2403 __ lea(edi, Operand(ebp, eax, times_4, offset)); 2382 __ lea(edi, Operand(ebp, eax, times_4, offset));
2404 // ebx = expected - actual. 2383 // ebx = expected - actual.
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
2603 // And "return" to the OSR entry point of the function. 2582 // And "return" to the OSR entry point of the function.
2604 __ ret(0); 2583 __ ret(0);
2605 } 2584 }
2606 2585
2607 2586
2608 #undef __ 2587 #undef __
2609 } // namespace internal 2588 } // namespace internal
2610 } // namespace v8 2589 } // namespace v8
2611 2590
2612 #endif // V8_TARGET_ARCH_IA32 2591 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/heap-symbols.h ('k') | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698