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

Side by Side Diff: runtime/vm/assembler_arm.h

Issue 2463083002: Remove default monomorphic check code from functions and stubs that do not need it. (Closed)
Patch Set: address comment Created 4 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 | « no previous file | runtime/vm/assembler_arm.cc » ('j') | runtime/vm/object.h » ('J')
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 #ifndef RUNTIME_VM_ASSEMBLER_ARM_H_ 5 #ifndef RUNTIME_VM_ASSEMBLER_ARM_H_
6 #define RUNTIME_VM_ASSEMBLER_ARM_H_ 6 #define RUNTIME_VM_ASSEMBLER_ARM_H_
7 7
8 #ifndef RUNTIME_VM_ASSEMBLER_H_ 8 #ifndef RUNTIME_VM_ASSEMBLER_H_
9 #error Do not include assembler_arm.h directly; use assembler.h instead. 9 #error Do not include assembler_arm.h directly; use assembler.h instead.
10 #endif 10 #endif
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 return *this; 359 return *this;
360 } 360 }
361 }; 361 };
362 362
363 363
364 class Assembler : public ValueObject { 364 class Assembler : public ValueObject {
365 public: 365 public:
366 explicit Assembler(bool use_far_branches = false) 366 explicit Assembler(bool use_far_branches = false)
367 : buffer_(), 367 : buffer_(),
368 prologue_offset_(-1), 368 prologue_offset_(-1),
369 has_single_entry_point_(true),
369 use_far_branches_(use_far_branches), 370 use_far_branches_(use_far_branches),
370 comments_(), 371 comments_(),
371 constant_pool_allowed_(false) { 372 constant_pool_allowed_(false) {
372 MonomorphicCheckedEntry();
373 } 373 }
374 374
375 ~Assembler() { } 375 ~Assembler() { }
376 376
377 void PopRegister(Register r) { Pop(r); } 377 void PopRegister(Register r) { Pop(r); }
378 378
379 void Bind(Label* label); 379 void Bind(Label* label);
380 void Jump(Label* label) { b(label); } 380 void Jump(Label* label) { b(label); }
381 381
382 // Misc. functionality 382 // Misc. functionality
383 intptr_t CodeSize() const { return buffer_.Size(); } 383 intptr_t CodeSize() const { return buffer_.Size(); }
384 intptr_t prologue_offset() const { return prologue_offset_; } 384 intptr_t prologue_offset() const { return prologue_offset_; }
385 bool has_single_entry_point() const { return has_single_entry_point_; }
385 386
386 // Count the fixups that produce a pointer offset, without processing 387 // Count the fixups that produce a pointer offset, without processing
387 // the fixups. On ARM there are no pointers in code. 388 // the fixups. On ARM there are no pointers in code.
388 intptr_t CountPointerOffsets() const { return 0; } 389 intptr_t CountPointerOffsets() const { return 0; }
389 390
390 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const { 391 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const {
391 ASSERT(buffer_.pointer_offsets().length() == 0); // No pointers in code. 392 ASSERT(buffer_.pointer_offsets().length() == 0); // No pointers in code.
392 return buffer_.pointer_offsets(); 393 return buffer_.pointer_offsets();
393 } 394 }
394 395
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 // Set up a Dart frame for a function compiled for on-stack replacement. 940 // Set up a Dart frame for a function compiled for on-stack replacement.
940 // The frame layout is a normal Dart frame, but the frame is partially set 941 // The frame layout is a normal Dart frame, but the frame is partially set
941 // up on entry (it is the frame of the unoptimized code). 942 // up on entry (it is the frame of the unoptimized code).
942 void EnterOsrFrame(intptr_t extra_size); 943 void EnterOsrFrame(intptr_t extra_size);
943 944
944 // Set up a stub frame so that the stack traversal code can easily identify 945 // Set up a stub frame so that the stack traversal code can easily identify
945 // a stub frame. 946 // a stub frame.
946 void EnterStubFrame(); 947 void EnterStubFrame();
947 void LeaveStubFrame(); 948 void LeaveStubFrame();
948 949
949 void NoMonomorphicCheckedEntry();
950 void MonomorphicCheckedEntry(); 950 void MonomorphicCheckedEntry();
951 951
952 // The register into which the allocation stats table is loaded with 952 // The register into which the allocation stats table is loaded with
953 // LoadAllocationStatsAddress should be passed to 953 // LoadAllocationStatsAddress should be passed to
954 // IncrementAllocationStats(WithSize) as stats_addr_reg to update the 954 // IncrementAllocationStats(WithSize) as stats_addr_reg to update the
955 // allocation stats. These are separate assembler macros so we can 955 // allocation stats. These are separate assembler macros so we can
956 // avoid a dependent load too nearby the load of the table address. 956 // avoid a dependent load too nearby the load of the table address.
957 void LoadAllocationStatsAddress(Register dest, 957 void LoadAllocationStatsAddress(Register dest,
958 intptr_t cid); 958 intptr_t cid);
959 void IncrementAllocationStats(Register stats_addr, 959 void IncrementAllocationStats(Register stats_addr,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 bool constant_pool_allowed() const { 1034 bool constant_pool_allowed() const {
1035 return constant_pool_allowed_; 1035 return constant_pool_allowed_;
1036 } 1036 }
1037 void set_constant_pool_allowed(bool b) { 1037 void set_constant_pool_allowed(bool b) {
1038 constant_pool_allowed_ = b; 1038 constant_pool_allowed_ = b;
1039 } 1039 }
1040 1040
1041 private: 1041 private:
1042 AssemblerBuffer buffer_; // Contains position independent code. 1042 AssemblerBuffer buffer_; // Contains position independent code.
1043 ObjectPoolWrapper object_pool_wrapper_; 1043 ObjectPoolWrapper object_pool_wrapper_;
1044
1045 int32_t prologue_offset_; 1044 int32_t prologue_offset_;
1046 1045 bool has_single_entry_point_;
1047 bool use_far_branches_; 1046 bool use_far_branches_;
1048 1047
1049 // If you are thinking of using one or both of these instructions directly, 1048 // If you are thinking of using one or both of these instructions directly,
1050 // instead LoadImmediate should probably be used. 1049 // instead LoadImmediate should probably be used.
1051 void movw(Register rd, uint16_t imm16, Condition cond = AL); 1050 void movw(Register rd, uint16_t imm16, Condition cond = AL);
1052 void movt(Register rd, uint16_t imm16, Condition cond = AL); 1051 void movt(Register rd, uint16_t imm16, Condition cond = AL);
1053 1052
1054 void BindARMv6(Label* label); 1053 void BindARMv6(Label* label);
1055 void BindARMv7(Label* label); 1054 void BindARMv7(Label* label);
1056 1055
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 Register value, 1193 Register value,
1195 Label* no_update); 1194 Label* no_update);
1196 1195
1197 DISALLOW_ALLOCATION(); 1196 DISALLOW_ALLOCATION();
1198 DISALLOW_COPY_AND_ASSIGN(Assembler); 1197 DISALLOW_COPY_AND_ASSIGN(Assembler);
1199 }; 1198 };
1200 1199
1201 } // namespace dart 1200 } // namespace dart
1202 1201
1203 #endif // RUNTIME_VM_ASSEMBLER_ARM_H_ 1202 #endif // RUNTIME_VM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_arm.cc » ('j') | runtime/vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698