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. | |
Michael Starzinger
2016/09/05 11:35:29
nit: ... "This is used as a parameter by the JSCre
jochen (gone - plz use gerrit)
2016/09/05 11:42:44
done
| |
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_; | |
192 Handle<ScopeInfo> const scope_info_; | |
193 }; | |
194 | |
195 bool operator==(CreateCatchContextParameters const& lhs, | |
196 CreateCatchContextParameters const& rhs); | |
197 bool operator!=(CreateCatchContextParameters const& lhs, | |
198 CreateCatchContextParameters const& rhs); | |
199 | |
200 size_t hash_value(CreateCatchContextParameters const& parameters); | |
201 | |
202 std::ostream& operator<<(std::ostream& os, | |
203 CreateCatchContextParameters const& parameters); | |
204 | |
205 CreateCatchContextParameters const& CreateCatchContextParametersOf( | |
206 Operator const*); | |
181 | 207 |
182 // Defines the property of an object for a named access. This is | 208 // Defines the property of an object for a named access. This is |
183 // used as a parameter by the JSLoadNamed and JSStoreNamed operators. | 209 // used as a parameter by the JSLoadNamed and JSStoreNamed operators. |
184 class NamedAccess final { | 210 class NamedAccess final { |
185 public: | 211 public: |
186 NamedAccess(LanguageMode language_mode, Handle<Name> name, | 212 NamedAccess(LanguageMode language_mode, Handle<Name> name, |
187 VectorSlotPair const& feedback) | 213 VectorSlotPair const& feedback) |
188 : name_(name), feedback_(feedback), language_mode_(language_mode) {} | 214 : name_(name), feedback_(feedback), language_mode_(language_mode) {} |
189 | 215 |
190 Handle<Name> name() const { return name_; } | 216 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. | 500 // Used to implement Ignition's SuspendGenerator bytecode. |
475 const Operator* GeneratorStore(int register_count); | 501 const Operator* GeneratorStore(int register_count); |
476 | 502 |
477 // Used to implement Ignition's ResumeGenerator bytecode. | 503 // Used to implement Ignition's ResumeGenerator bytecode. |
478 const Operator* GeneratorRestoreContinuation(); | 504 const Operator* GeneratorRestoreContinuation(); |
479 const Operator* GeneratorRestoreRegister(int index); | 505 const Operator* GeneratorRestoreRegister(int index); |
480 | 506 |
481 const Operator* StackCheck(); | 507 const Operator* StackCheck(); |
482 | 508 |
483 const Operator* CreateFunctionContext(int slot_count); | 509 const Operator* CreateFunctionContext(int slot_count); |
484 const Operator* CreateCatchContext(const Handle<String>& name); | 510 const Operator* CreateCatchContext(const Handle<String>& name, |
511 const Handle<ScopeInfo>& scope_info); | |
485 const Operator* CreateWithContext(); | 512 const Operator* CreateWithContext(); |
486 const Operator* CreateBlockContext(const Handle<ScopeInfo>& scpope_info); | 513 const Operator* CreateBlockContext(const Handle<ScopeInfo>& scpope_info); |
487 const Operator* CreateModuleContext(); | 514 const Operator* CreateModuleContext(); |
488 const Operator* CreateScriptContext(const Handle<ScopeInfo>& scpope_info); | 515 const Operator* CreateScriptContext(const Handle<ScopeInfo>& scpope_info); |
489 | 516 |
490 private: | 517 private: |
491 Zone* zone() const { return zone_; } | 518 Zone* zone() const { return zone_; } |
492 | 519 |
493 const JSOperatorGlobalCache& cache_; | 520 const JSOperatorGlobalCache& cache_; |
494 Zone* const zone_; | 521 Zone* const zone_; |
495 | 522 |
496 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); | 523 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); |
497 }; | 524 }; |
498 | 525 |
499 } // namespace compiler | 526 } // namespace compiler |
500 } // namespace internal | 527 } // namespace internal |
501 } // namespace v8 | 528 } // namespace v8 |
502 | 529 |
503 #endif // V8_COMPILER_JS_OPERATOR_H_ | 530 #endif // V8_COMPILER_JS_OPERATOR_H_ |
OLD | NEW |