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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.cc

Issue 1306993003: Call JS functions via native context instead of js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 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
« no previous file with comments | « src/date.js ('k') | src/full-codegen/arm64/full-codegen-arm64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 4513 matching lines...) Expand 10 before | Expand all | Expand 10 after
4524 ExternalReference debug_is_active = 4524 ExternalReference debug_is_active =
4525 ExternalReference::debug_is_active_address(isolate()); 4525 ExternalReference::debug_is_active_address(isolate());
4526 __ mov(ip, Operand(debug_is_active)); 4526 __ mov(ip, Operand(debug_is_active));
4527 __ ldrb(r0, MemOperand(ip)); 4527 __ ldrb(r0, MemOperand(ip));
4528 __ SmiTag(r0); 4528 __ SmiTag(r0);
4529 context()->Plug(r0); 4529 context()->Plug(r0);
4530 } 4530 }
4531 4531
4532 4532
4533 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { 4533 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) {
4534 // Push the builtins object as the receiver. 4534 // Push undefined as the receiver.
4535 Register receiver = LoadDescriptor::ReceiverRegister(); 4535 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex);
4536 __ ldr(receiver, GlobalObjectOperand()); 4536 __ push(r0);
4537 __ ldr(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset));
4538 __ push(receiver);
4539 4537
4540 // Load the function from the receiver. 4538 __ ldr(r0, GlobalObjectOperand());
4541 __ mov(LoadDescriptor::NameRegister(), Operand(expr->name())); 4539 __ ldr(r0, FieldMemOperand(r0, GlobalObject::kNativeContextOffset));
4542 __ mov(LoadDescriptor::SlotRegister(), 4540 __ ldr(r0, ContextOperand(r0, expr->context_index()));
4543 Operand(SmiFromSlot(expr->CallRuntimeFeedbackSlot())));
4544 CallLoadIC(NOT_INSIDE_TYPEOF);
4545 } 4541 }
4546 4542
4547 4543
4548 void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) { 4544 void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) {
4549 ZoneList<Expression*>* args = expr->arguments(); 4545 ZoneList<Expression*>* args = expr->arguments();
4550 int arg_count = args->length(); 4546 int arg_count = args->length();
4551 4547
4552 SetCallPosition(expr, arg_count); 4548 SetCallPosition(expr, arg_count);
4553 CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); 4549 CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS);
4554 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize)); 4550 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize));
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
5413 DCHECK(interrupt_address == 5409 DCHECK(interrupt_address ==
5414 isolate->builtins()->OsrAfterStackCheck()->entry()); 5410 isolate->builtins()->OsrAfterStackCheck()->entry());
5415 return OSR_AFTER_STACK_CHECK; 5411 return OSR_AFTER_STACK_CHECK;
5416 } 5412 }
5417 5413
5418 5414
5419 } // namespace internal 5415 } // namespace internal
5420 } // namespace v8 5416 } // namespace v8
5421 5417
5422 #endif // V8_TARGET_ARCH_ARM 5418 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/date.js ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698