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

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

Issue 1311013008: [builtins] Unify the various versions of [[Call]] with a Call builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: AssertFunction was wrong 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/x64/code-stubs-x64.cc ('k') | src/x64/macro-assembler-x64.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_X64_MACRO_ASSEMBLER_X64_H_ 5 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_
6 #define V8_X64_MACRO_ASSEMBLER_X64_H_ 6 #define V8_X64_MACRO_ASSEMBLER_X64_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/base/flags.h" 10 #include "src/base/flags.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Load a root value where the index (or part of it) is variable. 141 // Load a root value where the index (or part of it) is variable.
142 // The variable_offset register is added to the fixed_offset value 142 // The variable_offset register is added to the fixed_offset value
143 // to get the index into the root-array. 143 // to get the index into the root-array.
144 void LoadRootIndexed(Register destination, 144 void LoadRootIndexed(Register destination,
145 Register variable_offset, 145 Register variable_offset,
146 int fixed_offset); 146 int fixed_offset);
147 void CompareRoot(Register with, Heap::RootListIndex index); 147 void CompareRoot(Register with, Heap::RootListIndex index);
148 void CompareRoot(const Operand& with, Heap::RootListIndex index); 148 void CompareRoot(const Operand& with, Heap::RootListIndex index);
149 void PushRoot(Heap::RootListIndex index); 149 void PushRoot(Heap::RootListIndex index);
150 150
151 // Compare the object in a register to a value and jump if they are equal.
152 void JumpIfRoot(Register with, Heap::RootListIndex index, Label* if_equal,
153 Label::Distance if_equal_distance = Label::kNear) {
154 CompareRoot(with, index);
155 j(equal, if_equal, if_equal_distance);
156 }
157
158 // Compare the object in a register to a value and jump if they are not equal.
159 void JumpIfNotRoot(Register with, Heap::RootListIndex index,
160 Label* if_not_equal,
161 Label::Distance if_not_equal_distance = Label::kNear) {
162 CompareRoot(with, index);
163 j(not_equal, if_not_equal, if_not_equal_distance);
164 }
165
151 // These functions do not arrange the registers in any particular order so 166 // These functions do not arrange the registers in any particular order so
152 // they are not useful for calls that can cause a GC. The caller can 167 // they are not useful for calls that can cause a GC. The caller can
153 // exclude up to 3 registers that do not need to be saved and restored. 168 // exclude up to 3 registers that do not need to be saved and restored.
154 void PushCallerSaved(SaveFPRegsMode fp_mode, 169 void PushCallerSaved(SaveFPRegsMode fp_mode,
155 Register exclusion1 = no_reg, 170 Register exclusion1 = no_reg,
156 Register exclusion2 = no_reg, 171 Register exclusion2 = no_reg,
157 Register exclusion3 = no_reg); 172 Register exclusion3 = no_reg);
158 void PopCallerSaved(SaveFPRegsMode fp_mode, 173 void PopCallerSaved(SaveFPRegsMode fp_mode,
159 Register exclusion1 = no_reg, 174 Register exclusion1 = no_reg,
160 Register exclusion2 = no_reg, 175 Register exclusion2 = no_reg,
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 // Abort execution if a 64 bit register containing a 32 bit payload does not 1109 // Abort execution if a 64 bit register containing a 32 bit payload does not
1095 // have zeros in the top 32 bits, enabled via --debug-code. 1110 // have zeros in the top 32 bits, enabled via --debug-code.
1096 void AssertZeroExtended(Register reg); 1111 void AssertZeroExtended(Register reg);
1097 1112
1098 // Abort execution if argument is not a string, enabled via --debug-code. 1113 // Abort execution if argument is not a string, enabled via --debug-code.
1099 void AssertString(Register object); 1114 void AssertString(Register object);
1100 1115
1101 // Abort execution if argument is not a name, enabled via --debug-code. 1116 // Abort execution if argument is not a name, enabled via --debug-code.
1102 void AssertName(Register object); 1117 void AssertName(Register object);
1103 1118
1119 // Abort execution if argument is not a JSFunction, enabled via --debug-code.
1120 void AssertFunction(Register object);
1121
1104 // Abort execution if argument is not undefined or an AllocationSite, enabled 1122 // Abort execution if argument is not undefined or an AllocationSite, enabled
1105 // via --debug-code. 1123 // via --debug-code.
1106 void AssertUndefinedOrAllocationSite(Register object); 1124 void AssertUndefinedOrAllocationSite(Register object);
1107 1125
1108 // Abort execution if argument is not the root value with the given index, 1126 // Abort execution if argument is not the root value with the given index,
1109 // enabled via --debug-code. 1127 // enabled via --debug-code.
1110 void AssertRootValue(Register src, 1128 void AssertRootValue(Register src,
1111 Heap::RootListIndex root_value_index, 1129 Heap::RootListIndex root_value_index,
1112 BailoutReason reason); 1130 BailoutReason reason);
1113 1131
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 1264
1247 // Picks out an array index from the hash field. 1265 // Picks out an array index from the hash field.
1248 // Register use: 1266 // Register use:
1249 // hash - holds the index's hash. Clobbered. 1267 // hash - holds the index's hash. Clobbered.
1250 // index - holds the overwritten index on exit. 1268 // index - holds the overwritten index on exit.
1251 void IndexFromHash(Register hash, Register index); 1269 void IndexFromHash(Register hash, Register index);
1252 1270
1253 // Find the function context up the context chain. 1271 // Find the function context up the context chain.
1254 void LoadContext(Register dst, int context_chain_length); 1272 void LoadContext(Register dst, int context_chain_length);
1255 1273
1274 // Load the global proxy from the current context.
1275 void LoadGlobalProxy(Register dst);
1276
1256 // Conditionally load the cached Array transitioned map of type 1277 // Conditionally load the cached Array transitioned map of type
1257 // transitioned_kind from the native context if the map in register 1278 // transitioned_kind from the native context if the map in register
1258 // map_in_out is the cached Array map in the native context of 1279 // map_in_out is the cached Array map in the native context of
1259 // expected_kind. 1280 // expected_kind.
1260 void LoadTransitionedArrayMapConditional( 1281 void LoadTransitionedArrayMapConditional(
1261 ElementsKind expected_kind, 1282 ElementsKind expected_kind,
1262 ElementsKind transitioned_kind, 1283 ElementsKind transitioned_kind,
1263 Register map_in_out, 1284 Register map_in_out,
1264 Register scratch, 1285 Register scratch,
1265 Label* no_map_match); 1286 Label* no_map_match);
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 masm->popfq(); \ 1644 masm->popfq(); \
1624 } \ 1645 } \
1625 masm-> 1646 masm->
1626 #else 1647 #else
1627 #define ACCESS_MASM(masm) masm-> 1648 #define ACCESS_MASM(masm) masm->
1628 #endif 1649 #endif
1629 1650
1630 } } // namespace v8::internal 1651 } } // namespace v8::internal
1631 1652
1632 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 1653 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698