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