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

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

Issue 2732273003: Disentangle assembler from isolate. (Closed)
Patch Set: Address feedback. Created 3 years, 9 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/ia32/deoptimizer-ia32.cc ('k') | src/ia32/macro-assembler-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 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_IA32_MACRO_ASSEMBLER_IA32_H_ 5 #ifndef V8_IA32_MACRO_ASSEMBLER_IA32_H_
6 #define V8_IA32_MACRO_ASSEMBLER_IA32_H_ 6 #define V8_IA32_MACRO_ASSEMBLER_IA32_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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 Register reg6 = no_reg, Register reg7 = no_reg, 50 Register reg6 = no_reg, Register reg7 = no_reg,
51 Register reg8 = no_reg); 51 Register reg8 = no_reg);
52 #endif 52 #endif
53 53
54 // MacroAssembler implements a collection of frequently used macros. 54 // MacroAssembler implements a collection of frequently used macros.
55 class MacroAssembler: public Assembler { 55 class MacroAssembler: public Assembler {
56 public: 56 public:
57 MacroAssembler(Isolate* isolate, void* buffer, int size, 57 MacroAssembler(Isolate* isolate, void* buffer, int size,
58 CodeObjectRequired create_code_object); 58 CodeObjectRequired create_code_object);
59 59
60 int jit_cookie() const { return jit_cookie_; }
61
62 Isolate* isolate() const { return isolate_; }
63
60 void Load(Register dst, const Operand& src, Representation r); 64 void Load(Register dst, const Operand& src, Representation r);
61 void Store(Register src, const Operand& dst, Representation r); 65 void Store(Register src, const Operand& dst, Representation r);
62 66
63 // Load a register with a long value as efficiently as possible. 67 // Load a register with a long value as efficiently as possible.
64 void Set(Register dst, int32_t x) { 68 void Set(Register dst, int32_t x) {
65 if (x == 0) { 69 if (x == 0) {
66 xor_(dst, dst); 70 xor_(dst, dst);
67 } else { 71 } else {
68 mov(dst, Immediate(x)); 72 mov(dst, Immediate(x));
69 } 73 }
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 // On entry, receiver_reg should point to the array object. 877 // On entry, receiver_reg should point to the array object.
874 // scratch_reg gets clobbered. 878 // scratch_reg gets clobbered.
875 // If allocation info is present, conditional code is set to equal. 879 // If allocation info is present, conditional code is set to equal.
876 void TestJSArrayForAllocationMemento(Register receiver_reg, 880 void TestJSArrayForAllocationMemento(Register receiver_reg,
877 Register scratch_reg, 881 Register scratch_reg,
878 Label* no_memento_found); 882 Label* no_memento_found);
879 883
880 private: 884 private:
881 bool generating_stub_; 885 bool generating_stub_;
882 bool has_frame_; 886 bool has_frame_;
887 Isolate* isolate_;
883 // This handle will be patched with the code object on installation. 888 // This handle will be patched with the code object on installation.
884 Handle<Object> code_object_; 889 Handle<Object> code_object_;
890 int jit_cookie_;
885 891
886 // Helper functions for generating invokes. 892 // Helper functions for generating invokes.
887 void InvokePrologue(const ParameterCount& expected, 893 void InvokePrologue(const ParameterCount& expected,
888 const ParameterCount& actual, Label* done, 894 const ParameterCount& actual, Label* done,
889 bool* definitely_mismatches, InvokeFlag flag, 895 bool* definitely_mismatches, InvokeFlag flag,
890 Label::Distance done_distance, 896 Label::Distance done_distance,
891 const CallWrapper& call_wrapper); 897 const CallWrapper& call_wrapper);
892 898
893 void EnterExitFramePrologue(StackFrame::Type frame_type); 899 void EnterExitFramePrologue(StackFrame::Type frame_type);
894 void EnterExitFrameEpilogue(int argc, bool save_doubles); 900 void EnterExitFrameEpilogue(int argc, bool save_doubles);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 inline Operand NativeContextOperand() { 979 inline Operand NativeContextOperand() {
974 return ContextOperand(esi, Context::NATIVE_CONTEXT_INDEX); 980 return ContextOperand(esi, Context::NATIVE_CONTEXT_INDEX);
975 } 981 }
976 982
977 #define ACCESS_MASM(masm) masm-> 983 #define ACCESS_MASM(masm) masm->
978 984
979 } // namespace internal 985 } // namespace internal
980 } // namespace v8 986 } // namespace v8
981 987
982 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ 988 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/deoptimizer-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698