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

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

Issue 3120006: Put direct code pointers into JSFunction objects. This is a first step... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 4 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/serialize.h ('k') | src/x64/codegen-x64.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 __ bind(&function); 303 __ bind(&function);
304 } 304 }
305 305
306 // 5b. Get the code to call from the function and check that the number of 306 // 5b. Get the code to call from the function and check that the number of
307 // expected arguments matches what we're providing. If so, jump 307 // expected arguments matches what we're providing. If so, jump
308 // (tail-call) to the code in register edx without checking arguments. 308 // (tail-call) to the code in register edx without checking arguments.
309 __ movq(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); 309 __ movq(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset));
310 __ movsxlq(rbx, 310 __ movsxlq(rbx,
311 FieldOperand(rdx, 311 FieldOperand(rdx,
312 SharedFunctionInfo::kFormalParameterCountOffset)); 312 SharedFunctionInfo::kFormalParameterCountOffset));
313 __ movq(rdx, FieldOperand(rdx, SharedFunctionInfo::kCodeOffset)); 313 __ movq(rdx, FieldOperand(rdi, JSFunction::kCodeOffset));
314 __ lea(rdx, FieldOperand(rdx, Code::kHeaderSize)); 314 __ lea(rdx, FieldOperand(rdx, Code::kHeaderSize));
315 __ cmpq(rax, rbx); 315 __ cmpq(rax, rbx);
316 __ j(not_equal, 316 __ j(not_equal,
317 Handle<Code>(builtin(ArgumentsAdaptorTrampoline)), 317 Handle<Code>(builtin(ArgumentsAdaptorTrampoline)),
318 RelocInfo::CODE_TARGET); 318 RelocInfo::CODE_TARGET);
319 319
320 ParameterCount expected(0); 320 ParameterCount expected(0);
321 __ InvokeCode(rdx, expected, expected, JUMP_FUNCTION); 321 __ InvokeCode(rdx, expected, expected, JUMP_FUNCTION);
322 } 322 }
323 323
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 } 1287 }
1288 1288
1289 1289
1290 void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) { 1290 void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) {
1291 Generate_JSEntryTrampolineHelper(masm, true); 1291 Generate_JSEntryTrampolineHelper(masm, true);
1292 } 1292 }
1293 1293
1294 } } // namespace v8::internal 1294 } } // namespace v8::internal
1295 1295
1296 #endif // V8_TARGET_ARCH_X64 1296 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/serialize.h ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698