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

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

Issue 214623002: Only allow automatic FrameScope types for FrameAndConstantPoolScope (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 // NOTE: Invocations of builtins may return failure objects 1641 // NOTE: Invocations of builtins may return failure objects
1642 // instead of a proper result. The builtin entry handles 1642 // instead of a proper result. The builtin entry handles
1643 // this by performing a garbage collection and retrying the 1643 // this by performing a garbage collection and retrying the
1644 // builtin once. 1644 // builtin once.
1645 1645
1646 // Compute the argv pointer in a callee-saved register. 1646 // Compute the argv pointer in a callee-saved register.
1647 __ add(r6, sp, Operand(r0, LSL, kPointerSizeLog2)); 1647 __ add(r6, sp, Operand(r0, LSL, kPointerSizeLog2));
1648 __ sub(r6, r6, Operand(kPointerSize)); 1648 __ sub(r6, r6, Operand(kPointerSize));
1649 1649
1650 // Enter the exit frame that transitions from JavaScript to C++. 1650 // Enter the exit frame that transitions from JavaScript to C++.
1651 FrameAndConstantPoolScope scope(masm, StackFrame::MANUAL); 1651 FrameScope scope(masm, StackFrame::MANUAL);
1652 __ EnterExitFrame(save_doubles_); 1652 __ EnterExitFrame(save_doubles_);
1653 1653
1654 // Set up argc and the builtin function in callee-saved registers. 1654 // Set up argc and the builtin function in callee-saved registers.
1655 __ mov(r4, Operand(r0)); 1655 __ mov(r4, Operand(r0));
1656 __ mov(r5, Operand(r1)); 1656 __ mov(r5, Operand(r1));
1657 1657
1658 // r4: number of arguments (C callee-saved) 1658 // r4: number of arguments (C callee-saved)
1659 // r5: pointer to builtin function (C callee-saved) 1659 // r5: pointer to builtin function (C callee-saved)
1660 // r6: pointer to first argument (C callee-saved) 1660 // r6: pointer to first argument (C callee-saved)
1661 1661
(...skipping 3702 matching lines...) Expand 10 before | Expand all | Expand 10 after
5364 // holder 5364 // holder
5365 __ push(holder); 5365 __ push(holder);
5366 5366
5367 // Prepare arguments. 5367 // Prepare arguments.
5368 __ mov(scratch, sp); 5368 __ mov(scratch, sp);
5369 5369
5370 // Allocate the v8::Arguments structure in the arguments' space since 5370 // Allocate the v8::Arguments structure in the arguments' space since
5371 // it's not controlled by GC. 5371 // it's not controlled by GC.
5372 const int kApiStackSpace = 4; 5372 const int kApiStackSpace = 4;
5373 5373
5374 FrameAndConstantPoolScope frame_scope(masm, StackFrame::MANUAL); 5374 FrameScope frame_scope(masm, StackFrame::MANUAL);
5375 __ EnterExitFrame(false, kApiStackSpace); 5375 __ EnterExitFrame(false, kApiStackSpace);
5376 5376
5377 ASSERT(!api_function_address.is(r0) && !scratch.is(r0)); 5377 ASSERT(!api_function_address.is(r0) && !scratch.is(r0));
5378 // r0 = FunctionCallbackInfo& 5378 // r0 = FunctionCallbackInfo&
5379 // Arguments is after the return address. 5379 // Arguments is after the return address.
5380 __ add(r0, sp, Operand(1 * kPointerSize)); 5380 __ add(r0, sp, Operand(1 * kPointerSize));
5381 // FunctionCallbackInfo::implicit_args_ 5381 // FunctionCallbackInfo::implicit_args_
5382 __ str(scratch, MemOperand(r0, 0 * kPointerSize)); 5382 __ str(scratch, MemOperand(r0, 0 * kPointerSize));
5383 // FunctionCallbackInfo::values_ 5383 // FunctionCallbackInfo::values_
5384 __ add(ip, scratch, Operand((FCA::kArgsLength - 1 + argc) * kPointerSize)); 5384 __ add(ip, scratch, Operand((FCA::kArgsLength - 1 + argc) * kPointerSize));
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
5424 // -- ... 5424 // -- ...
5425 // -- r2 : api_function_address 5425 // -- r2 : api_function_address
5426 // ----------------------------------- 5426 // -----------------------------------
5427 5427
5428 Register api_function_address = r2; 5428 Register api_function_address = r2;
5429 5429
5430 __ mov(r0, sp); // r0 = Handle<Name> 5430 __ mov(r0, sp); // r0 = Handle<Name>
5431 __ add(r1, r0, Operand(1 * kPointerSize)); // r1 = PCA 5431 __ add(r1, r0, Operand(1 * kPointerSize)); // r1 = PCA
5432 5432
5433 const int kApiStackSpace = 1; 5433 const int kApiStackSpace = 1;
5434 FrameAndConstantPoolScope frame_scope(masm, StackFrame::MANUAL); 5434 FrameScope frame_scope(masm, StackFrame::MANUAL);
5435 __ EnterExitFrame(false, kApiStackSpace); 5435 __ EnterExitFrame(false, kApiStackSpace);
5436 5436
5437 // Create PropertyAccessorInfo instance on the stack above the exit frame with 5437 // Create PropertyAccessorInfo instance on the stack above the exit frame with
5438 // r1 (internal::Object** args_) as the data. 5438 // r1 (internal::Object** args_) as the data.
5439 __ str(r1, MemOperand(sp, 1 * kPointerSize)); 5439 __ str(r1, MemOperand(sp, 1 * kPointerSize));
5440 __ add(r1, sp, Operand(1 * kPointerSize)); // r1 = AccessorInfo& 5440 __ add(r1, sp, Operand(1 * kPointerSize)); // r1 = AccessorInfo&
5441 5441
5442 const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1; 5442 const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1;
5443 5443
5444 Address thunk_address = FUNCTION_ADDR(&InvokeAccessorGetterCallback); 5444 Address thunk_address = FUNCTION_ADDR(&InvokeAccessorGetterCallback);
5445 ExternalReference::Type thunk_type = 5445 ExternalReference::Type thunk_type =
5446 ExternalReference::PROFILING_GETTER_CALL; 5446 ExternalReference::PROFILING_GETTER_CALL;
5447 ApiFunction thunk_fun(thunk_address); 5447 ApiFunction thunk_fun(thunk_address);
5448 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type, 5448 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type,
5449 masm->isolate()); 5449 masm->isolate());
5450 __ CallApiFunctionAndReturn(api_function_address, 5450 __ CallApiFunctionAndReturn(api_function_address,
5451 thunk_ref, 5451 thunk_ref,
5452 kStackUnwindSpace, 5452 kStackUnwindSpace,
5453 MemOperand(fp, 6 * kPointerSize), 5453 MemOperand(fp, 6 * kPointerSize),
5454 NULL); 5454 NULL);
5455 } 5455 }
5456 5456
5457 5457
5458 #undef __ 5458 #undef __
5459 5459
5460 } } // namespace v8::internal 5460 } } // namespace v8::internal
5461 5461
5462 #endif // V8_TARGET_ARCH_ARM 5462 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698