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

Side by Side Diff: src/full-codegen.h

Issue 23710014: Introduce concurrent on-stack replacement. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/flag-definitions.h ('k') | src/objects.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 #elif V8_TARGET_ARCH_ARM 134 #elif V8_TARGET_ARCH_ARM
135 static const int kCodeSizeMultiplier = 142; 135 static const int kCodeSizeMultiplier = 142;
136 #elif V8_TARGET_ARCH_MIPS 136 #elif V8_TARGET_ARCH_MIPS
137 static const int kCodeSizeMultiplier = 142; 137 static const int kCodeSizeMultiplier = 142;
138 #else 138 #else
139 #error Unsupported target architecture. 139 #error Unsupported target architecture.
140 #endif 140 #endif
141 141
142 class BackEdgeTableIterator { 142 class BackEdgeTableIterator {
143 public: 143 public:
144 explicit BackEdgeTableIterator(Code* unoptimized) { 144 explicit BackEdgeTableIterator(Code* unoptimized,
145 DisallowHeapAllocation* required) {
145 ASSERT(unoptimized->kind() == Code::FUNCTION); 146 ASSERT(unoptimized->kind() == Code::FUNCTION);
146 instruction_start_ = unoptimized->instruction_start(); 147 instruction_start_ = unoptimized->instruction_start();
147 cursor_ = instruction_start_ + unoptimized->back_edge_table_offset(); 148 cursor_ = instruction_start_ + unoptimized->back_edge_table_offset();
148 ASSERT(cursor_ < instruction_start_ + unoptimized->instruction_size()); 149 ASSERT(cursor_ < instruction_start_ + unoptimized->instruction_size());
149 table_length_ = Memory::uint32_at(cursor_); 150 table_length_ = Memory::uint32_at(cursor_);
150 cursor_ += kTableLengthSize; 151 cursor_ += kTableLengthSize;
151 end_ = cursor_ + table_length_ * kEntrySize; 152 end_ = cursor_ + table_length_ * kEntrySize;
152 } 153 }
153 154
154 bool Done() { return cursor_ >= end_; } 155 bool Done() { return cursor_ >= end_; }
(...skipping 30 matching lines...) Expand all
185 static const int kTableLengthSize = kIntSize; 186 static const int kTableLengthSize = kIntSize;
186 static const int kAstIdOffset = 0 * kIntSize; 187 static const int kAstIdOffset = 0 * kIntSize;
187 static const int kPcOffsetOffset = 1 * kIntSize; 188 static const int kPcOffsetOffset = 1 * kIntSize;
188 static const int kLoopDepthOffset = 2 * kIntSize; 189 static const int kLoopDepthOffset = 2 * kIntSize;
189 static const int kEntrySize = 3 * kIntSize; 190 static const int kEntrySize = 3 * kIntSize;
190 191
191 Address cursor_; 192 Address cursor_;
192 Address end_; 193 Address end_;
193 Address instruction_start_; 194 Address instruction_start_;
194 uint32_t table_length_; 195 uint32_t table_length_;
195 DisallowHeapAllocation no_gc_while_iterating_over_raw_addresses_;
196 196
197 DISALLOW_COPY_AND_ASSIGN(BackEdgeTableIterator); 197 DISALLOW_COPY_AND_ASSIGN(BackEdgeTableIterator);
198 }; 198 };
199 199
200 200
201 private: 201 private:
202 class Breakable; 202 class Breakable;
203 class Iteration; 203 class Iteration;
204 204
205 class TestContext; 205 class TestContext;
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 } 936 }
937 937
938 private: 938 private:
939 Zone* zone_; 939 Zone* zone_;
940 }; 940 };
941 941
942 942
943 } } // namespace v8::internal 943 } } // namespace v8::internal
944 944
945 #endif // V8_FULL_CODEGEN_H_ 945 #endif // V8_FULL_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698