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/runtime/runtime.h" | 8 #include "src/runtime/runtime.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 bool operator!=(CreateClosureParameters const&, CreateClosureParameters const&); | 397 bool operator!=(CreateClosureParameters const&, CreateClosureParameters const&); |
398 | 398 |
399 size_t hash_value(CreateClosureParameters const&); | 399 size_t hash_value(CreateClosureParameters const&); |
400 | 400 |
401 std::ostream& operator<<(std::ostream&, CreateClosureParameters const&); | 401 std::ostream& operator<<(std::ostream&, CreateClosureParameters const&); |
402 | 402 |
403 const CreateClosureParameters& CreateClosureParametersOf(const Operator* op); | 403 const CreateClosureParameters& CreateClosureParametersOf(const Operator* op); |
404 | 404 |
405 | 405 |
406 // Defines shared information for the literal that should be created. This is | 406 // Defines shared information for the literal that should be created. This is |
407 // used as parameter by JSCreateLiteralArray, JSCreateLiteralObject and | 407 // used as parameter by JSCreateLiteralArray and JSCreateLiteralObject |
408 // JSCreateLiteralRegExp operators. | 408 // operators. |
409 class CreateLiteralParameters final { | 409 class CreateLiteralParameters final { |
410 public: | 410 public: |
411 CreateLiteralParameters(Handle<HeapObject> constant, int flags, int index) | 411 CreateLiteralParameters(Handle<FixedArray> constants, int flags, int index) |
412 : constant_(constant), flags_(flags), index_(index) {} | 412 : constants_(constants), flags_(flags), index_(index) {} |
413 | 413 |
414 Handle<HeapObject> constant() const { return constant_; } | 414 Handle<FixedArray> constants() const { return constants_; } |
415 int flags() const { return flags_; } | 415 int flags() const { return flags_; } |
416 int index() const { return index_; } | 416 int index() const { return index_; } |
417 | 417 |
418 private: | 418 private: |
419 Handle<HeapObject> const constant_; | 419 Handle<FixedArray> const constants_; |
420 int const flags_; | 420 int const flags_; |
421 int const index_; | 421 int const index_; |
422 }; | 422 }; |
423 | 423 |
424 bool operator==(CreateLiteralParameters const&, CreateLiteralParameters const&); | 424 bool operator==(CreateLiteralParameters const&, CreateLiteralParameters const&); |
425 bool operator!=(CreateLiteralParameters const&, CreateLiteralParameters const&); | 425 bool operator!=(CreateLiteralParameters const&, CreateLiteralParameters const&); |
426 | 426 |
427 size_t hash_value(CreateLiteralParameters const&); | 427 size_t hash_value(CreateLiteralParameters const&); |
428 | 428 |
429 std::ostream& operator<<(std::ostream&, CreateLiteralParameters const&); | 429 std::ostream& operator<<(std::ostream&, CreateLiteralParameters const&); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 const Operator* Create(); | 469 const Operator* Create(); |
470 const Operator* CreateArguments(CreateArgumentsParameters::Type type, | 470 const Operator* CreateArguments(CreateArgumentsParameters::Type type, |
471 int start_index); | 471 int start_index); |
472 const Operator* CreateArray(size_t arity, Handle<AllocationSite> site); | 472 const Operator* CreateArray(size_t arity, Handle<AllocationSite> site); |
473 const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info, | 473 const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info, |
474 PretenureFlag pretenure); | 474 PretenureFlag pretenure); |
475 const Operator* CreateLiteralArray(Handle<FixedArray> constant_elements, | 475 const Operator* CreateLiteralArray(Handle<FixedArray> constant_elements, |
476 int literal_flags, int literal_index); | 476 int literal_flags, int literal_index); |
477 const Operator* CreateLiteralObject(Handle<FixedArray> constant_properties, | 477 const Operator* CreateLiteralObject(Handle<FixedArray> constant_properties, |
478 int literal_flags, int literal_index); | 478 int literal_flags, int literal_index); |
479 const Operator* CreateLiteralRegExp(Handle<String> constant_pattern, | |
480 int literal_flags, int literal_index); | |
481 | 479 |
482 const Operator* CallFunction( | 480 const Operator* CallFunction( |
483 size_t arity, LanguageMode language_mode, | 481 size_t arity, LanguageMode language_mode, |
484 VectorSlotPair const& feedback = VectorSlotPair(), | 482 VectorSlotPair const& feedback = VectorSlotPair(), |
485 ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny, | 483 ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny, |
486 TailCallMode tail_call_mode = TailCallMode::kDisallow); | 484 TailCallMode tail_call_mode = TailCallMode::kDisallow); |
487 const Operator* CallRuntime(Runtime::FunctionId id, size_t arity); | 485 const Operator* CallRuntime(Runtime::FunctionId id, size_t arity); |
488 const Operator* CallConstruct(size_t arity, VectorSlotPair const& feedback); | 486 const Operator* CallConstruct(size_t arity, VectorSlotPair const& feedback); |
489 | 487 |
490 const Operator* ConvertReceiver(ConvertReceiverMode convert_mode); | 488 const Operator* ConvertReceiver(ConvertReceiverMode convert_mode); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 Zone* const zone_; | 543 Zone* const zone_; |
546 | 544 |
547 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); | 545 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); |
548 }; | 546 }; |
549 | 547 |
550 } // namespace compiler | 548 } // namespace compiler |
551 } // namespace internal | 549 } // namespace internal |
552 } // namespace v8 | 550 } // namespace v8 |
553 | 551 |
554 #endif // V8_COMPILER_JS_OPERATOR_H_ | 552 #endif // V8_COMPILER_JS_OPERATOR_H_ |
OLD | NEW |