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

Side by Side Diff: src/arm/macro-assembler-arm.h

Issue 1478303002: Revert of [runtime] Replace global object link with native context link in all contexts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/arm/code-stubs-arm.cc ('k') | src/arm/macro-assembler-arm.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 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_ 5 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_
6 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_ 6 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/frames.h" 10 #include "src/frames.h"
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 // remove in a register (or no_reg, if there is nothing to remove). 601 // remove in a register (or no_reg, if there is nothing to remove).
602 void LeaveExitFrame(bool save_doubles, Register argument_count, 602 void LeaveExitFrame(bool save_doubles, Register argument_count,
603 bool restore_context, 603 bool restore_context,
604 bool argument_count_is_length = false); 604 bool argument_count_is_length = false);
605 605
606 // Get the actual activation frame alignment for target environment. 606 // Get the actual activation frame alignment for target environment.
607 static int ActivationFrameAlignment(); 607 static int ActivationFrameAlignment();
608 608
609 void LoadContext(Register dst, int context_chain_length); 609 void LoadContext(Register dst, int context_chain_length);
610 610
611 // Load the global object from the current context.
612 void LoadGlobalObject(Register dst) {
613 LoadNativeContextSlot(Context::EXTENSION_INDEX, dst);
614 }
615
616 // Load the global proxy from the current context. 611 // Load the global proxy from the current context.
617 void LoadGlobalProxy(Register dst) { 612 void LoadGlobalProxy(Register dst);
618 LoadNativeContextSlot(Context::GLOBAL_PROXY_INDEX, dst);
619 }
620 613
621 // Conditionally load the cached Array transitioned map of type 614 // Conditionally load the cached Array transitioned map of type
622 // transitioned_kind from the native context if the map in register 615 // transitioned_kind from the native context if the map in register
623 // map_in_out is the cached Array map in the native context of 616 // map_in_out is the cached Array map in the native context of
624 // expected_kind. 617 // expected_kind.
625 void LoadTransitionedArrayMapConditional( 618 void LoadTransitionedArrayMapConditional(
626 ElementsKind expected_kind, 619 ElementsKind expected_kind,
627 ElementsKind transitioned_kind, 620 ElementsKind transitioned_kind,
628 Register map_in_out, 621 Register map_in_out,
629 Register scratch, 622 Register scratch,
630 Label* no_map_match); 623 Label* no_map_match);
631 624
632 void LoadNativeContextSlot(int index, Register dst); 625 void LoadGlobalFunction(int index, Register function);
633 626
634 // Load the initial map from the global function. The registers 627 // Load the initial map from the global function. The registers
635 // function and map can be the same, function is then overwritten. 628 // function and map can be the same, function is then overwritten.
636 void LoadGlobalFunctionInitialMap(Register function, 629 void LoadGlobalFunctionInitialMap(Register function,
637 Register map, 630 Register map,
638 Register scratch); 631 Register scratch);
639 632
640 void InitializeRootRegister() { 633 void InitializeRootRegister() {
641 ExternalReference roots_array_start = 634 ExternalReference roots_array_start =
642 ExternalReference::roots_array_start(isolate()); 635 ExternalReference::roots_array_start(isolate());
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 void MovFromFloatParameter(DwVfpRegister dst); 1138 void MovFromFloatParameter(DwVfpRegister dst);
1146 void MovFromFloatResult(DwVfpRegister dst); 1139 void MovFromFloatResult(DwVfpRegister dst);
1147 1140
1148 // Jump to a runtime routine. 1141 // Jump to a runtime routine.
1149 void JumpToExternalReference(const ExternalReference& builtin); 1142 void JumpToExternalReference(const ExternalReference& builtin);
1150 1143
1151 // Invoke specified builtin JavaScript function. 1144 // Invoke specified builtin JavaScript function.
1152 void InvokeBuiltin(int native_context_index, InvokeFlag flag, 1145 void InvokeBuiltin(int native_context_index, InvokeFlag flag,
1153 const CallWrapper& call_wrapper = NullCallWrapper()); 1146 const CallWrapper& call_wrapper = NullCallWrapper());
1154 1147
1148 // Store the code object for the given builtin in the target register and
1149 // setup the function in r1.
1150 void GetBuiltinEntry(Register target, int native_context_index);
1151
1152 // Store the function for the given builtin in the target register.
1153 void GetBuiltinFunction(Register target, int native_context_index);
1154
1155 Handle<Object> CodeObject() { 1155 Handle<Object> CodeObject() {
1156 DCHECK(!code_object_.is_null()); 1156 DCHECK(!code_object_.is_null());
1157 return code_object_; 1157 return code_object_;
1158 } 1158 }
1159 1159
1160 1160
1161 // Emit code for a truncating division by a constant. The dividend register is 1161 // Emit code for a truncating division by a constant. The dividend register is
1162 // unchanged and ip gets clobbered. Dividend and result must be different. 1162 // unchanged and ip gets clobbered. Dividend and result must be different.
1163 void TruncatingDiv(Register result, Register dividend, int32_t divisor); 1163 void TruncatingDiv(Register result, Register dividend, int32_t divisor);
1164 1164
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
1526 byte* address_; // The address of the code being patched. 1526 byte* address_; // The address of the code being patched.
1527 int size_; // Number of bytes of the expected patch size. 1527 int size_; // Number of bytes of the expected patch size.
1528 MacroAssembler masm_; // Macro assembler used to generate the code. 1528 MacroAssembler masm_; // Macro assembler used to generate the code.
1529 FlushICache flush_cache_; // Whether to flush the I cache after patching. 1529 FlushICache flush_cache_; // Whether to flush the I cache after patching.
1530 }; 1530 };
1531 1531
1532 1532
1533 // ----------------------------------------------------------------------------- 1533 // -----------------------------------------------------------------------------
1534 // Static helper functions. 1534 // Static helper functions.
1535 1535
1536 inline MemOperand ContextMemOperand(Register context, int index = 0) { 1536 inline MemOperand ContextOperand(Register context, int index = 0) {
1537 return MemOperand(context, Context::SlotOffset(index)); 1537 return MemOperand(context, Context::SlotOffset(index));
1538 } 1538 }
1539 1539
1540 1540
1541 inline MemOperand NativeContextMemOperand() { 1541 inline MemOperand GlobalObjectOperand() {
1542 return ContextMemOperand(cp, Context::NATIVE_CONTEXT_INDEX); 1542 return ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX);
1543 } 1543 }
1544 1544
1545 1545
1546 #ifdef GENERATED_CODE_COVERAGE 1546 #ifdef GENERATED_CODE_COVERAGE
1547 #define CODE_COVERAGE_STRINGIFY(x) #x 1547 #define CODE_COVERAGE_STRINGIFY(x) #x
1548 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) 1548 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
1549 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 1549 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
1550 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 1550 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
1551 #else 1551 #else
1552 #define ACCESS_MASM(masm) masm-> 1552 #define ACCESS_MASM(masm) masm->
1553 #endif 1553 #endif
1554 1554
1555 1555
1556 } // namespace internal 1556 } // namespace internal
1557 } // namespace v8 1557 } // namespace v8
1558 1558
1559 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ 1559 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698