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

Side by Side Diff: runtime/vm/intrinsifier_x64.cc

Issue 1737693003: - Remove Isolate::Flags structure and store flags directly in isolate. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments. Created 4 years, 10 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 | « runtime/vm/intrinsifier_mips.cc ('k') | runtime/vm/isolate.h » ('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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 14 matching lines...) Expand all
25 // The RBP register should not be modified, because it is used by the profiler. 25 // The RBP register should not be modified, because it is used by the profiler.
26 // The PP and THR registers (see constants_x64.h) must be preserved. 26 // The PP and THR registers (see constants_x64.h) must be preserved.
27 27
28 #define __ assembler-> 28 #define __ assembler->
29 29
30 30
31 intptr_t Intrinsifier::ParameterSlotFromSp() { return 0; } 31 intptr_t Intrinsifier::ParameterSlotFromSp() { return 0; }
32 32
33 33
34 void Intrinsifier::ObjectArraySetIndexed(Assembler* assembler) { 34 void Intrinsifier::ObjectArraySetIndexed(Assembler* assembler) {
35 if (Isolate::Current()->flags().type_checks()) { 35 if (Isolate::Current()->type_checks()) {
36 return; 36 return;
37 } 37 }
38 38
39 Label fall_through; 39 Label fall_through;
40 __ movq(RDX, Address(RSP, + 1 * kWordSize)); // Value. 40 __ movq(RDX, Address(RSP, + 1 * kWordSize)); // Value.
41 __ movq(RCX, Address(RSP, + 2 * kWordSize)); // Index. 41 __ movq(RCX, Address(RSP, + 2 * kWordSize)); // Index.
42 __ movq(RAX, Address(RSP, + 3 * kWordSize)); // Array. 42 __ movq(RAX, Address(RSP, + 3 * kWordSize)); // Array.
43 __ testq(RCX, Immediate(kSmiTagMask)); 43 __ testq(RCX, Immediate(kSmiTagMask));
44 __ j(NOT_ZERO, &fall_through); 44 __ j(NOT_ZERO, &fall_through);
45 // Range check. 45 // Range check.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 __ Bind(&fall_through); 96 __ Bind(&fall_through);
97 } 97 }
98 98
99 99
100 // Add an element to growable array if it doesn't need to grow, otherwise 100 // Add an element to growable array if it doesn't need to grow, otherwise
101 // call into regular code. 101 // call into regular code.
102 // On stack: growable array (+2), value (+1), return-address (+0). 102 // On stack: growable array (+2), value (+1), return-address (+0).
103 void Intrinsifier::GrowableArray_add(Assembler* assembler) { 103 void Intrinsifier::GrowableArray_add(Assembler* assembler) {
104 // In checked mode we need to check the incoming argument. 104 // In checked mode we need to check the incoming argument.
105 if (Isolate::Current()->flags().type_checks()) return; 105 if (Isolate::Current()->type_checks()) return;
106 Label fall_through; 106 Label fall_through;
107 __ movq(RAX, Address(RSP, + 2 * kWordSize)); // Array. 107 __ movq(RAX, Address(RSP, + 2 * kWordSize)); // Array.
108 __ movq(RCX, FieldAddress(RAX, GrowableObjectArray::length_offset())); 108 __ movq(RCX, FieldAddress(RAX, GrowableObjectArray::length_offset()));
109 // RCX: length. 109 // RCX: length.
110 __ movq(RDX, FieldAddress(RAX, GrowableObjectArray::data_offset())); 110 __ movq(RDX, FieldAddress(RAX, GrowableObjectArray::data_offset()));
111 // RDX: data. 111 // RDX: data.
112 // Compare length with capacity. 112 // Compare length with capacity.
113 __ cmpq(RCX, FieldAddress(RDX, Array::length_offset())); 113 __ cmpq(RCX, FieldAddress(RDX, Array::length_offset()));
114 __ j(EQUAL, &fall_through); // Must grow data. 114 __ j(EQUAL, &fall_through); // Must grow data.
115 // len = len + 1; 115 // len = len + 1;
(...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 __ LoadIsolate(RAX); 2106 __ LoadIsolate(RAX);
2107 __ movq(RAX, Address(RAX, Isolate::current_tag_offset())); 2107 __ movq(RAX, Address(RAX, Isolate::current_tag_offset()));
2108 __ ret(); 2108 __ ret();
2109 } 2109 }
2110 2110
2111 #undef __ 2111 #undef __
2112 2112
2113 } // namespace dart 2113 } // namespace dart
2114 2114
2115 #endif // defined TARGET_ARCH_X64 2115 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698