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

Side by Side Diff: src/crankshaft/arm64/lithium-codegen-arm64.cc

Issue 1406113007: Merge GlobalObject with JSGlobalObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/crankshaft/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/hydrogen.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 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h"
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 // Sloppy mode functions and builtins need to replace the receiver with the 636 // Sloppy mode functions and builtins need to replace the receiver with the
637 // global proxy when called as functions (without an explicit receiver 637 // global proxy when called as functions (without an explicit receiver
638 // object). 638 // object).
639 if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) { 639 if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) {
640 Label ok; 640 Label ok;
641 int receiver_offset = info_->scope()->num_parameters() * kXRegSize; 641 int receiver_offset = info_->scope()->num_parameters() * kXRegSize;
642 __ Peek(x10, receiver_offset); 642 __ Peek(x10, receiver_offset);
643 __ JumpIfNotRoot(x10, Heap::kUndefinedValueRootIndex, &ok); 643 __ JumpIfNotRoot(x10, Heap::kUndefinedValueRootIndex, &ok);
644 644
645 __ Ldr(x10, GlobalObjectMemOperand()); 645 __ Ldr(x10, GlobalObjectMemOperand());
646 __ Ldr(x10, FieldMemOperand(x10, GlobalObject::kGlobalProxyOffset)); 646 __ Ldr(x10, FieldMemOperand(x10, JSGlobalObject::kGlobalProxyOffset));
647 __ Poke(x10, receiver_offset); 647 __ Poke(x10, receiver_offset);
648 648
649 __ Bind(&ok); 649 __ Bind(&ok);
650 } 650 }
651 } 651 }
652 652
653 DCHECK(__ StackPointer().Is(jssp)); 653 DCHECK(__ StackPointer().Is(jssp));
654 info()->set_prologue_offset(masm_->pc_offset()); 654 info()->set_prologue_offset(masm_->pc_offset());
655 if (NeedsEagerFrame()) { 655 if (NeedsEagerFrame()) {
656 if (info()->IsStub()) { 656 if (info()->IsStub()) {
(...skipping 5209 matching lines...) Expand 10 before | Expand all | Expand 10 after
5866 5866
5867 // Deoptimize if the receiver is not a JS object. 5867 // Deoptimize if the receiver is not a JS object.
5868 DeoptimizeIfSmi(receiver, instr, Deoptimizer::kSmi); 5868 DeoptimizeIfSmi(receiver, instr, Deoptimizer::kSmi);
5869 __ CompareObjectType(receiver, result, result, FIRST_SPEC_OBJECT_TYPE); 5869 __ CompareObjectType(receiver, result, result, FIRST_SPEC_OBJECT_TYPE);
5870 __ B(ge, &copy_receiver); 5870 __ B(ge, &copy_receiver);
5871 Deoptimize(instr, Deoptimizer::kNotAJavaScriptObject); 5871 Deoptimize(instr, Deoptimizer::kNotAJavaScriptObject);
5872 5872
5873 __ Bind(&global_object); 5873 __ Bind(&global_object);
5874 __ Ldr(result, FieldMemOperand(function, JSFunction::kContextOffset)); 5874 __ Ldr(result, FieldMemOperand(function, JSFunction::kContextOffset));
5875 __ Ldr(result, ContextMemOperand(result, Context::GLOBAL_OBJECT_INDEX)); 5875 __ Ldr(result, ContextMemOperand(result, Context::GLOBAL_OBJECT_INDEX));
5876 __ Ldr(result, FieldMemOperand(result, GlobalObject::kGlobalProxyOffset)); 5876 __ Ldr(result, FieldMemOperand(result, JSGlobalObject::kGlobalProxyOffset));
5877 __ B(&done); 5877 __ B(&done);
5878 5878
5879 __ Bind(&copy_receiver); 5879 __ Bind(&copy_receiver);
5880 __ Mov(result, receiver); 5880 __ Mov(result, receiver);
5881 __ Bind(&done); 5881 __ Bind(&done);
5882 } 5882 }
5883 5883
5884 5884
5885 void LCodeGen::DoDeferredLoadMutableDouble(LLoadFieldByIndex* instr, 5885 void LCodeGen::DoDeferredLoadMutableDouble(LLoadFieldByIndex* instr,
5886 Register result, 5886 Register result,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
5968 Handle<ScopeInfo> scope_info = instr->scope_info(); 5968 Handle<ScopeInfo> scope_info = instr->scope_info();
5969 __ Push(scope_info); 5969 __ Push(scope_info);
5970 __ Push(ToRegister(instr->function())); 5970 __ Push(ToRegister(instr->function()));
5971 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5971 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5972 RecordSafepoint(Safepoint::kNoLazyDeopt); 5972 RecordSafepoint(Safepoint::kNoLazyDeopt);
5973 } 5973 }
5974 5974
5975 5975
5976 } // namespace internal 5976 } // namespace internal
5977 } // namespace v8 5977 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698