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

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

Issue 6717018: Introduce accessors on builtins instance (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix tests and lint. Created 9 years, 9 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/builtins-arm.cc ('k') | src/arm/codegen-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 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 4478 matching lines...) Expand 10 before | Expand all | Expand 10 after
4489 // Notice that we cannot store a reference to the trampoline code directly in 4489 // Notice that we cannot store a reference to the trampoline code directly in
4490 // this stub, because runtime stubs are not traversed when doing GC. 4490 // this stub, because runtime stubs are not traversed when doing GC.
4491 4491
4492 // Expected registers by Builtins::JSEntryTrampoline 4492 // Expected registers by Builtins::JSEntryTrampoline
4493 // r0: code entry 4493 // r0: code entry
4494 // r1: function 4494 // r1: function
4495 // r2: receiver 4495 // r2: receiver
4496 // r3: argc 4496 // r3: argc
4497 // r4: argv 4497 // r4: argv
4498 if (is_construct) { 4498 if (is_construct) {
4499 ExternalReference construct_entry(Builtins::JSConstructEntryTrampoline, 4499 ExternalReference construct_entry(Builtins::kJSConstructEntryTrampoline,
4500 isolate); 4500 isolate);
4501 __ mov(ip, Operand(construct_entry)); 4501 __ mov(ip, Operand(construct_entry));
4502 } else { 4502 } else {
4503 ExternalReference entry(Builtins::JSEntryTrampoline, isolate); 4503 ExternalReference entry(Builtins::kJSEntryTrampoline, isolate);
4504 __ mov(ip, Operand(entry)); 4504 __ mov(ip, Operand(entry));
4505 } 4505 }
4506 __ ldr(ip, MemOperand(ip)); // deref address 4506 __ ldr(ip, MemOperand(ip)); // deref address
4507 4507
4508 // Branch and link to JSEntryTrampoline. We don't use the double underscore 4508 // Branch and link to JSEntryTrampoline. We don't use the double underscore
4509 // macro for the add instruction because we don't want the coverage tool 4509 // macro for the add instruction because we don't want the coverage tool
4510 // inserting instructions here after we read the pc. 4510 // inserting instructions here after we read the pc.
4511 __ mov(lr, Operand(pc)); 4511 __ mov(lr, Operand(pc));
4512 masm->add(pc, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); 4512 masm->add(pc, ip, Operand(Code::kHeaderSize - kHeapObjectTag));
4513 4513
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
5392 __ InvokeFunction(r1, actual, JUMP_FUNCTION); 5392 __ InvokeFunction(r1, actual, JUMP_FUNCTION);
5393 5393
5394 // Slow-case: Non-function called. 5394 // Slow-case: Non-function called.
5395 __ bind(&slow); 5395 __ bind(&slow);
5396 // CALL_NON_FUNCTION expects the non-function callee as receiver (instead 5396 // CALL_NON_FUNCTION expects the non-function callee as receiver (instead
5397 // of the original receiver from the call site). 5397 // of the original receiver from the call site).
5398 __ str(r1, MemOperand(sp, argc_ * kPointerSize)); 5398 __ str(r1, MemOperand(sp, argc_ * kPointerSize));
5399 __ mov(r0, Operand(argc_)); // Setup the number of arguments. 5399 __ mov(r0, Operand(argc_)); // Setup the number of arguments.
5400 __ mov(r2, Operand(0, RelocInfo::NONE)); 5400 __ mov(r2, Operand(0, RelocInfo::NONE));
5401 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION); 5401 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION);
5402 __ Jump(Handle<Code>(Isolate::Current()->builtins()->builtin( 5402 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(),
5403 Builtins::ArgumentsAdaptorTrampoline)),
5404 RelocInfo::CODE_TARGET); 5403 RelocInfo::CODE_TARGET);
5405 } 5404 }
5406 5405
5407 5406
5408 // Unfortunately you have to run without snapshots to see most of these 5407 // Unfortunately you have to run without snapshots to see most of these
5409 // names in the profile since most compare stubs end up in the snapshot. 5408 // names in the profile since most compare stubs end up in the snapshot.
5410 const char* CompareStub::GetName() { 5409 const char* CompareStub::GetName() {
5411 ASSERT((lhs_.is(r0) && rhs_.is(r1)) || 5410 ASSERT((lhs_.is(r0) && rhs_.is(r1)) ||
5412 (lhs_.is(r1) && rhs_.is(r0))); 5411 (lhs_.is(r1) && rhs_.is(r0)));
5413 5412
(...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after
6864 __ str(pc, MemOperand(sp, 0)); 6863 __ str(pc, MemOperand(sp, 0));
6865 __ Jump(target); // Call the C++ function. 6864 __ Jump(target); // Call the C++ function.
6866 } 6865 }
6867 6866
6868 6867
6869 #undef __ 6868 #undef __
6870 6869
6871 } } // namespace v8::internal 6870 } } // namespace v8::internal
6872 6871
6873 #endif // V8_TARGET_ARCH_ARM 6872 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/arm/codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698