| 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 std::ostream& operator<<(std::ostream&, CreateClosureParameters const&); | 343 std::ostream& operator<<(std::ostream&, CreateClosureParameters const&); |
| 344 | 344 |
| 345 const CreateClosureParameters& CreateClosureParametersOf(const Operator* op); | 345 const CreateClosureParameters& CreateClosureParametersOf(const Operator* op); |
| 346 | 346 |
| 347 | 347 |
| 348 // Defines shared information for the literal that should be created. This is | 348 // Defines shared information for the literal that should be created. This is |
| 349 // used as parameter by JSCreateLiteralArray, JSCreateLiteralObject and | 349 // used as parameter by JSCreateLiteralArray, JSCreateLiteralObject and |
| 350 // JSCreateLiteralRegExp operators. | 350 // JSCreateLiteralRegExp operators. |
| 351 class CreateLiteralParameters final { | 351 class CreateLiteralParameters final { |
| 352 public: | 352 public: |
| 353 CreateLiteralParameters(Handle<HeapObject> constant, int flags, int index) | 353 CreateLiteralParameters(Handle<HeapObject> constant, int length, int flags, |
| 354 : constant_(constant), flags_(flags), index_(index) {} | 354 int index) |
| 355 : constant_(constant), length_(length), flags_(flags), index_(index) {} |
| 355 | 356 |
| 356 Handle<HeapObject> constant() const { return constant_; } | 357 Handle<HeapObject> constant() const { return constant_; } |
| 358 int length() const { return length_; } |
| 357 int flags() const { return flags_; } | 359 int flags() const { return flags_; } |
| 358 int index() const { return index_; } | 360 int index() const { return index_; } |
| 359 | 361 |
| 360 private: | 362 private: |
| 361 Handle<HeapObject> const constant_; | 363 Handle<HeapObject> const constant_; |
| 364 int const length_; |
| 362 int const flags_; | 365 int const flags_; |
| 363 int const index_; | 366 int const index_; |
| 364 }; | 367 }; |
| 365 | 368 |
| 366 bool operator==(CreateLiteralParameters const&, CreateLiteralParameters const&); | 369 bool operator==(CreateLiteralParameters const&, CreateLiteralParameters const&); |
| 367 bool operator!=(CreateLiteralParameters const&, CreateLiteralParameters const&); | 370 bool operator!=(CreateLiteralParameters const&, CreateLiteralParameters const&); |
| 368 | 371 |
| 369 size_t hash_value(CreateLiteralParameters const&); | 372 size_t hash_value(CreateLiteralParameters const&); |
| 370 | 373 |
| 371 std::ostream& operator<<(std::ostream&, CreateLiteralParameters const&); | 374 std::ostream& operator<<(std::ostream&, CreateLiteralParameters const&); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 const Operator* ToObject(); | 410 const Operator* ToObject(); |
| 408 const Operator* Yield(); | 411 const Operator* Yield(); |
| 409 | 412 |
| 410 const Operator* Create(); | 413 const Operator* Create(); |
| 411 const Operator* CreateArguments(CreateArgumentsType type); | 414 const Operator* CreateArguments(CreateArgumentsType type); |
| 412 const Operator* CreateArray(size_t arity, Handle<AllocationSite> site); | 415 const Operator* CreateArray(size_t arity, Handle<AllocationSite> site); |
| 413 const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info, | 416 const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info, |
| 414 PretenureFlag pretenure); | 417 PretenureFlag pretenure); |
| 415 const Operator* CreateIterResultObject(); | 418 const Operator* CreateIterResultObject(); |
| 416 const Operator* CreateLiteralArray(Handle<FixedArray> constant_elements, | 419 const Operator* CreateLiteralArray(Handle<FixedArray> constant_elements, |
| 417 int literal_flags, int literal_index); | 420 int literal_flags, int literal_index, |
| 421 int number_of_elements); |
| 418 const Operator* CreateLiteralObject(Handle<FixedArray> constant_properties, | 422 const Operator* CreateLiteralObject(Handle<FixedArray> constant_properties, |
| 419 int literal_flags, int literal_index); | 423 int literal_flags, int literal_index, |
| 424 int number_of_properties); |
| 420 const Operator* CreateLiteralRegExp(Handle<String> constant_pattern, | 425 const Operator* CreateLiteralRegExp(Handle<String> constant_pattern, |
| 421 int literal_flags, int literal_index); | 426 int literal_flags, int literal_index); |
| 422 | 427 |
| 423 const Operator* CallFunction( | 428 const Operator* CallFunction( |
| 424 size_t arity, VectorSlotPair const& feedback = VectorSlotPair(), | 429 size_t arity, VectorSlotPair const& feedback = VectorSlotPair(), |
| 425 ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny, | 430 ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny, |
| 426 TailCallMode tail_call_mode = TailCallMode::kDisallow); | 431 TailCallMode tail_call_mode = TailCallMode::kDisallow); |
| 427 const Operator* CallRuntime(Runtime::FunctionId id); | 432 const Operator* CallRuntime(Runtime::FunctionId id); |
| 428 const Operator* CallRuntime(Runtime::FunctionId id, size_t arity); | 433 const Operator* CallRuntime(Runtime::FunctionId id, size_t arity); |
| 429 const Operator* CallRuntime(const Runtime::Function* function, size_t arity); | 434 const Operator* CallRuntime(const Runtime::Function* function, size_t arity); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 Zone* const zone_; | 485 Zone* const zone_; |
| 481 | 486 |
| 482 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); | 487 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); |
| 483 }; | 488 }; |
| 484 | 489 |
| 485 } // namespace compiler | 490 } // namespace compiler |
| 486 } // namespace internal | 491 } // namespace internal |
| 487 } // namespace v8 | 492 } // namespace v8 |
| 488 | 493 |
| 489 #endif // V8_COMPILER_JS_OPERATOR_H_ | 494 #endif // V8_COMPILER_JS_OPERATOR_H_ |
| OLD | NEW |