| OLD | NEW | 
|    1 // Copyright 2012 the V8 project authors. All rights reserved. |    1 // Copyright 2012 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_GLOBALS_H_ |    5 #ifndef V8_GLOBALS_H_ | 
|    6 #define V8_GLOBALS_H_ |    6 #define V8_GLOBALS_H_ | 
|    7  |    7  | 
|    8 #include <stddef.h> |    8 #include <stddef.h> | 
|    9 #include <stdint.h> |    9 #include <stdint.h> | 
|   10  |   10  | 
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  233   STRONG_BIT = 1 << 1, |  233   STRONG_BIT = 1 << 1, | 
|  234   LANGUAGE_END, |  234   LANGUAGE_END, | 
|  235  |  235  | 
|  236   // Shorthands for some common language modes. |  236   // Shorthands for some common language modes. | 
|  237   SLOPPY = 0, |  237   SLOPPY = 0, | 
|  238   STRICT = STRICT_BIT, |  238   STRICT = STRICT_BIT, | 
|  239   STRONG = STRICT_BIT | STRONG_BIT |  239   STRONG = STRICT_BIT | STRONG_BIT | 
|  240 }; |  240 }; | 
|  241  |  241  | 
|  242  |  242  | 
|  243 inline std::ostream& operator<<(std::ostream& os, LanguageMode mode) { |  243 inline std::ostream& operator<<(std::ostream& os, const LanguageMode& mode) { | 
|  244   switch (mode) { |  244   switch (mode) { | 
|  245     case SLOPPY: |  245     case SLOPPY: | 
|  246       return os << "sloppy"; |  246       return os << "sloppy"; | 
|  247     case STRICT: |  247     case STRICT: | 
|  248       return os << "strict"; |  248       return os << "strict"; | 
|  249     case STRONG: |  249     case STRONG: | 
|  250       return os << "strong"; |  250       return os << "strong"; | 
|  251     default: |  251     default: | 
|  252       return os << "unknown"; |  252       return os << "unknown"; | 
|  253   } |  253   } | 
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  439 const int kSpaceTagMask = (1 << kSpaceTagSize) - 1; |  439 const int kSpaceTagMask = (1 << kSpaceTagSize) - 1; | 
|  440  |  440  | 
|  441 enum AllocationAlignment { kWordAligned, kDoubleAligned, kDoubleUnaligned }; |  441 enum AllocationAlignment { kWordAligned, kDoubleAligned, kDoubleUnaligned }; | 
|  442  |  442  | 
|  443 // A flag that indicates whether objects should be pretenured when |  443 // A flag that indicates whether objects should be pretenured when | 
|  444 // allocated (allocated directly into the old generation) or not |  444 // allocated (allocated directly into the old generation) or not | 
|  445 // (allocated in the young generation if the object size and type |  445 // (allocated in the young generation if the object size and type | 
|  446 // allows). |  446 // allows). | 
|  447 enum PretenureFlag { NOT_TENURED, TENURED }; |  447 enum PretenureFlag { NOT_TENURED, TENURED }; | 
|  448  |  448  | 
 |  449 inline std::ostream& operator<<(std::ostream& os, const PretenureFlag& flag) { | 
 |  450   switch (flag) { | 
 |  451     case NOT_TENURED: | 
 |  452       return os << "NotTenured"; | 
 |  453     case TENURED: | 
 |  454       return os << "Tenured"; | 
 |  455   } | 
 |  456   UNREACHABLE(); | 
 |  457   return os; | 
 |  458 } | 
 |  459  | 
|  449 enum MinimumCapacity { |  460 enum MinimumCapacity { | 
|  450   USE_DEFAULT_MINIMUM_CAPACITY, |  461   USE_DEFAULT_MINIMUM_CAPACITY, | 
|  451   USE_CUSTOM_MINIMUM_CAPACITY |  462   USE_CUSTOM_MINIMUM_CAPACITY | 
|  452 }; |  463 }; | 
|  453  |  464  | 
|  454 enum GarbageCollector { SCAVENGER, MARK_COMPACTOR }; |  465 enum GarbageCollector { SCAVENGER, MARK_COMPACTOR }; | 
|  455  |  466  | 
|  456 enum Executability { NOT_EXECUTABLE, EXECUTABLE }; |  467 enum Executability { NOT_EXECUTABLE, EXECUTABLE }; | 
|  457  |  468  | 
|  458 enum VisitMode { |  469 enum VisitMode { | 
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  928 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { |  939 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { | 
|  929   kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); |  940   kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); | 
|  930   DCHECK(IsValidFunctionKind(kind)); |  941   DCHECK(IsValidFunctionKind(kind)); | 
|  931   return kind; |  942   return kind; | 
|  932 } |  943 } | 
|  933 } }  // namespace v8::internal |  944 } }  // namespace v8::internal | 
|  934  |  945  | 
|  935 namespace i = v8::internal; |  946 namespace i = v8::internal; | 
|  936  |  947  | 
|  937 #endif  // V8_GLOBALS_H_ |  948 #endif  // V8_GLOBALS_H_ | 
| OLD | NEW |