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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 | 337 |
338 bool operator==(CreateClosureParameters const&, CreateClosureParameters const&); | 338 bool operator==(CreateClosureParameters const&, CreateClosureParameters const&); |
339 bool operator!=(CreateClosureParameters const&, CreateClosureParameters const&); | 339 bool operator!=(CreateClosureParameters const&, CreateClosureParameters const&); |
340 | 340 |
341 size_t hash_value(CreateClosureParameters const&); | 341 size_t hash_value(CreateClosureParameters const&); |
342 | 342 |
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 | |
348 // Defines shared information for the literal that should be created. This is | 347 // Defines shared information for the literal that should be created. This is |
349 // used as parameter by JSCreateLiteralArray, JSCreateLiteralObject and | 348 // used as parameter by JSCreateLiteralArray, JSCreateLiteralObject and |
350 // JSCreateLiteralRegExp operators. | 349 // JSCreateLiteralRegExp operators. |
351 class CreateLiteralParameters final { | 350 class CreateLiteralParameters final { |
352 public: | 351 public: |
353 CreateLiteralParameters(Handle<HeapObject> constant, int length, int flags, | 352 CreateLiteralParameters(Handle<HeapObject> constant, int length, int flags, |
354 int index) | 353 int index) |
355 : constant_(constant), length_(length), flags_(flags), index_(index) {} | 354 : constant_(constant), length_(length), flags_(flags), index_(index) {} |
356 | 355 |
357 Handle<HeapObject> constant() const { return constant_; } | 356 Handle<HeapObject> constant() const { return constant_; } |
(...skipping 10 matching lines...) Expand all Loading... |
368 | 367 |
369 bool operator==(CreateLiteralParameters const&, CreateLiteralParameters const&); | 368 bool operator==(CreateLiteralParameters const&, CreateLiteralParameters const&); |
370 bool operator!=(CreateLiteralParameters const&, CreateLiteralParameters const&); | 369 bool operator!=(CreateLiteralParameters const&, CreateLiteralParameters const&); |
371 | 370 |
372 size_t hash_value(CreateLiteralParameters const&); | 371 size_t hash_value(CreateLiteralParameters const&); |
373 | 372 |
374 std::ostream& operator<<(std::ostream&, CreateLiteralParameters const&); | 373 std::ostream& operator<<(std::ostream&, CreateLiteralParameters const&); |
375 | 374 |
376 const CreateLiteralParameters& CreateLiteralParametersOf(const Operator* op); | 375 const CreateLiteralParameters& CreateLiteralParametersOf(const Operator* op); |
377 | 376 |
| 377 const BinaryOperationHints& BinaryOperationHintsOf(const Operator* op); |
378 | 378 |
379 // Interface for building JavaScript-level operators, e.g. directly from the | 379 // Interface for building JavaScript-level operators, e.g. directly from the |
380 // AST. Most operators have no parameters, thus can be globally shared for all | 380 // AST. Most operators have no parameters, thus can be globally shared for all |
381 // graphs. | 381 // graphs. |
382 class JSOperatorBuilder final : public ZoneObject { | 382 class JSOperatorBuilder final : public ZoneObject { |
383 public: | 383 public: |
384 explicit JSOperatorBuilder(Zone* zone); | 384 explicit JSOperatorBuilder(Zone* zone); |
385 | 385 |
386 const Operator* Equal(); | 386 const Operator* Equal(); |
387 const Operator* NotEqual(); | 387 const Operator* NotEqual(); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 Zone* const zone_; | 493 Zone* const zone_; |
494 | 494 |
495 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); | 495 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); |
496 }; | 496 }; |
497 | 497 |
498 } // namespace compiler | 498 } // namespace compiler |
499 } // namespace internal | 499 } // namespace internal |
500 } // namespace v8 | 500 } // namespace v8 |
501 | 501 |
502 #endif // V8_COMPILER_JS_OPERATOR_H_ | 502 #endif // V8_COMPILER_JS_OPERATOR_H_ |
OLD | NEW |