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

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

Issue 24031003: remove most uses of Isolate::Current in arch specific files (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: nit Created 7 years, 3 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/x64/code-stubs-x64.h ('k') | src/x64/debug-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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 ASSERT(IsPowerOf2(TranscendentalCache::SubCache::kCacheSize)); 1193 ASSERT(IsPowerOf2(TranscendentalCache::SubCache::kCacheSize));
1194 __ andl(rcx, Immediate(TranscendentalCache::SubCache::kCacheSize - 1)); 1194 __ andl(rcx, Immediate(TranscendentalCache::SubCache::kCacheSize - 1));
1195 1195
1196 // ST[0] == double value. 1196 // ST[0] == double value.
1197 // rbx = bits of double value. 1197 // rbx = bits of double value.
1198 // rcx = TranscendentalCache::hash(double value). 1198 // rcx = TranscendentalCache::hash(double value).
1199 ExternalReference cache_array = 1199 ExternalReference cache_array =
1200 ExternalReference::transcendental_cache_array_address(masm->isolate()); 1200 ExternalReference::transcendental_cache_array_address(masm->isolate());
1201 __ movq(rax, cache_array); 1201 __ movq(rax, cache_array);
1202 int cache_array_index = 1202 int cache_array_index =
1203 type_ * sizeof(Isolate::Current()->transcendental_cache()->caches_[0]); 1203 type_ * sizeof(masm->isolate()->transcendental_cache()->caches_[0]);
1204 __ movq(rax, Operand(rax, cache_array_index)); 1204 __ movq(rax, Operand(rax, cache_array_index));
1205 // rax points to the cache for the type type_. 1205 // rax points to the cache for the type type_.
1206 // If NULL, the cache hasn't been initialized yet, so go through runtime. 1206 // If NULL, the cache hasn't been initialized yet, so go through runtime.
1207 __ testq(rax, rax); 1207 __ testq(rax, rax);
1208 __ j(zero, &runtime_call_clear_stack); // Only clears stack if TAGGED. 1208 __ j(zero, &runtime_call_clear_stack); // Only clears stack if TAGGED.
1209 #ifdef DEBUG 1209 #ifdef DEBUG
1210 // Check that the layout of cache elements match expectations. 1210 // Check that the layout of cache elements match expectations.
1211 { // NOLINT - doesn't like a single brace on a line. 1211 { // NOLINT - doesn't like a single brace on a line.
1212 TranscendentalCache::SubCache::Element test_elem[2]; 1212 TranscendentalCache::SubCache::Element test_elem[2];
1213 char* elem_start = reinterpret_cast<char*>(&test_elem[0]); 1213 char* elem_start = reinterpret_cast<char*>(&test_elem[0]);
(...skipping 2269 matching lines...) Expand 10 before | Expand all | Expand 10 after
3483 3483
3484 // CALL_NON_FUNCTION expects the non-function callee as receiver (instead 3484 // CALL_NON_FUNCTION expects the non-function callee as receiver (instead
3485 // of the original receiver from the call site). 3485 // of the original receiver from the call site).
3486 __ bind(&non_function); 3486 __ bind(&non_function);
3487 __ movq(args.GetReceiverOperand(), rdi); 3487 __ movq(args.GetReceiverOperand(), rdi);
3488 __ Set(rax, argc_); 3488 __ Set(rax, argc_);
3489 __ Set(rbx, 0); 3489 __ Set(rbx, 0);
3490 __ SetCallKind(rcx, CALL_AS_METHOD); 3490 __ SetCallKind(rcx, CALL_AS_METHOD);
3491 __ GetBuiltinEntry(rdx, Builtins::CALL_NON_FUNCTION); 3491 __ GetBuiltinEntry(rdx, Builtins::CALL_NON_FUNCTION);
3492 Handle<Code> adaptor = 3492 Handle<Code> adaptor =
3493 Isolate::Current()->builtins()->ArgumentsAdaptorTrampoline(); 3493 isolate->builtins()->ArgumentsAdaptorTrampoline();
3494 __ Jump(adaptor, RelocInfo::CODE_TARGET); 3494 __ Jump(adaptor, RelocInfo::CODE_TARGET);
3495 } 3495 }
3496 3496
3497 3497
3498 void CallConstructStub::Generate(MacroAssembler* masm) { 3498 void CallConstructStub::Generate(MacroAssembler* masm) {
3499 // rax : number of arguments 3499 // rax : number of arguments
3500 // rbx : cache cell for call target 3500 // rbx : cache cell for call target
3501 // rdi : constructor function 3501 // rdi : constructor function
3502 Label slow, non_function_call; 3502 Label slow, non_function_call;
3503 3503
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
3538 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), 3538 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(),
3539 RelocInfo::CODE_TARGET); 3539 RelocInfo::CODE_TARGET);
3540 } 3540 }
3541 3541
3542 3542
3543 bool CEntryStub::NeedsImmovableCode() { 3543 bool CEntryStub::NeedsImmovableCode() {
3544 return false; 3544 return false;
3545 } 3545 }
3546 3546
3547 3547
3548 bool CEntryStub::IsPregenerated() { 3548 bool CEntryStub::IsPregenerated(Isolate* isolate) {
3549 #ifdef _WIN64 3549 #ifdef _WIN64
3550 return result_size_ == 1; 3550 return result_size_ == 1;
3551 #else 3551 #else
3552 return true; 3552 return true;
3553 #endif 3553 #endif
3554 } 3554 }
3555 3555
3556 3556
3557 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) { 3557 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
3558 CEntryStub::GenerateAheadOfTime(isolate); 3558 CEntryStub::GenerateAheadOfTime(isolate);
(...skipping 2371 matching lines...) Expand 10 before | Expand all | Expand 10 after
5930 // StringAddStub::Generate 5930 // StringAddStub::Generate
5931 { REG(rcx), REG(rdx), REG(rbx), EMIT_REMEMBERED_SET}, 5931 { REG(rcx), REG(rdx), REG(rbx), EMIT_REMEMBERED_SET},
5932 // StringAddStub::Generate 5932 // StringAddStub::Generate
5933 { REG(rcx), REG(rax), REG(rbx), EMIT_REMEMBERED_SET}, 5933 { REG(rcx), REG(rax), REG(rbx), EMIT_REMEMBERED_SET},
5934 // Null termination. 5934 // Null termination.
5935 { REG(no_reg), REG(no_reg), REG(no_reg), EMIT_REMEMBERED_SET} 5935 { REG(no_reg), REG(no_reg), REG(no_reg), EMIT_REMEMBERED_SET}
5936 }; 5936 };
5937 5937
5938 #undef REG 5938 #undef REG
5939 5939
5940 bool RecordWriteStub::IsPregenerated() { 5940 bool RecordWriteStub::IsPregenerated(Isolate* isolate) {
5941 for (AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; 5941 for (AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime;
5942 !entry->object.is(no_reg); 5942 !entry->object.is(no_reg);
5943 entry++) { 5943 entry++) {
5944 if (object_.is(entry->object) && 5944 if (object_.is(entry->object) &&
5945 value_.is(entry->value) && 5945 value_.is(entry->value) &&
5946 address_.is(entry->address) && 5946 address_.is(entry->address) &&
5947 remembered_set_action_ == entry->action && 5947 remembered_set_action_ == entry->action &&
5948 save_fp_regs_mode_ == kDontSaveFPRegs) { 5948 save_fp_regs_mode_ == kDontSaveFPRegs) {
5949 return true; 5949 return true;
5950 } 5950 }
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
6621 __ bind(&fast_elements_case); 6621 __ bind(&fast_elements_case);
6622 GenerateCase(masm, FAST_ELEMENTS); 6622 GenerateCase(masm, FAST_ELEMENTS);
6623 } 6623 }
6624 6624
6625 6625
6626 #undef __ 6626 #undef __
6627 6627
6628 } } // namespace v8::internal 6628 } } // namespace v8::internal
6629 6629
6630 #endif // V8_TARGET_ARCH_X64 6630 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.h ('k') | src/x64/debug-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698