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

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

Issue 254783003: Convert function.name to API-style accessor and make CallApiGetterStub serializable. (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 | « src/ia32/macro-assembler-ia32.cc ('k') | src/mips/macro-assembler-mips.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 // 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 5310 matching lines...) Expand 10 before | Expand all | Expand 10 after
5321 // FunctionCallbackInfo::values_ 5321 // FunctionCallbackInfo::values_
5322 __ Addu(at, scratch, Operand((FCA::kArgsLength - 1 + argc) * kPointerSize)); 5322 __ Addu(at, scratch, Operand((FCA::kArgsLength - 1 + argc) * kPointerSize));
5323 __ sw(at, MemOperand(a0, 1 * kPointerSize)); 5323 __ sw(at, MemOperand(a0, 1 * kPointerSize));
5324 // FunctionCallbackInfo::length_ = argc 5324 // FunctionCallbackInfo::length_ = argc
5325 __ li(at, Operand(argc)); 5325 __ li(at, Operand(argc));
5326 __ sw(at, MemOperand(a0, 2 * kPointerSize)); 5326 __ sw(at, MemOperand(a0, 2 * kPointerSize));
5327 // FunctionCallbackInfo::is_construct_call = 0 5327 // FunctionCallbackInfo::is_construct_call = 0
5328 __ sw(zero_reg, MemOperand(a0, 3 * kPointerSize)); 5328 __ sw(zero_reg, MemOperand(a0, 3 * kPointerSize));
5329 5329
5330 const int kStackUnwindSpace = argc + FCA::kArgsLength + 1; 5330 const int kStackUnwindSpace = argc + FCA::kArgsLength + 1;
5331 Address thunk_address = FUNCTION_ADDR(&InvokeFunctionCallback); 5331 ExternalReference thunk_ref =
5332 ExternalReference::Type thunk_type = ExternalReference::PROFILING_API_CALL; 5332 ExternalReference::invoke_function_callback(isolate());
5333 ApiFunction thunk_fun(thunk_address);
5334 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type,
5335 masm->isolate());
5336 5333
5337 AllowExternalCallThatCantCauseGC scope(masm); 5334 AllowExternalCallThatCantCauseGC scope(masm);
5338 MemOperand context_restore_operand( 5335 MemOperand context_restore_operand(
5339 fp, (2 + FCA::kContextSaveIndex) * kPointerSize); 5336 fp, (2 + FCA::kContextSaveIndex) * kPointerSize);
5340 // Stores return the first js argument. 5337 // Stores return the first js argument.
5341 int return_value_offset = 0; 5338 int return_value_offset = 0;
5342 if (is_store) { 5339 if (is_store) {
5343 return_value_offset = 2 + FCA::kArgsLength; 5340 return_value_offset = 2 + FCA::kArgsLength;
5344 } else { 5341 } else {
5345 return_value_offset = 2 + FCA::kReturnValueOffset; 5342 return_value_offset = 2 + FCA::kReturnValueOffset;
(...skipping 25 matching lines...) Expand all
5371 FrameScope frame_scope(masm, StackFrame::MANUAL); 5368 FrameScope frame_scope(masm, StackFrame::MANUAL);
5372 __ EnterExitFrame(false, kApiStackSpace); 5369 __ EnterExitFrame(false, kApiStackSpace);
5373 5370
5374 // Create PropertyAccessorInfo instance on the stack above the exit frame with 5371 // Create PropertyAccessorInfo instance on the stack above the exit frame with
5375 // a1 (internal::Object** args_) as the data. 5372 // a1 (internal::Object** args_) as the data.
5376 __ sw(a1, MemOperand(sp, 1 * kPointerSize)); 5373 __ sw(a1, MemOperand(sp, 1 * kPointerSize));
5377 __ Addu(a1, sp, Operand(1 * kPointerSize)); // a1 = AccessorInfo& 5374 __ Addu(a1, sp, Operand(1 * kPointerSize)); // a1 = AccessorInfo&
5378 5375
5379 const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1; 5376 const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1;
5380 5377
5381 Address thunk_address = FUNCTION_ADDR(&InvokeAccessorGetterCallback); 5378 ExternalReference thunk_ref =
5382 ExternalReference::Type thunk_type = 5379 ExternalReference::invoke_accessor_getter_callback(isolate());
5383 ExternalReference::PROFILING_GETTER_CALL;
5384 ApiFunction thunk_fun(thunk_address);
5385 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type,
5386 masm->isolate());
5387 __ CallApiFunctionAndReturn(api_function_address, 5380 __ CallApiFunctionAndReturn(api_function_address,
5388 thunk_ref, 5381 thunk_ref,
5389 kStackUnwindSpace, 5382 kStackUnwindSpace,
5390 MemOperand(fp, 6 * kPointerSize), 5383 MemOperand(fp, 6 * kPointerSize),
5391 NULL); 5384 NULL);
5392 } 5385 }
5393 5386
5394 5387
5395 #undef __ 5388 #undef __
5396 5389
5397 } } // namespace v8::internal 5390 } } // namespace v8::internal
5398 5391
5399 #endif // V8_TARGET_ARCH_MIPS 5392 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698