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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 148333003: crankshaft support for api method calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix Created 6 years, 10 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/arm/macro-assembler-arm.h ('k') | src/arm/simulator-arm.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 2282 matching lines...) Expand 10 before | Expand all | Expand 10 after
2293 2293
2294 2294
2295 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { 2295 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
2296 return ref0.address() - ref1.address(); 2296 return ref0.address() - ref1.address();
2297 } 2297 }
2298 2298
2299 2299
2300 void MacroAssembler::CallApiFunctionAndReturn( 2300 void MacroAssembler::CallApiFunctionAndReturn(
2301 Register function_address, 2301 Register function_address,
2302 ExternalReference thunk_ref, 2302 ExternalReference thunk_ref,
2303 Register thunk_last_arg,
2304 int stack_space, 2303 int stack_space,
2305 MemOperand return_value_operand, 2304 MemOperand return_value_operand,
2306 MemOperand* context_restore_operand) { 2305 MemOperand* context_restore_operand) {
2307 ExternalReference next_address = 2306 ExternalReference next_address =
2308 ExternalReference::handle_scope_next_address(isolate()); 2307 ExternalReference::handle_scope_next_address(isolate());
2309 const int kNextOffset = 0; 2308 const int kNextOffset = 0;
2310 const int kLimitOffset = AddressOffset( 2309 const int kLimitOffset = AddressOffset(
2311 ExternalReference::handle_scope_limit_address(isolate()), 2310 ExternalReference::handle_scope_limit_address(isolate()),
2312 next_address); 2311 next_address);
2313 const int kLevelOffset = AddressOffset( 2312 const int kLevelOffset = AddressOffset(
2314 ExternalReference::handle_scope_level_address(isolate()), 2313 ExternalReference::handle_scope_level_address(isolate()),
2315 next_address); 2314 next_address);
2316 2315
2317 ASSERT(function_address.is(r3)); 2316 ASSERT(function_address.is(r1) || function_address.is(r2));
2318 ASSERT(thunk_last_arg.is(r1) || thunk_last_arg.is(r2));
2319 2317
2320 Label profiler_disabled; 2318 Label profiler_disabled;
2321 Label end_profiler_check; 2319 Label end_profiler_check;
2322 bool* is_profiling_flag = 2320 bool* is_profiling_flag =
2323 isolate()->cpu_profiler()->is_profiling_address(); 2321 isolate()->cpu_profiler()->is_profiling_address();
2324 STATIC_ASSERT(sizeof(*is_profiling_flag) == 1); 2322 STATIC_ASSERT(sizeof(*is_profiling_flag) == 1);
2325 mov(r9, Operand(reinterpret_cast<int32_t>(is_profiling_flag))); 2323 mov(r9, Operand(reinterpret_cast<int32_t>(is_profiling_flag)));
2326 ldrb(r9, MemOperand(r9, 0)); 2324 ldrb(r9, MemOperand(r9, 0));
2327 cmp(r9, Operand(0)); 2325 cmp(r9, Operand(0));
2328 b(eq, &profiler_disabled); 2326 b(eq, &profiler_disabled);
(...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after
4076 void CodePatcher::EmitCondition(Condition cond) { 4074 void CodePatcher::EmitCondition(Condition cond) {
4077 Instr instr = Assembler::instr_at(masm_.pc_); 4075 Instr instr = Assembler::instr_at(masm_.pc_);
4078 instr = (instr & ~kCondMask) | cond; 4076 instr = (instr & ~kCondMask) | cond;
4079 masm_.emit(instr); 4077 masm_.emit(instr);
4080 } 4078 }
4081 4079
4082 4080
4083 } } // namespace v8::internal 4081 } } // namespace v8::internal
4084 4082
4085 #endif // V8_TARGET_ARCH_ARM 4083 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/simulator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698