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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.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/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.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 // 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
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 4209 matching lines...) Expand 10 before | Expand all | Expand 10 after
4220 ExternalReference debug_is_active = 4220 ExternalReference debug_is_active =
4221 ExternalReference::debug_is_active_address(isolate()); 4221 ExternalReference::debug_is_active_address(isolate());
4222 __ Mov(x10, debug_is_active); 4222 __ Mov(x10, debug_is_active);
4223 __ Ldrb(x0, MemOperand(x10)); 4223 __ Ldrb(x0, MemOperand(x10));
4224 __ SmiTag(x0); 4224 __ SmiTag(x0);
4225 context()->Plug(x0); 4225 context()->Plug(x0);
4226 } 4226 }
4227 4227
4228 4228
4229 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { 4229 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) {
4230 // Push the builtins object as the receiver. 4230 // Push undefined as the receiver.
4231 __ Ldr(x10, GlobalObjectMemOperand()); 4231 __ LoadRoot(x0, Heap::kUndefinedValueRootIndex);
4232 __ Ldr(LoadDescriptor::ReceiverRegister(), 4232 __ Push(x0);
4233 FieldMemOperand(x10, GlobalObject::kBuiltinsOffset));
4234 __ Push(LoadDescriptor::ReceiverRegister());
4235 4233
4236 // Load the function from the receiver. 4234 __ Ldr(x0, GlobalObjectMemOperand());
4237 Handle<String> name = expr->name(); 4235 __ Ldr(x0, FieldMemOperand(x0, GlobalObject::kNativeContextOffset));
4238 __ Mov(LoadDescriptor::NameRegister(), Operand(name)); 4236 __ Ldr(x0, ContextMemOperand(x0, expr->context_index()));
4239 __ Mov(LoadDescriptor::SlotRegister(),
4240 SmiFromSlot(expr->CallRuntimeFeedbackSlot()));
4241 CallLoadIC(NOT_INSIDE_TYPEOF);
4242 } 4237 }
4243 4238
4244 4239
4245 void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) { 4240 void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) {
4246 ZoneList<Expression*>* args = expr->arguments(); 4241 ZoneList<Expression*>* args = expr->arguments();
4247 int arg_count = args->length(); 4242 int arg_count = args->length();
4248 4243
4249 SetCallPosition(expr, arg_count); 4244 SetCallPosition(expr, arg_count);
4250 CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); 4245 CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS);
4251 __ Peek(x1, (arg_count + 1) * kPointerSize); 4246 __ Peek(x1, (arg_count + 1) * kPointerSize);
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
5401 } 5396 }
5402 5397
5403 return INTERRUPT; 5398 return INTERRUPT;
5404 } 5399 }
5405 5400
5406 5401
5407 } // namespace internal 5402 } // namespace internal
5408 } // namespace v8 5403 } // namespace v8
5409 5404
5410 #endif // V8_TARGET_ARCH_ARM64 5405 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698