Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(997)

Side by Side Diff: src/compiler/js-operator.h

Issue 1478823002: Reland of [turbofan] Introduce proper JSCreateLiteralRegExp operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 and JSCreateLiteralObject 407 // used as parameter by JSCreateLiteralArray, JSCreateLiteralObject and
408 // operators. 408 // JSCreateLiteralRegExp operators.
409 class CreateLiteralParameters final { 409 class CreateLiteralParameters final {
410 public: 410 public:
411 CreateLiteralParameters(Handle<FixedArray> constants, int flags, int index) 411 CreateLiteralParameters(Handle<HeapObject> constant, int flags, int index)
412 : constants_(constants), flags_(flags), index_(index) {} 412 : constant_(constant), flags_(flags), index_(index) {}
413 413
414 Handle<FixedArray> constants() const { return constants_; } 414 Handle<HeapObject> constant() const { return constant_; }
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<FixedArray> const constants_; 419 Handle<HeapObject> const constant_;
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
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);
479 481
480 const Operator* CallFunction( 482 const Operator* CallFunction(
481 size_t arity, LanguageMode language_mode, 483 size_t arity, LanguageMode language_mode,
482 VectorSlotPair const& feedback = VectorSlotPair(), 484 VectorSlotPair const& feedback = VectorSlotPair(),
483 ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny, 485 ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny,
484 TailCallMode tail_call_mode = TailCallMode::kDisallow); 486 TailCallMode tail_call_mode = TailCallMode::kDisallow);
485 const Operator* CallRuntime(Runtime::FunctionId id, size_t arity); 487 const Operator* CallRuntime(Runtime::FunctionId id, size_t arity);
486 const Operator* CallConstruct(size_t arity, VectorSlotPair const& feedback); 488 const Operator* CallConstruct(size_t arity, VectorSlotPair const& feedback);
487 489
488 const Operator* ConvertReceiver(ConvertReceiverMode convert_mode); 490 const Operator* ConvertReceiver(ConvertReceiverMode convert_mode);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 Zone* const zone_; 545 Zone* const zone_;
544 546
545 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); 547 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder);
546 }; 548 };
547 549
548 } // namespace compiler 550 } // namespace compiler
549 } // namespace internal 551 } // namespace internal
550 } // namespace v8 552 } // namespace v8
551 553
552 #endif // V8_COMPILER_JS_OPERATOR_H_ 554 #endif // V8_COMPILER_JS_OPERATOR_H_
OLDNEW
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698