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

Side by Side Diff: src/code-stubs.h

Issue 1604543002: [compiler] Remove CodeStub from CompilationInfo (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback Created 4 years, 11 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 | « no previous file | src/code-stubs.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_CODE_STUBS_H_ 5 #ifndef V8_CODE_STUBS_H_
6 #define V8_CODE_STUBS_H_ 6 #define V8_CODE_STUBS_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 virtual Major MajorKey() const = 0; 233 virtual Major MajorKey() const = 0;
234 uint32_t MinorKey() const { return minor_key_; } 234 uint32_t MinorKey() const { return minor_key_; }
235 235
236 // BinaryOpStub needs to override this. 236 // BinaryOpStub needs to override this.
237 virtual Code::Kind GetCodeKind() const; 237 virtual Code::Kind GetCodeKind() const;
238 238
239 virtual InlineCacheState GetICState() const { return UNINITIALIZED; } 239 virtual InlineCacheState GetICState() const { return UNINITIALIZED; }
240 virtual ExtraICState GetExtraICState() const { return kNoExtraICState; } 240 virtual ExtraICState GetExtraICState() const { return kNoExtraICState; }
241 virtual Code::StubType GetStubType() const { return Code::NORMAL; } 241 virtual Code::StubType GetStubType() const { return Code::NORMAL; }
242 242
243 Code::Flags GetCodeFlags() const;
244
243 friend std::ostream& operator<<(std::ostream& os, const CodeStub& s) { 245 friend std::ostream& operator<<(std::ostream& os, const CodeStub& s) {
244 s.PrintName(os); 246 s.PrintName(os);
245 return os; 247 return os;
246 } 248 }
247 249
248 Isolate* isolate() const { return isolate_; } 250 Isolate* isolate() const { return isolate_; }
249 251
250 protected: 252 protected:
251 CodeStub(uint32_t key, Isolate* isolate) 253 CodeStub(uint32_t key, Isolate* isolate)
252 : minor_key_(MinorKeyFromKey(key)), isolate_(isolate) {} 254 : minor_key_(MinorKeyFromKey(key)), isolate_(isolate) {}
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 318
317 #define DEFINE_CODE_STUB_BASE(NAME, SUPER) \ 319 #define DEFINE_CODE_STUB_BASE(NAME, SUPER) \
318 public: \ 320 public: \
319 NAME(uint32_t key, Isolate* isolate) : SUPER(key, isolate) {} \ 321 NAME(uint32_t key, Isolate* isolate) : SUPER(key, isolate) {} \
320 \ 322 \
321 private: \ 323 private: \
322 DISALLOW_COPY_AND_ASSIGN(NAME) 324 DISALLOW_COPY_AND_ASSIGN(NAME)
323 325
324 326
325 #define DEFINE_CODE_STUB(NAME, SUPER) \ 327 #define DEFINE_CODE_STUB(NAME, SUPER) \
328 public: \
329 inline Major MajorKey() const override { return NAME; }; \
330 \
326 protected: \ 331 protected: \
327 inline Major MajorKey() const override { return NAME; }; \
328 DEFINE_CODE_STUB_BASE(NAME##Stub, SUPER) 332 DEFINE_CODE_STUB_BASE(NAME##Stub, SUPER)
329 333
330 334
331 #define DEFINE_PLATFORM_CODE_STUB(NAME, SUPER) \ 335 #define DEFINE_PLATFORM_CODE_STUB(NAME, SUPER) \
332 private: \ 336 private: \
333 void Generate(MacroAssembler* masm) override; \ 337 void Generate(MacroAssembler* masm) override; \
334 DEFINE_CODE_STUB(NAME, SUPER) 338 DEFINE_CODE_STUB(NAME, SUPER)
335 339
336 340
337 #define DEFINE_HYDROGEN_CODE_STUB(NAME, SUPER) \ 341 #define DEFINE_HYDROGEN_CODE_STUB(NAME, SUPER) \
(...skipping 2636 matching lines...) Expand 10 before | Expand all | Expand 10 after
2974 #undef DEFINE_HYDROGEN_CODE_STUB 2978 #undef DEFINE_HYDROGEN_CODE_STUB
2975 #undef DEFINE_CODE_STUB 2979 #undef DEFINE_CODE_STUB
2976 #undef DEFINE_CODE_STUB_BASE 2980 #undef DEFINE_CODE_STUB_BASE
2977 2981
2978 extern Representation RepresentationFromType(Type* type); 2982 extern Representation RepresentationFromType(Type* type);
2979 2983
2980 } // namespace internal 2984 } // namespace internal
2981 } // namespace v8 2985 } // namespace v8
2982 2986
2983 #endif // V8_CODE_STUBS_H_ 2987 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « no previous file | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698