OLD | NEW |
---|---|
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_COMPILER_JS_OPERATOR_H_ | 5 #ifndef V8_COMPILER_JS_OPERATOR_H_ |
6 #define V8_COMPILER_JS_OPERATOR_H_ | 6 #define V8_COMPILER_JS_OPERATOR_H_ |
7 | 7 |
8 #include "src/compiler/type-hints.h" | 8 #include "src/compiler/type-hints.h" |
9 #include "src/runtime/runtime.h" | 9 #include "src/runtime/runtime.h" |
10 | 10 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 | 171 |
172 bool operator==(ContextAccess const&, ContextAccess const&); | 172 bool operator==(ContextAccess const&, ContextAccess const&); |
173 bool operator!=(ContextAccess const&, ContextAccess const&); | 173 bool operator!=(ContextAccess const&, ContextAccess const&); |
174 | 174 |
175 size_t hash_value(ContextAccess const&); | 175 size_t hash_value(ContextAccess const&); |
176 | 176 |
177 std::ostream& operator<<(std::ostream&, ContextAccess const&); | 177 std::ostream& operator<<(std::ostream&, ContextAccess const&); |
178 | 178 |
179 ContextAccess const& ContextAccessOf(Operator const*); | 179 ContextAccess const& ContextAccessOf(Operator const*); |
180 | 180 |
181 // Defines the name and ScopeInfo for a new catch context. | |
182 class CreateCatchContextParameters final { | |
183 public: | |
184 CreateCatchContextParameters(Handle<String> catch_name, | |
185 Handle<ScopeInfo> scope_info); | |
186 | |
187 Handle<String> catch_name() const { return catch_name_; } | |
188 Handle<ScopeInfo> scope_info() const { return scope_info_; } | |
189 | |
190 private: | |
191 Handle<String> const catch_name_; | |
marja
2016/09/02 07:39:35
This is an uncommon way to do const, a more common
jochen (gone - plz use gerrit)
2016/09/02 08:27:15
Just copying what the other operators in this file
| |
192 Handle<ScopeInfo> const scope_info_; | |
193 }; | |
194 | |
195 bool operator==(CreateCatchContextParameters const&, | |
196 CreateCatchContextParameters const&); | |
197 bool operator!=(CreateCatchContextParameters const&, | |
198 CreateCatchContextParameters const&); | |
199 | |
200 size_t hash_value(CreateCatchContextParameters const&); | |
201 | |
202 std::ostream& operator<<(std::ostream&, CreateCatchContextParameters const&); | |
marja
2016/09/02 07:39:35
What's up with this style?
jochen (gone - plz use gerrit)
2016/09/02 08:27:15
you mean like missing parameter names?
marja
2016/09/02 09:34:54
No, I meant CreateCatchContextParameters const& in
| |
203 | |
204 CreateCatchContextParameters const& CreateCatchContextParametersOf( | |
205 Operator const*); | |
181 | 206 |
182 // Defines the property of an object for a named access. This is | 207 // Defines the property of an object for a named access. This is |
183 // used as a parameter by the JSLoadNamed and JSStoreNamed operators. | 208 // used as a parameter by the JSLoadNamed and JSStoreNamed operators. |
184 class NamedAccess final { | 209 class NamedAccess final { |
185 public: | 210 public: |
186 NamedAccess(LanguageMode language_mode, Handle<Name> name, | 211 NamedAccess(LanguageMode language_mode, Handle<Name> name, |
187 VectorSlotPair const& feedback) | 212 VectorSlotPair const& feedback) |
188 : name_(name), feedback_(feedback), language_mode_(language_mode) {} | 213 : name_(name), feedback_(feedback), language_mode_(language_mode) {} |
189 | 214 |
190 Handle<Name> name() const { return name_; } | 215 Handle<Name> name() const { return name_; } |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
474 // Used to implement Ignition's SuspendGenerator bytecode. | 499 // Used to implement Ignition's SuspendGenerator bytecode. |
475 const Operator* GeneratorStore(int register_count); | 500 const Operator* GeneratorStore(int register_count); |
476 | 501 |
477 // Used to implement Ignition's ResumeGenerator bytecode. | 502 // Used to implement Ignition's ResumeGenerator bytecode. |
478 const Operator* GeneratorRestoreContinuation(); | 503 const Operator* GeneratorRestoreContinuation(); |
479 const Operator* GeneratorRestoreRegister(int index); | 504 const Operator* GeneratorRestoreRegister(int index); |
480 | 505 |
481 const Operator* StackCheck(); | 506 const Operator* StackCheck(); |
482 | 507 |
483 const Operator* CreateFunctionContext(int slot_count); | 508 const Operator* CreateFunctionContext(int slot_count); |
484 const Operator* CreateCatchContext(const Handle<String>& name); | 509 const Operator* CreateCatchContext(const Handle<String>& name, |
510 const Handle<ScopeInfo>& scope_info); | |
485 const Operator* CreateWithContext(); | 511 const Operator* CreateWithContext(); |
486 const Operator* CreateBlockContext(const Handle<ScopeInfo>& scpope_info); | 512 const Operator* CreateBlockContext(const Handle<ScopeInfo>& scpope_info); |
487 const Operator* CreateModuleContext(); | 513 const Operator* CreateModuleContext(); |
488 const Operator* CreateScriptContext(const Handle<ScopeInfo>& scpope_info); | 514 const Operator* CreateScriptContext(const Handle<ScopeInfo>& scpope_info); |
489 | 515 |
490 private: | 516 private: |
491 Zone* zone() const { return zone_; } | 517 Zone* zone() const { return zone_; } |
492 | 518 |
493 const JSOperatorGlobalCache& cache_; | 519 const JSOperatorGlobalCache& cache_; |
494 Zone* const zone_; | 520 Zone* const zone_; |
495 | 521 |
496 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); | 522 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); |
497 }; | 523 }; |
498 | 524 |
499 } // namespace compiler | 525 } // namespace compiler |
500 } // namespace internal | 526 } // namespace internal |
501 } // namespace v8 | 527 } // namespace v8 |
502 | 528 |
503 #endif // V8_COMPILER_JS_OPERATOR_H_ | 529 #endif // V8_COMPILER_JS_OPERATOR_H_ |
OLD | NEW |