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

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

Issue 9297019: Fix and adapt debugger for new call target caches. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | « no previous file | src/arm/debug-arm.cc » ('j') | src/code-stubs.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 5225 matching lines...) Expand 10 before | Expand all | Expand 10 after
5236 __ str(r1, MemOperand(sp, argc_ * kPointerSize)); 5236 __ str(r1, MemOperand(sp, argc_ * kPointerSize));
5237 __ mov(r0, Operand(argc_)); // Set up the number of arguments. 5237 __ mov(r0, Operand(argc_)); // Set up the number of arguments.
5238 __ mov(r2, Operand(0, RelocInfo::NONE)); 5238 __ mov(r2, Operand(0, RelocInfo::NONE));
5239 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION); 5239 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION);
5240 __ SetCallKind(r5, CALL_AS_METHOD); 5240 __ SetCallKind(r5, CALL_AS_METHOD);
5241 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), 5241 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(),
5242 RelocInfo::CODE_TARGET); 5242 RelocInfo::CODE_TARGET);
5243 } 5243 }
5244 5244
5245 5245
5246 void CallFunctionStub::FinishCode(Handle<Code> code) {
5247 code->set_has_function_cache(RecordCallTarget());
5248 }
5249
5250
5246 void CallConstructStub::Generate(MacroAssembler* masm) { 5251 void CallConstructStub::Generate(MacroAssembler* masm) {
5247 // r0 : number of arguments 5252 // r0 : number of arguments
5248 // r1 : the function to call 5253 // r1 : the function to call
5249 // r2 : cache cell for call target 5254 // r2 : cache cell for call target
5250 Label slow, non_function_call; 5255 Label slow, non_function_call;
5251 5256
5252 // Check that the function is not a smi. 5257 // Check that the function is not a smi.
5253 __ JumpIfSmi(r1, &non_function_call); 5258 __ JumpIfSmi(r1, &non_function_call);
5254 // Check that the function is a JSFunction. 5259 // Check that the function is a JSFunction.
5255 __ CompareObjectType(r1, r3, r3, JS_FUNCTION_TYPE); 5260 __ CompareObjectType(r1, r3, r3, JS_FUNCTION_TYPE);
(...skipping 22 matching lines...) Expand all
5278 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR); 5283 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR);
5279 __ bind(&do_call); 5284 __ bind(&do_call);
5280 // Set expected number of arguments to zero (not changing r0). 5285 // Set expected number of arguments to zero (not changing r0).
5281 __ mov(r2, Operand(0, RelocInfo::NONE)); 5286 __ mov(r2, Operand(0, RelocInfo::NONE));
5282 __ SetCallKind(r5, CALL_AS_METHOD); 5287 __ SetCallKind(r5, CALL_AS_METHOD);
5283 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), 5288 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(),
5284 RelocInfo::CODE_TARGET); 5289 RelocInfo::CODE_TARGET);
5285 } 5290 }
5286 5291
5287 5292
5293 void CallConstructStub::FinishCode(Handle<Code> code) {
5294 code->set_has_function_cache(RecordCallTarget());
5295 }
5296
5297
5288 // Unfortunately you have to run without snapshots to see most of these 5298 // Unfortunately you have to run without snapshots to see most of these
5289 // names in the profile since most compare stubs end up in the snapshot. 5299 // names in the profile since most compare stubs end up in the snapshot.
5290 void CompareStub::PrintName(StringStream* stream) { 5300 void CompareStub::PrintName(StringStream* stream) {
5291 ASSERT((lhs_.is(r0) && rhs_.is(r1)) || 5301 ASSERT((lhs_.is(r0) && rhs_.is(r1)) ||
5292 (lhs_.is(r1) && rhs_.is(r0))); 5302 (lhs_.is(r1) && rhs_.is(r0)));
5293 const char* cc_name; 5303 const char* cc_name;
5294 switch (cc_) { 5304 switch (cc_) {
5295 case lt: cc_name = "LT"; break; 5305 case lt: cc_name = "LT"; break;
5296 case gt: cc_name = "GT"; break; 5306 case gt: cc_name = "GT"; break;
5297 case le: cc_name = "LE"; break; 5307 case le: cc_name = "LE"; break;
(...skipping 2082 matching lines...) Expand 10 before | Expand all | Expand 10 after
7380 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r10, 7390 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r10,
7381 &slow_elements); 7391 &slow_elements);
7382 __ Ret(); 7392 __ Ret();
7383 } 7393 }
7384 7394
7385 #undef __ 7395 #undef __
7386 7396
7387 } } // namespace v8::internal 7397 } } // namespace v8::internal
7388 7398
7389 #endif // V8_TARGET_ARCH_ARM 7399 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/debug-arm.cc » ('j') | src/code-stubs.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698