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

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

Powered by Google App Engine
This is Rietveld 408576698